Jan
11-25-2005, 04:32 AM
Hi there
Ok, the situation is as follows: I have a mesh and want to animate it. Up to now i have used relative rotations and translations at every bone to construct a bone-matrix, which incorporates the whole transformation at a given bone.
Since current GPUs (Radeon 9700) are not able to store enough bone-matrices for my purposes, i want to switch from matrices (16 values per bone) to quaternions and a translation vector (4 values for the quaternion, 3 for the tanslation = 7 values).
Now i need to compute my final quaternion/translation stuff to send it to the GPU. However, when using matrices i had no problem to rotate around a certain point. I first translated that point to 0, then rotated, then translated it back. All that can, of course, be put into one final matrix.
But how do i do that with quaternions??? Certainly i need to modify my translation-vector for that bone, so that after the rotation by the quaternion, the vertex then gets translated to the point where it was supposed to be rotated around.
I just can't figure out the maths, how to achieve this, at the moment.
Would be nice, if someone could enlighten me :lol:
Thanks,
Jan.
Ok, the situation is as follows: I have a mesh and want to animate it. Up to now i have used relative rotations and translations at every bone to construct a bone-matrix, which incorporates the whole transformation at a given bone.
Since current GPUs (Radeon 9700) are not able to store enough bone-matrices for my purposes, i want to switch from matrices (16 values per bone) to quaternions and a translation vector (4 values for the quaternion, 3 for the tanslation = 7 values).
Now i need to compute my final quaternion/translation stuff to send it to the GPU. However, when using matrices i had no problem to rotate around a certain point. I first translated that point to 0, then rotated, then translated it back. All that can, of course, be put into one final matrix.
But how do i do that with quaternions??? Certainly i need to modify my translation-vector for that bone, so that after the rotation by the quaternion, the vertex then gets translated to the point where it was supposed to be rotated around.
I just can't figure out the maths, how to achieve this, at the moment.
Would be nice, if someone could enlighten me :lol:
Thanks,
Jan.