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 ?