Jump to content

OBJExport confusion


babbleon
 Share

Recommended Posts

Hello,

I am trying to export an OBJ from a scene which was loaded from a .babylon.

The loading bit works fine and displays as expected.

https://playground.babylonjs.com/#FLVK0U#1

However, the exported OBJ is partially flipped along the X-axis, see screenshot:

This is very odd, as both the text and the monkey is one mesh... yet only one is flipped.

Does anyone have any bright ideas please?

Thank you

Screenshot from 2018-08-29 14-22-22.png

Link to comment
Share on other sites

Hi @babbleon!  Looking at the obj file, I am able to confirm that the monkey is facing the opposite direction of the text.  I will look into the obj exporter and investigate.  

In the meantime, if a potential option that you can use, the glTF exporter in Babylon seems to export as expected.

Link to comment
Share on other sites

Hi @babbleon.  After further investigation, the issue is because the OBJ format has no notion of "handed-ness", so the geometry written to the file assumes the handedness of the BabylonJS scene.  Depending on where the generated OBJ file will be loaded, you may need to do a handedness conversion on the positions.  Loading the OBJ file back in BabylonJS requires no change.  Negating the scale should work if you are going to Blender or Maya, though you may need to do a different conversion if going to a different application with another handedness convention such as Unreal or Unity, etc. 

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