OBJ is a right handed format. I believe the inversion you’re seeing is due to our mesh being exported from babylon’s left handed system to OBJ, then imported into blender’s right handed system. even if we align the proper forward, and up vector, then our right vector is inverted. that’s not right… I’ll try to fix that.
I imagine if the OBJ is exported from a right handed babylon scene, then we would not see this inversion…
This seems to work regardless of export from babylon using global or local coordinates and scene handedness…I’m not sure if any fixes need to be made here…
Thanks for looking into this. I tried to play with the -Z + Z options when importing in blender but I’m not able to have the same models. Seems the obj is Mirrored on the X axis
I’ve made up a “not symetrical” scene so you can reproduce what I mean.
Consider this playground with a Terrain mesh generated from height map
If you change the scene handedness to right handed, the OBJ and GLB export are identical, as would be expected. Otherwise, if we use a left handed system, the OBJ and GLB export are mirrored along the X axis. When imported to Blender with default settings…not great.
Would you be interested in delivering a fix to the OBJ exporter? I expect we would just need to add an additional parameter to the OBJSerializer.OBJ that represents whether or not to convert our model geometry to right handed coordinates, and invert the geometry X position as a result.
Yes I would be interested in trying to work on this over the week-end, could you give two pointers (sorry I didn’t looked up the documentation as I’m on my mobile and also I’m not an expert with Babylon.js and 3D)
How to you change the handedness of the system on the fly in babylon.js ?