Treat glTF model space as a separate coordinate system #6696
timothyqiu
started this conversation in
3D
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I know this is too late for the current state of Godot. I'm opening this discussion just to record the problem and what I think is technically correct.
The relative position of a Right View camera is unexpected
In Godot, the right view camera is to the left of the front view camera (front view faces +Z and right view faces -X).
In Blender, the right view camera is to the right of the front view camera (front view faces -Y and right view faces -X).
Undoubtedly, Godot should follow industry standards: the name of a view represents the viewing direction relative to the front view, rather than the side of a model. The right view should show the left side of a character.
Front view of a model is different between Godot and Blender
In Blender, the front view shows the face of a model to be exported.
In Godot, the front view shows the butt of an imported model.
This is also the root cause of
look_at()
not able to point an imported model to the right direction. The method uses -Z as forward, so it looks at using the butt.The main reason for this was that Godot uses +Y as up, -Z as forward, and +X as right. And in glTF:
So a glTF model imported as-is is effectively rotated 180 degrees in a Godot scene, showing its butt in the front view.
For example, point
(1, 0, 1)
in a glTF file is located on the left front of the model. The point is imported as(1, 0, 1)
as-is, so it's now on the right rear of the model.Godot and glTF use different coordinate systems although they are both right-handed. Transformation should happen during the import process.
However, the fact is, many existing systems are built upon the fact that glTF models are imported as-is and assumes Godot and glTF share the same coordinate system. It requires lots of effort to do thing the technically correct way.
So it's not practical to fix the issue this way.
Footnotes
https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#coordinate-system-and-units ↩
Beta Was this translation helpful? Give feedback.
All reactions