GLB Export - displaced geometries and flipped orientations

Hi,
we experiencing a problem with our scene in left handed coordinate system and I think it is cause of the changes in GLTF Serializer rework. by SergioRZMasson · Pull Request #15869 · BabylonJS/Babylon.js · GitHub

GLB Export problem | Babylon.js Playground

Flipped orientation you see at the feets

Hello,

Since the overall mesh looks fine except 2 feets out of 3, are you sure the problem isn’t already here on the original file ?

actually it worked before updating babylonjs
in the original the normals and positions are all correct.

after converting the tubes are misplaced (but not all of them) We have a lot of negative scalings inside.

cc @srzerbetto

cc @alexchuber

1 Like

To clarify, are you talking about the misplacement of the LinesMeshes here?

yes these are misplaced.

and

have flipped orientations

Gotcha, I see the issue now. The left-handed negative scales, used to mirror geometry, are leading to exports with:

  1. incorrect winding orders (and/or side orientations) in a few places, including the feet’s edges
  2. flipped transformations in the tubes

Will investigate this week, but it will take some thought. Mirrored geometry is a tricky case to get right when rendering and exporting.

Probably not feasible for you to do, but throwing it out there anyway: these problems can be avoided entirely by mirroring your nodes via rotations instead of negative scales.

1 Like

Fortunately, the flipped signs weren’t because of the negative scales. This should fix your issue: glTF Exporter: Fix LH -> RH vertex data conversion bug by alexchuber · Pull Request #16456 · BabylonJS/Babylon.js · GitHub

2 Likes

good job!

Not sure if it is a similar problem after the glb export the bottom of the chair is a little bit flipped. it seems that the rotation of the bottom of the chair does not get exported at all. 2 Meshes are not rotated correctly

GLB Export problem | Babylon.js Playground

problem:

2 Likes

Thanks, that was an amazing catch!

2 Likes

Thanks for your work!

When we find more problems, we let you know.

Now something else, which worked before is wrong

I will create a babylon scene

1 Like

the table was our fault. We still had some workarounds before exporting cause of the issues. I removed them completely but we have a problem with the chair castors.

GLB Export problem | Babylon.js Playground

1 Like

Once this is merged, you should be good to go. I missed a sign when redo-ing our conversion function, which was important for managing zero-rotation cases :slight_smile:

2 Likes