cx20 Posted December 19, 2015 Share Posted December 19, 2015 Hi! I'm testing now Babylon.js + objFileLoader. http://jsdo.it/cx20/KkUO However, it seems the model of the texture(color) is funny.For some reason it seems to become stripes. There was no problem in the sample of similar Three.js + OBJLoader. (using same .obj file) http://jsdo.it/cx20/yOBb Please tell me whether use of objFileLoader is wrong. Thanks. Quote Link to comment Share on other sites More sharing options...
RaananW Posted December 20, 2015 Share Posted December 20, 2015 Hi cx20, Welcome to the forum :-) This seems like a uv coordinates problem, Would you be able to provide the obj file for us to test with? So far we haven't had any problems importing files (not that we know of), so would be great to fix this issue as well! Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted December 21, 2015 Share Posted December 21, 2015 i think this is last UV Problem . It need change vertexs data Quote Link to comment Share on other sites More sharing options...
cx20 Posted December 21, 2015 Author Share Posted December 21, 2015 Thank you for a reply. An .obj file and a texture file is below.mario.obj (http://jsrun.it/assets/t/N/6/x/tN6xU) mario.png (http://jsrun.it/assets/9/9/W/G/99WGE.png) The following file is unused. For reference.mario.mtl (http://jsrun.it/assets/e/O/i/w/eOiwJ) mario.tga (http://jsrun.it/assets/M/X/R/J/MXRJJ) Regards. Quote Link to comment Share on other sites More sharing options...
RaananW Posted December 21, 2015 Share Posted December 21, 2015 So, it was a UV problem, but something the loader can already handle. You were missing a flag - the UV optimization flag.BABYLON.OBJFileLoader.OPTIMIZE_WITH_UV = true;here - http://jsdo.it/RaananW/gUHy This platform also doesn't really allow loading obj correctly, as the mtl file's name is located in the .obj file. In this case you applied a texture to the object, but the importer never really finished loading the object - it throws an exception. You will have to address that as well. But - it's working cx20 and NasimiAsl 2 Quote Link to comment Share on other sites More sharing options...
cx20 Posted December 21, 2015 Author Share Posted December 21, 2015 Thanks you RaananW. It was a great help for me. I had overlooked the UV optimization flag in the help http://doc.babylonjs.com/extensions/OBJ Since Batman is dark , I think that it was not able to be seen. It is a joke. I want to learn it about more Babylon.js. Quote Link to comment Share on other sites More sharing options...
RaananW Posted December 21, 2015 Share Posted December 21, 2015 The dark knight - optimized! Glad It works now. Enjoy learning more about Babylon.js! 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.