View Full Version : hirerchical animation system
12-17-2000, 07:01 AM
I want to add walking people in my scence, i have the models, and the animations done with CS1.2. i want to import it, so i began to do some reaserch, i checked the ase, nfo and 3ds, but it seems pretty messy to work with them for animations.
so i have two questions. one-
what are the md2 and md3 files, what data they contain, and where can i find documantation about it?, is it a good format to use, and do i need my engine to be some kind of a q2 or q3 level renderer? i guess not, i hope.
second- when an engine claims to have hirichcal bones animation system, what does it mean? that it solves the ik system in real time, and do soft body animations? or that it already has the solved ik system, and the engine, instead of moving the vertices of the models, moves the bones, that moves the vertices? like in 3dsmax's character studio.
12-17-2000, 09:02 AM
well, that was fast i have an md2 file loader, i will work out the renderer and animation soon, i hope.
but i would still like an answare to the second question about skeletal animation.
"Bone Animation" can mean many things. Most
of the time, it just means that you have some
set of transform matrices, and each vertex
has some number of matrices affecting it with
a weight for each matrix (the sum of which
should come to one :-)
Typically, these are also attached in some
hierarchy, so if you rotate the thigbone,
the shinbone and footbone rotates with it;
then you rotate the shinbone in relation to
the (now rotated) thighbone. It's fairly
straightforward to code up reasonably
convincing animations simply using a table
of rotation amounts for various points in
time (keyframes). The advantage over whole
mesh animation is that this table is vastly
smaller than an equivalent number of mesh
keyframes, and given the right tools, it
could be easier to create, too.
12-17-2000, 12:31 PM
I think this is what matrices stacks are all about. The model view stack is implemented primarily to achieve heirerchical animation, i.e. to create spaces within spaces (I don't know if you understand what I mean). If you want, I'm implementing an object-oriented frame work (with Delphi) that makes it easy to create real-time bone animation. If you are interested, drop me a line so that I can send you the code when I finish it.
12-18-2000, 04:02 AM
well, im well familiar with ik systems, i asked if the soliving of the bones transformation is done in real time, i.e. is the file just contain the highest bones transformation, and the rest is calculated in real time?
12-18-2000, 04:45 AM
I don't know if I understood you right, but I think that every bone is stored in such files along with their own transformation. Every bone's transformation is in respect to the coordinate system of the bone to which it's attached. Speaking objects, every bone doesn't know where it exists in the global space, and is rendered while the the bone it's attached to is being rendered. i.e. every bone knows it's coordinates and orientation in the "parent" bone's space. (Quite difficult to explain, I'm sorry if you didn't understand me well).
I think most games get away with just storing
keyframes for set animations. I do not
believe they solve IK for each joint for
each model at run-time. If they did, they
would plaster it in 900 point type across the
12-18-2000, 09:34 AM
yes well, thats pretty much what i knew already, just wanted to be sure, but i know that halo, will feature real time ik solver. thats what they say. should be cool.
another question- how can i export my max files to md2 files? and does each md2 file contain only a single animation?
You'll need a MAX plug-in to export the .md2
format. I know of none like that.
.md2 files contain a number of frames (about
60 if I remember correctly) each of which has
a complete set of vertex position data. The
different animations within Quake (taunt, run,
idle etc) are then created by taking specific
frames out of these 60 in defined orders.
Any web search should show you lots of sample
code for reading .md2 files, which in turn
should explain more about the animation format.
Try www.polycount.com (http://www.polycount.com) as a starting point.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.