Rodrix3 Posted April 5, 2018 Share Posted April 5, 2018 File exported from 3d Studio Max as OBJ. BUG: On BabylonJS Sandbox (and everywhere on Babylon, including Babylon Editor) the mesh looks mirrored (and there is no rotation that could fix it). See image at the bottom. Upon looking at the image you could say "this could be fixed by a vertical flip", but no, if you flip the R the polygons are inverted and you see it back culled. You can do the same test yourself by using the files I uploaded and testing on Babylon Sandbox and ThreeJs viewer and see that where Babylon fails, ThreeJs succeeds: https://3dviewer.net/ This is so frustrating. I can't even import my models correctly into Babylon JS. It seems I will have to stick with ThreeJS... and I have spent more than 10 full days studying every single documentation and demo on the entire site. Could anyone fix this bug? Thank you so much. I really want to stick with Babylon.. P.S: X-Reset changes nothing even if I apply it. Plus if ThreeJS is able to display the OBJ file right, why isn't Babylon capable of the same? @Deltakosh, more exporting issues. I thought you should be aware... In fact I am starting to think the previous bug I posted and this one are related. SEE ATTACHED FILES: R.obj R.mtl Quote Link to comment Share on other sites More sharing options...
Guest Posted April 6, 2018 Share Posted April 6, 2018 This is because Three.js is right handed where babylon.js is left handed. It is a convention. If you export the obj as .babylon file or gltf the 3dsmax export should do the work for you. Quote Link to comment Share on other sites More sharing options...
Guest Posted April 6, 2018 Share Posted April 6, 2018 I'll see with our obj loader cannot handle that in the meantime Quote Link to comment Share on other sites More sharing options...
Guest Posted April 6, 2018 Share Posted April 6, 2018 The file is upside down (for some reasons) For instance the standford bunny works well with the sandbox: https://github.com/BabylonJS/Babylon.js/blob/master/Playground/scenes/StanfordBunny.obj I've just pushed an update for you though: you can now set BABYLON.OBJFileLoader.INVERT_Y = true Rodrix3 1 Quote Link to comment Share on other sites More sharing options...
Rodrix3 Posted April 6, 2018 Author Share Posted April 6, 2018 Ahhh that explains it!! Thanks so much @delkatosh This wiil make it easier for others migrating from ThreeJs. 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.