Jump to content

Babylon.js .obj File Loader problem?


cx20
 Share

Recommended Posts

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.

 

Link to comment
Share on other sites

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)

 
The following file is unused. For reference.

mario.tga (http://jsrun.it/assets/M/X/R/J/MXRJJ)

 

Regards.

Link to comment
Share on other sites

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 :)

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.

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