Euler Conversion

Animation tools, character animation, non linear animation

Moderators: jesterKing, stiv

Posts: 20
Joined: Fri Aug 22, 2003 3:33 am

Euler Conversion

Postby breakin » Tue Mar 30, 2004 1:59 pm

Blender uses one track per component of the rotation [euler angel x-,y-,z-axis].

I'd like to have one vector-track for all three components, ie three euler-angel per key. For linear and constant it's easy to interpolate and insert until all three tracks have keys at the same places/frames and the three interpolated splines are identical, for bezier OTOH it's somewhat harder and requires some more keys. I guess it's possible though (?) Now I wonder if it's worth it..

The reason I want to do this is because if I do so I can do euler->quat-conversion. What does blender uses internally for interpolation? Euler or quat? Will my realtime player perform differently if I choose to stick with euler?

Another reason for getting quat's is that I can get rid of my last dependencies of blender coordinat-frame altogether as I can convert to quat to any coordinate frame (ie the order of applying the rotations dissapears).

Posts: 215
Joined: Wed Oct 16, 2002 12:06 am

Postby Hos » Thu Apr 01, 2004 6:30 am

I think for regular objects, blender uses the euler angles,
and for actions it uses quaternions.

The interpolation code is in eval_icu() here: ... cvs-markup

There are some functions for euler <==> quat conversion here
(QuatToEul() and EulToQuat()): ... cvs-markup


Posts: 20
Joined: Fri Aug 22, 2003 3:33 am

Postby breakin » Fri Apr 02, 2004 1:12 pm

Okey, then I could stick with euler for objects. I'd need quat's for armature though so I might as well convert rotations into quat as well. Problem here is that the tracks has keys at different times, once I've gotten a singel euler-triple for each key it's easy to do euler->quat. Guess I should draw som figures and figure out how to insert keys in the tracks in order to make positon/euler/scale into vector-tracks (instead of float tracks). Once it's vector track I can apply my blender->myworld-matrix on them so I get all coordinate-frames correct (got them ok already but the player looks somewhat funny ;)). Thanks for the help!

Return to “Animation”

Who is online

Users browsing this forum: No registered users and 0 guests