PDA

View Full Version : Need help on ANIM format


Fatduck
12th Apr 2007, 09:01 PM
Hi everyone,
I am new to sim2 modding and want to make my own tool to create/hack animation! Because I can't use .net!?

From wiki, I know 90% of the anim format, but run into trouble in real animation data, (part 4 Transforms). I don't understand how the actual rotation/transform value stored!

All I know is that each keyframe data is actually 6 bytes long.

WORD(2bytes) for frame time: eg 0, 2500, 5000, 10000
WORD(2bytes) ??: rotation/transform data but how to decode this?
WORD(2bytes) :Optional data (always 0)??

Could anyone kindly explain them to me please!
Many Thanks.

WesHowe
12th Apr 2007, 11:22 PM
The keyframe data in most of the files is 6 bytes long, but it could vary from 2 bytes to 8 bytes per bone, per dimension, per frame. The most common layout has the timecode (or'd with 0x8000, I think) in the first 2 bytes (really short ints). The translation or rotation data is the second (first optional) short, and the third is just not used, or at least no one here knows what purpose it serves.

The data short is converted from a short to a float and divided by 1,000 to obtain the value to be used in animation.

The wiki writeup and the observations in the animation editor thread posts are essentially everything publicly known about the ANIM format.

<* Wes *>