Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double __root__ on export as glb a gltf object #6349

Closed
Bulisor opened this issue May 15, 2019 · 2 comments
Closed

Double __root__ on export as glb a gltf object #6349

Bulisor opened this issue May 15, 2019 · 2 comments
Assignees
Milestone

Comments

@Bulisor
Copy link

@Bulisor Bulisor commented May 15, 2019

Discusion here:
https://forum.babylonjs.com/t/double-root-when-saving-out-glb-from-sandbox/2608

@Drigax
Copy link
Collaborator

@Drigax Drigax commented Feb 10, 2020

I initially looked at this change: https://github.com/BabylonJS/Babylon.js/pull/7344/files
Reverted via this PR

This change added some extra checking of nodes to be exported and inverted between coordinate systems, and appears to work properly for Left Handed coordinate systems. Unfortunately, we detect whether or not a node is used as a coordnate system transformation via isNodeConvertingToLeftHanded() this particular line seems somewhat suspect:
https://github.com/BabylonJS/Babylon.js/pull/7344/files#diff-27fc9e54be12c9c3784cf3eb48540e70R1315

In that it works when we use a left handed coordinate system, however, round tripped right handed scenes would still have an encapsulating root node, but would have an Identity transform matrix:
image

I'll add some additional logic to use the proper transform matrix depending on the scene handedness.

@Drigax
Copy link
Collaborator

@Drigax Drigax commented Feb 10, 2020

In addition, #7377 also indicates some issue with the encapsulating node used to represent punctual lights in glTF, the logic is similar, we need to prevent duplication of a light's node as well:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants