View Full Version : Inverted Z coordinate exporting collada

02-10-2010, 06:08 AM
Using the following modeller object (in Lightwave 9.6):
Create a box: Width=2, Height=1, Depth=2. X=1, Y=0.5, Z=1
Then export the object as collada.

"Mesh_Object_positions_array" contains:

2 0 0
2 0 -2
0 0 -2
0 1 0
2 1 0
2 1 -2
0 1 -2

I would have expected the Z coordinate to be +2, not -2.

Can anybody confirm if it is lightwave that is at fault?

Reading the Collada 1.4 Specification:
( up_axis=Y_UP in the collada file)

The up_axis elementís values have the following meanings:
Value Right Axis Up Axis In Axis
X-UP Negative y Positive x Positive z
Y_UP Positive x Positive y Positive z
Z_UP Positive x Positive z Negative y

02-10-2010, 07:25 AM
Ah, I think lightwave is correct.

As far as I know, Lightwave uses the "left handed" coordinate system

Collada uses the "right handed" coordinate system

Thus, the easiest way to convert between the two was to invert the Z axis coordinate