Well, i didn''t particularly look at any papers- i just looked at what examples i had before me. what always happens is that an artist attaches each of the vertices in a mesh to a heirarchal skeleton. the bones in that skeleton can then be animated using rotations, and any attached vertices follow the bones to which they are attached, which make movement look more natural than other methods (like vertex interpolation).
each bone can be stored with a local coordinate system relative to its parent, so the natural inclination is to store each attached vertex in these local coordinates, and then subsequently transform down the heirarchy (into a buffer) when you want to put the entire skeleton in world coordinates. Then it becomes a matter of transforming the vertex by the corresponding buffer''s transformation matrix.
i import .3ds files, one for the mesh, one for the skeleton, one for each animation, and save them all in my own intermediate ascii text formats. I made a utility to attach mesh vertices to a skeleton. (one modification that my system allows is that a skeleton doesnt have to have just one root...) the only problem is in the vertex attaching process, which has to be done pretty tediously- it''s not that bad, but it takes some time for a 2000 polygon model.
i dont know if i''ll need to or if i''ll be able to make vertices attached to an interpolation between two bones, leaving (hopefully) smooth joints. The shoulder joint is particularly problematic.
the animations are stored as two tracks, one for rotation, the other for translation. the rotation track is the interesting one, and it is composed of keyframes of angle axis rotations. they can be interpolated by simply interpolating the angle. an optimization i''ve used is in the importing process to calculate and store the transformation matrix that results after each key, so only one multiplication is needed- the previous key''s matrix and the current angle-axis rotation matrix- rather than applying all previous transformations.
whoo doggy. there''s a lot of work and a lot of math involved in programming this stuff. i haven''t even started on actually making the models/animations for the game, all i have are test graphics.
How do adventure game engines work?
Nice! I was also thinking of following your approach.But,before I even do that I think I''m going to do alot more research and try to figure out how 3DSMAX does it.Thanx for the ideas though! I''m kinda curious to see how your game turns out.Same goes for the rest of you working on adventure games!
Just look at this site, go to the Tutorials page, and hit "ADVENTURE GAME TUTORIAL". Really.
Unlimited Realities
I love this site...
Unlimited Realities
I love this site...
RIP GameDev.net: launched 2 unusably-broken forum engines in as many years, and now has ceased operating as a forum at all, happy to remain naught but an advertising platform with an attached social media presense, headed by a staff who by their own admission have no idea what their userbase wants or expects.Here's to the good times; shame they exist in the past.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement