Mirroring mesh without negative scaling

Hi,

I’m currently facing the (probably known) problem, that augmented reality doesn’t work very smoothly on apple devices.
I use the gltf exporter to create a glb from the babylon scene, which will then be uploaded into the model viewer and forwarded to the quick look app.
The quick look app can’t work with NEGATIVE scalings in the glb => this leads to backface culling issues.

Anyway now I’m trying to get rid of negative scalings in my babylon scene, but this is really difficult, as the GLTF loader always introduces a “root” node with -1 scaling in z for the coordinate system conversion.
Using babylon as right handed system is not really an option, as the viewer should work with glb and babylon files alike, also it would break existing projects.

So my main question is if there is anything like a “mirror mesh geometry” functionality that achieves the same result, as if the scaling is inverted?

I have a PG example with two crates, whereas one of them should be mirrored, that should break down the problem to a very small scope.

Thanks in advance for your help!

I don’t know about AR on iOS, never tried it. But did you try it with instances and then instanciate the hierarchy?

Hi @mawa,

Thx for the response, I was already able to solve the issue with the Transformation Baking functionality.
This “adds” the negative scaling of the root node in the geometry.
Afterwards I can remove the negative scaling of the root node and AR works again.

1 Like

Glad to hear that. Funny fix. Might be of help to someone else with a similar issue so thanks for sharing :smiley: and have a great day :sunglasses: