Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 

 Home / 3D Theory & Graphics / Animation Key Query Account Manager
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
Flurry

May 07, 2005, 09:39 AM

Hello Again...

I've exported a skinned mesh using the RTX exporter (this is obsecure but don't worry about that for the moment) and it has given me the following animation keys....

CONTROL_POS_BEZIER {
*CONTROL_BEZIER_POS_KEY 0 38.2311 -0.0028 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0
*CONTROL_BEZIER_POS_KEY 4800 38.2311 -0.0028 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0
}
*CONTROL_ROT_TRACK {
*CONTROL_ROT_SAMPLE 0 -0.0005 -0.9981 0.0617 0.2624
*CONTROL_ROT_SAMPLE 800 0.0011 -1.0000 0.0014 0.1802
*CONTROL_ROT_SAMPLE 1600 -0.0013 -1.0000 -0.0012 0.1081
*CONTROL_ROT_SAMPLE 2400 -0.0026 -1.0000 -0.0024 0.0333
*CONTROL_ROT_SAMPLE 3200 0.0020 1.0000 0.0018 0.0982
*CONTROL_ROT_SAMPLE 4000 -0.0002 1.0000 -0.0003 0.1523
*CONTROL_ROT_SAMPLE 4800 -0.0018 1.0000 -0.0024 0.0712
*CONTROL_ROT_SAMPLE 5600 0.0016 -1.0000 0.0022 0.0968
*CONTROL_ROT_SAMPLE 6400 -0.0003 -1.0000 -0.0002 0.1586
*CONTROL_ROT_SAMPLE 7200 -0.0023 -1.0000 -0.0021 0.0690
*CONTROL_ROT_SAMPLE 8000 0.0026 1.0000 0.0024 0.0360
*CONTROL_ROT_SAMPLE 8800 0.0013 1.0000 0.0012 0.1081
*CONTROL_ROT_SAMPLE 9600 -0.0011 1.0000 -0.0014 0.1802
}
*CONTROL_SCALE_BEZIER {
*CONTROL_BEZIER_SCALE_KEY 0 1.0000 1.0000 1.0000 0.0000 0.0000 1.0000 0.0007 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0
*CONTROL_BEZIER_SCALE_KEY 4800 1.0000 1.0000 1.0000 0.0000 0.0000 1.0000 0.0007 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0
}

I'm trying to figure out the format of these keys...I'm guessing that the rotations use quaternions and the scale is a 4*4 matrix but what about the position keys???

Sorry if this is obvious, it's just that I'd like to get this right before I start coding....

Cheers....

Flurry

 
Flurry

May 09, 2005, 09:55 AM

Hello Again

Well, I'm getting no response with my last post. I guess the RTX format is too obsecure....Maybe someone can have a educated guess at what the key frame data means???? There is nothing to be found on google!!!

Any help would be appreciated....

Thanks....

Flurry

 
MikeW

May 09, 2005, 10:39 AM

Is this of use http://rtx.cluetec.com/ ?

Mike.

 
PixelClear

May 10, 2005, 02:58 PM

Hi,

the position keys are here :
*CONTROL_BEZIER_POS_KEY 0 38.2311 -0.0028 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0
*CONTROL_BEZIER_POS_KEY 4800 38.2311 -0.0028 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0

they are given as bezier curves arcs. This is usefull because this will enable you to blend the keys more smoothly than with linear interpolation. Bezier arcs are defined by 4 control points but usually only the key points are saved (the begining and the end of the arc) and the tangents at the begining and the end of the arc. As the end point of the arc is the start point of the next arc, only one position is given in a key definition.

My first guess would be that the format is :

*CONTROL_BEZIER_POS_KEY 0

I don't know what the 0 in the end stands for.

to get the 4 control points of a bezier arc you would have t compute something like:

P0 = Key1.pos
P1 = Key1.pos + Key1.tanIn
P2 = Key2.pos + Key1.tanOut (could also be -)
P3 = Key2.pos

with Key1 being the starting key and Key2 being the ending key.

and then perform a bezier interpolation to get the intermediate position between the keys. The snippet you gave would produce a linear motion as all the tangent are the null vector.

Note that scale are also defined with bezier curves and NOT as a matrix. First it is explicitely said and then the matrix would look weird as a a scale matrix has some non-zero values only on the diagonal.

for more info on Bezier interpolation see :
http://astronomy.swin.edu.au/~pbourke/curves/bezier/

I hope this helps you.

Phil

 
Flurry

May 15, 2005, 11:29 AM

Thanks Phil

Yes this was helpful. It's starting to make sense to me know.

Thanks again....

Flurry

 
This thread contains 5 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.