Skip to main content
gamedev.net
🔒 Locked

3ds keyframe data

Started by RaphaelMun 2 replies 600+ views
Original Post
RaphaelMun
RaphaelMun
Is there some clear way to interpret the keyframe data in 3ds files? It seems that no matter what I do, it doesn''t turn out right because some object''s keyframes are different from what I would expect. Like this model I have, the arms are placed correctly just by their vertex coordinates but the orientation is not correct because 3ds max mirrors it through scaling by -1, -1, -1. But then the two feet are not placed correctly by the coordinates at all and are also scaled by -1, -1, -1 while also having the same position keys. Is there a certain order in which 3ds max multiplies its transformation matrices because it''s surely doing something different from me and I haven''t been able to figure out how to interpret it data for the longest time... Someone else must''ve had this same problem at some point I would think. Thank you SO much for any help!
RaphaelMun
RaphaelMun
Thanks but that''s not quite what I''m looking for
Basically the exported 3ds model''s position keyframes start like in the center of the object but the object isn''t placed at the origin. For example, if the vertices for that object are in midair around y=28, then the position key will also be somewhere in 28.
Then the scale keys are done weirdly because i have two objects (feet), one right on top of the other with the same position key (so something like -1.2, .11, -1.4) and one of the objects have a scale of -1,-1,-1 which would mean that to place the object correctly where 3ds max does (the file works correctly imported into any 3ds max version as far as i could see), the position key can''t be applied after the scale key because the object would end up on top of each other again.
And then some of the rotation values seemed completely random.
RaphaelMun
RaphaelMun
OKAY! I''ve found some information on it finally due to a lucky find of a sample source code of the animation. Apparently the 3ds file is animated with the rotation keyframe working as if it was rotated around the origin but then placed back. TRICKY...
So what you have to do is shift the object to the origin using the negative values of the position key (which is why it''s stored in such a way! gag) and apply the rotations, then shift it back with the position key. oy...
This is for anyone else with 3ds file animation problems in the future.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.