Difference between revisions of "Coordinate Systems"
(add screenshots) |
|||
Line 1: | Line 1: | ||
== Verge3D == | == Verge3D == | ||
In Verge3D we use right-handed coordinate system with Y axis pointing in the up direction. | In Verge3D we use '''right-handed''' coordinate system with the '''Y axis''' pointing in the '''up''' direction. If we place the camera so X axis points '''right''', then the Z axis will point '''forward''' (to the viewer). | ||
[[File:y_up_axis.png|640px]] | [[File:y_up_axis.png|640px]] | ||
Right-handed means when you place an imaginary screw perpendicular to both X and Y and then rotate X axis to Y axis, the screw goes in the direction of Z axis. | '''Right-handed''' means when you place an imaginary screw perpendicular to both X and Y and then rotate X axis to Y axis, the screw goes in the direction of Z axis. | ||
[[File:right_handed_rotation.png|640px]] | [[File:right_handed_rotation.png|640px]] | ||
Line 16: | Line 16: | ||
This convention is different from Verge3D, however in most cases you don't need to worry about it. When you export you scene from Blender to glTF, we automatically convert all coordinates by swapping Y/Z axes. Basically, you animate and move your objects in Blender, and these movements are handled by Verge3D properly. | This convention is different from Verge3D, however in most cases you don't need to worry about it. When you export you scene from Blender to glTF, we automatically convert all coordinates by swapping Y/Z axes. Basically, you animate and move your objects in Blender, and these movements are handled by Verge3D properly. | ||
There is one exception to this - if you're going to use JavaScript to script your apps (but not Puzzles, see below), you need to convert object coordinates from Z-up to Y-up system: | |||
X (Blender) -> X (Verge3D) | |||
Y (Blender) -> -Z (Verge3D) | |||
Z (Blender) -> Y (Verge3D) | |||
Compare screenshots above to see why Y becomes -Z. | |||
== 3ds Max == | == 3ds Max == | ||
Line 25: | Line 33: | ||
== Maya == | == Maya == | ||
By default, Autodesk Maya uses right-handed coordinate system with Y axis pointing in the up direction | By default, Autodesk Maya uses right-handed coordinate system with Y axis pointing in the up direction. | ||
[[File:y_up_axis.png|640px]] | [[File:y_up_axis.png|640px]] | ||
This convention is similar to Verge3D so there is nothing to worry about, especially if you don't set '''World Coordinate System''' to '''Z''': | |||
[[File:maya_coordinate_system.jpg]] | |||
== Puzzles == | == Puzzles == |
Revision as of 14:24, 9 September 2021
Verge3D
In Verge3D we use right-handed coordinate system with the Y axis pointing in the up direction. If we place the camera so X axis points right, then the Z axis will point forward (to the viewer).
Right-handed means when you place an imaginary screw perpendicular to both X and Y and then rotate X axis to Y axis, the screw goes in the direction of Z axis.
Blender
Blender uses right-handed coordinate system with Z axis pointing in the up direction.
This convention is different from Verge3D, however in most cases you don't need to worry about it. When you export you scene from Blender to glTF, we automatically convert all coordinates by swapping Y/Z axes. Basically, you animate and move your objects in Blender, and these movements are handled by Verge3D properly.
There is one exception to this - if you're going to use JavaScript to script your apps (but not Puzzles, see below), you need to convert object coordinates from Z-up to Y-up system:
X (Blender) -> X (Verge3D) Y (Blender) -> -Z (Verge3D) Z (Blender) -> Y (Verge3D)
Compare screenshots above to see why Y becomes -Z.
3ds Max
Autodesk 3ds Max uses right-handed coordinate system with Z axis pointing in the up direction. This convention is similar to Blender.
Maya
By default, Autodesk Maya uses right-handed coordinate system with Y axis pointing in the up direction.
This convention is similar to Verge3D so there is nothing to worry about, especially if you don't set World Coordinate System to Z:
Puzzles
In Puzzles we use coordinates depending on the loaded scene. If the scene was made in Blender or 3ds Max, we use Z-up coordinate system. If the scene was exported from Maya, we use Y-up coordinate system. That means, that in Puzzles you stick to the coordinate system of your modelling suite.
In case if you load scenes made in different modelling suites (for example if you run Verge3D Ultimate), we use the coordinate system of the scene which is loaded first.
Coordinate System Conventions
Software / Standard | Default System | Handedness | Notes |
---|---|---|---|
3ds Max | Z-up | right-handed | |
Blender | Z-up | right-handed | |
Bullet/Ammo.js | Y-up | right-handed | |
Cinema4D | Y-up | left-handed | |
DirectX | Y-up | left-handed | |
Houdini | Y-up | right-handed | |
Maya | Y-up | right-handed | configurable to Z-up right-handed |
OpenGL/WebGL/glTF | Y-up | right-handed | |
Unity | Y-up | left-handed | |
Unreal Engine | Z-up | left-handed | |
Verge3D | Y-up | right-handed |