PDA

View Full Version : Extracting Data From a Motion file



wildr3d
10-05-2007, 08:34 PM
We need to tell a client on location right now how to interpret a motion file to get the X,Y,Z and H,P,B data directly from the file. When we view the file in Wordpad we see this:

NumChannels 9
Channel 0
{ Envelope
125
Key 36.693565368652344 32.625 0 0 0 0 0 0 0
Key 36.643352508544922 32.666666666666664 0 0 0 0 -0.049880324610021703 0 0
Key 36.595573425292969 32.708333333333336 0 0 0 0 -0.047462665482072702 0 0
Key 36.549861907958984 32.75 0 0 0 0 -0.045408792053626836 0 0
Key 36.505863189697266 32.791666666666664 0 0 0 0 -0.043707336021574894 0 0
Key 36.463199615478516 32.833333333333336 0 0 0 0 -0.042381033992135816 0 0
Key 36.421501159667969 32.875 0 0 0 0 -0.041422307096569716 0 0

If anyone can help, I'd really appreciate it.

Surrealist.
10-05-2007, 11:16 PM
Channels:
0-2 is XYZ Position
3-5 is HPB
6-9 is XYZ Scale

Numbers in bold are what are numeric displayed in Layout. I would say the first group is the entire flosting point number for the motion.

Key is key frame but I can't see reference to which keyframe - yet.

Example:

NumChannels 9
Channel 0
{ Envelope
3
Key -3.1467399999999999 0 0 0 0 0 0 -2.2123886793798229 0
Key -5.3598661422729492 0.83333333333333337 0 0 0 0 1.2042550514475503 0.60212752572377515 0
Key -1.3403574228286743 1.25 0 0 0 0 4.0168308322227926 0 0
Behaviors 1 1

Going to see if I can figure out how to tell the keyframe.

Surrealist.
10-05-2007, 11:49 PM
OK to get the frame that the keyframe is on take the frame rate and multiply by the second group of numbers.


Example:

Key -3.1467399999999999 0 0 0 0 0 0 -2.2123886793798229 0
Key -5.3598661422729492 0.83333333333333337 0 0 0 0 1.2042550514475503 0.60212752572377515 0
Key -1.3403574228286743 1.25 0 0 0 0 4.0168308322227926 0 0

My scene is 24 frames per second so:

First keyframe is at 0.

Second keyframe is 24 X 0.8333333... is `19.999999 or frame 20.

Third keyframe is 24 X 1.25 is 30 - frame 30.

Not sure about the other numbers yet velocity perhaps?

BTW: HPB is not what is displayed, I figure it has got to be some math with 360 or a percentage somehow.

Also might there be a plugin that will read this data and display it in plain terms?

Lightwolf
10-06-2007, 03:49 AM
BTW: HPB is not what is displayed, I figure it has got to be some math with 360 or a percentage somehow.
It is, but in radians.

Cheers,
Mike

wildr3d
10-06-2007, 09:42 AM
Thanks for the quick replies, the person here who knows how to interpret the data had left for the weekend and we got hold of him.

Again Thanks.