Jump to content

gltf model looks transparent[solved]


waverider
 Share

Recommended Posts

Hi waverider.  There is some difference/issue with Latest/Stable versions of BJS.

https://www.babylonjs-playground.com/indexstable#11BH6Z#327

That one looks much better (stable version).  Let's ping @Deltakosh for this one.

It might be next week before any activity happens, so, party on with the "stable version" for a little while.  :)

Thx for the report/playground, and for your patience.

Link to comment
Share on other sites

This is a problem with the asset itself. The triangle winding order is wrong in the asset. glTF expects a specific triangle winding order as noted here.

The reason why it worked in the stable version and doesn't work in the current version is two-fold:

  1. The current version of Babylon will now auto flip faces when there is a negative scale in the transform.
  2. The Playground scene is overwriting the scale of the root node of asset, removing the negative z-scale it had.

The negative z-scale is done to convert the asset from right-handed (glTF) to left-handed (Babylon). The asset looks to be left-handed data written into a glTF. This works in the previous stable version since the engine doesn't auto flip the faces and the negative z-scale had been removed manually, so effectively the winding order changed. With the latest version, this "trick" won't work anymore.

As an alternative, if you don't want to fix the asset, one way to work around this is to change the sideOrientation of the material.

https://www.babylonjs-playground.com/#11BH6Z#328

Link to comment
Share on other sites

  • waverider changed the title to gltf model looks transparent[solved]

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...