Hi guys,
I implemented a Collada dae importer for my engine, and after a carefully test with the dae files provided by Collada DOM SDK, I thought the importer is correct. But when I test
the importer with data exported by ColladaMax, I found rotation sequence generated by ColladaMax is not consistent with the original 3DS Max rotation sequence, for example:
I create a bone node with keyframe animation, it’s a simple rotation about Y axis(Y_UP),
the animation source is:
<source id=“Bone01-node-ry_Bone01-node_RotY.ANGLE-output”>
<float_array id=“Bone01-node-ry_Bone01-node_RotY.ANGLE-output-array” count=“31”>-90.971 -90.8312 -90.4245 -89.7699 -88.8866 -87.7935 -86.5098 -85.0545
-83.4466 -81.7053 -79.8497 -77.8987 -75.8714 -73.7869 -71.6643 -69.5227 -67.381
-65.2584 -63.1739 -61.1467 -59.1957 -57.34 -55.5987 -53.9909 -52.5355 -51.2518
-50.1588 -49.2754 -48.6208 -48.2141 -48.0743</float_array>
<technique_common>
<accessor source="#Bone01-node-ry_Bone01-node_RotY.ANGLE-output-array" count=“31” stride=“1”>
<param name=“ANGLE” type=“float”/>
</accessor>
</technique_common>
</source>
the node is:
<node id=“Bone01-node” name=“Bone01” type=“JOINT”>
<translate>0 0 0</translate>
<rotate sid="RotZ">0 0 1 -180</rotate>
<rotate sid="RotY">0 1 0 -89.029</rotate>
<rotate sid="RotX">1 0 0 -90.0001</rotate>
<!--<rotate sid="RotZ">0 0 1 0.0</rotate>
<rotate sid="RotY">0 1 0 -90.971</rotate>
<rotate sid="RotX">1 0 0 90.0</rotate>-->
</node>
Note that the rotate channel “RotY” is the only channel with keyframe animation, now the point is, if I use the animation source data directly, the result is not correct.
Instead, if I recompute the animation data by using -(180 + animation source data), then the result is correct. But there is no extra information indicate that
“-(180 + animation source data)” is a general solution.