Jump to content

Strange difference between models, exported to .babylon and .gltf(.glb)


Pycz
 Share

Recommended Posts

I converted one simple model in 3DMax 2018 to .babylon and .glb format using standart settings for babylon.js exporter. Then I tried to use it on my webpage, but the same exported .babylon and .glb models looked different, although they were represented by the same code. Babylon format looks predictable, as I imagined it, but the same glb model looks too dark for some reason, even light in scene don't make any difference.

Babylon:

http://www.babylonjs-playground.com/#A2W7U6

(model https://pycz.github.io/test.babylon )

GLB:

http://www.babylonjs-playground.com/#PF7MH0

(model https://pycz.github.io/test.glb)

MAX:

(model https://pycz.github.io/test.max)

 

Just don't understand, why glb looks different and what to do to make it looks like babylone one. Maybe it is obvious, but I really don't see it.?

Screenshot_2018-08-01 Babylon js Playground(1).png

Screenshot_2018-08-01 Babylon js Playground.png

Link to comment
Share on other sites

Hello! this is because glTF uses a PBR material and this kind of material needs an environment texture.

Just call scene.createDefaultEnvironment() after loading your gltf file

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...