cx20 Posted July 9, 2018 Share Posted July 9, 2018 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. Quote Link to comment Share on other sites More sharing options...
kcoley Posted July 9, 2018 Share Posted July 9, 2018 Hi @cx20, thanks for flagging this! I will look into this asap cx20 1 Quote Link to comment Share on other sites More sharing options...
cx20 Posted July 10, 2018 Author Share Posted July 10, 2018 Hi @kcoley, I confirmed that the problem of reversing polygons in the latest build was solved. It's a wonderful job. Quote Link to comment Share on other sites More sharing options...
cx20 Posted July 10, 2018 Author Share Posted July 10, 2018 BTW, I also tried glTF Viewer in Three.js. Although it may be another problem, it seems that a validation error has occurred. I am glad if you can check it. Quote Link to comment Share on other sites More sharing options...
kcoley Posted July 10, 2018 Share Posted July 10, 2018 Hi @cx20. I made a change yesterday to handle correcting the winding order . The validation issue seems to relate to a node with no children. I will check for that condition and not export that node. Thanks again for flagging these issues! cx20 1 Quote Link to comment Share on other sites More sharing options...
cx20 Posted July 11, 2018 Author Share Posted July 11, 2018 @kcoley Thank you for your response. I confirmed that the glTF Validation error has been resolved in the latest build. Quote Link to comment Share on other sites More sharing options...
kcoley Posted July 11, 2018 Share Posted July 11, 2018 Great to hear! Quote Link to comment Share on other sites More sharing options...
cx20 Posted July 11, 2018 Author Share Posted July 11, 2018 @kcoley I tried converting about WaterBottle.gltf. It seems that a different validation error has occurred. https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/WaterBottle Quote Link to comment Share on other sites More sharing options...
kcoley Posted July 12, 2018 Share Posted July 12, 2018 Hi @cx20, interesting, I can look into what's going on. Quote Link to comment Share on other sites More sharing options...
cx20 Posted July 12, 2018 Author Share Posted July 12, 2018 (edited) I confirmed that this problem was solved with the inspector of Babylon.js Sandbox. https://sandbox.babylonjs.com/ 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. https://cdn.rawgit.com/cx20/gltf-test/a8d9825ff50b29b50d545548c9e0ba1cc0380732/examples/babylonjs/index.html?category=tutorialModels&model=WaterBottle&scale=10&type=glTF 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 July 12, 2018 by cx20 Unnecessary images deleted Quote Link to comment Share on other sites More sharing options...
cx20 Posted July 12, 2018 Author Share Posted July 12, 2018 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? https://github.com/cx20/gltf-test/blob/master/examples/babylonjs/index.js#L76 parentMesh.scaling = new BABYLON.Vector3(modelScaling.x * scale, modelScaling.y * scale, modelScaling.z * scale); Quote Link to comment Share on other sites More sharing options...
kcoley Posted July 12, 2018 Share Posted July 12, 2018 @cx20, I'll take a look at this to see what's going on. Quote Link to comment Share on other sites More sharing options...
kcoley Posted July 13, 2018 Share Posted July 13, 2018 Hi @cx20, I couldn't find a reason why your code would not work, but when checking your links again, the issue seems to have been resolved. Are you able to confirm that on your end? Quote Link to comment Share on other sites More sharing options...
cx20 Posted July 13, 2018 Author Share Posted July 13, 2018 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. https://cx20.github.io/gltf-test/examples/babylonjs/index.html?category=tutorialModels&model=WaterBottle&scale=10.0&type=glTF 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. https://gltf-viewer.donmccurdy.com/ 7. Please look at the display result. Quote Link to comment Share on other sites More sharing options...
cx20 Posted July 13, 2018 Author Share Posted July 13, 2018 The following are the main differences of the exported file. Quote Link to comment Share on other sites More sharing options...
kcoley Posted July 13, 2018 Share Posted July 13, 2018 @cx20, thanks for providing the steps. It may be related to scaling the root node. I think I may have a fix for that. I'll try it out to see if it works. cx20 1 Quote Link to comment Share on other sites More sharing options...
kcoley Posted July 13, 2018 Share Posted July 13, 2018 Hi @cx20, we just merged a fix in the latest nightly which should resolve your issue. Feel free to give it a try and let me know if it works. Quote Link to comment Share on other sites More sharing options...
cx20 Posted July 13, 2018 Author Share Posted July 13, 2018 @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 Quote Link to comment Share on other sites More sharing options...
kcoley Posted July 13, 2018 Share Posted July 13, 2018 Hi @cx20, we just pushed another nightly. Is that working for you now? Quote Link to comment Share on other sites More sharing options...
cx20 Posted July 14, 2018 Author Share Posted July 14, 2018 @kcoley I tested with the latest version build and confirmed that the problem was solved. Thank you very much for your response. The following is the result of exporting the model displayed at 10 times scale. kcoley 1 Quote Link to comment Share on other sites More sharing options...
kcoley Posted July 14, 2018 Share Posted July 14, 2018 Great, thanks for the feedback! cx20 1 Quote Link to comment Share on other sites More sharing options...
cx20 Posted July 14, 2018 Author Share Posted July 14, 2018 BTW, how can I add a "solved" tag to this topic? I tried add a tag on the trial but it seems not to turn red. Quote Link to comment Share on other sites More sharing options...
kcoley Posted July 14, 2018 Share Posted July 14, 2018 This thread seems to suggest how to do it: cx20 1 Quote Link to comment Share on other sites More sharing options...
cx20 Posted July 14, 2018 Author Share Posted July 14, 2018 @kcoley Thanks to you I solved it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.