Results 1 to 2 of 2

Thread: How to bake rotation angles to rotation matrix

  1. #1
    Junior Member
    Join Date
    Apr 2010
    Posts
    2

    How to bake rotation angles to rotation matrix

    Hello. I read the angles X, Y, Z of the dae file (exported from blender), and I would like to know how to bake it is a rotation matrix. Can someone help me?

    Code :
    <library_animations>
    	<animation id="bone-rotateX" name="bone-rotateX">
    	...
    	</animation>
    	<animation id="bone-rotateY" name="bone-rotateY">
    	...
    	</animation>
    	<animation id="bone-rotateZ" name="bone-rotateZ">
    	...
    	</animation>
    </library_animations>

  2. #2
    Junior Member
    Join Date
    Apr 2010
    Posts
    2

    Re: How to bake rotation angles to rotation matrix

    Can anyone help me? I have read angles (rx, ry, rz) from dae file and do the rotation matrices.

    Code :
    mat4 matrix = mat4(1.0);
    mat4 rotx = rotate(matrix, rx, vec3(1.0f, 0.0f, 0.0f));
    mat4 roty = rotate(matrix, ry, vec3(0.0f, 1.0f, 0.0f));
    mat4 rotz = rotate(matrix, rz, vec3(0.0f, 0.0f, 1.0f));
    matrix =  rotx *  roty * rotz;

    But these angles are different from those shown in the blender and to enter the rotation. These are not the Euler angles.
    Does anyone have an idea how the angles of the animation file dae, bake to rotation matrix?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •