Jump to content

When exporting the glTF file with Babylon.js Inspector, the polygon is inverted


Recommended Posts

I tried exporting glTF file using Inspector of Babylon.js Sandbox. However, it seems that the polygon is inverted and displayed.

The version of Babylon.js is v3.3.0-alpha.11.

I think that it is because FRONT_FACE is not CCW but CW.




Link to comment
Share on other sites

I confirmed that this problem was solved with the inspector of Babylon.js Sandbox.


The version of Babylon.js is v3.3.0-alpha.12.


However, downloading the latest version of babylon.glTF2Serializer.js from the repository of Babylon.js and testing it locally did not seem to work properly for some reason.


The version of Babylon.js is v3.3.0-alpha.12.





There should be some difference, but I have not yet arrived at the cause:(



Edited by cx20
Unnecessary images deleted
Link to comment
Share on other sites

I understood what kind of situation it will go wrong.

I am changing the scale of the model in the sample program displaying my glTF, but it seems that exporting can not be performed correctly if it is not 1.0.

NG : https://cx20.github.io/gltf-test/examples/babylonjs/index.html?category=tutorialModels&model=WaterBottle&scale=10.0&type=glTF

OK : https://cx20.github.io/gltf-test/examples/babylonjs/index.html?category=tutorialModels&model=WaterBottle&scale=1.0&type=glTF

However, I do not know how to fix it. Are there any advice?


parentMesh.scaling = new BABYLON.Vector3(modelScaling.x * scale, modelScaling.y * scale, modelScaling.z * scale);


Link to comment
Share on other sites

Hi @kcoley, Hmm. I tried it again, but it seems to reproduce.

It reproduced with the following combination.

Windows 10 Version 1803 + Chrome 67.0.3396.99 
Windows 10 Version 1803 + Firefox 61.0.1

The reproduction procedure is as follows.

1. Go to the following URL. 

Set the scale parameter to 10.

2. Check "Debug" on the control panel


3. Select glTF menu from the inspector window.

4. Click the "Export GLB" button.


5. Download the export file.


6. Drag and drop the glb file into the glTF Viewer.



7. Please look at the display result.



Link to comment
Share on other sites

@kcoley Thank you for fixing Issue.

However, it seems that the latest version of glTF Exporter is not created by nightly build. This is because the timestamp is in a state one day ago.

Could you check if the latest version of glTF Exporter was created?

https://github.com/BabylonJS/Babylon.js/tree/master/dist/preview release/serializers

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.

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.


  • Recently Browsing   0 members

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