How do you usually do animation in 3D - Printable Version
+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Game Programming Fundamentals (/forum-7.html)
+--- Thread: How do you usually do animation in 3D (/thread-4728.html)
How do you usually do animation in 3D - Najdorf - Dec 4, 2005 04:42 PM
Say you want to have an animated model: with ragdoll physics you just calculate the pushes and pulls to every piece of the body in real time and move it accordingly.
But what about "usually" (i.e. non-ragdoll)? Would you store the whole animation in a file? How? Would you specify the position of every piece of the body for every frame? or would you specify a law of motion for each part?
How do you usually do animation in 3D - OneSadCookie - Dec 4, 2005 05:30 PM
Use the animation facilities of your 3D modeling program, then load in the results.
How do you usually do animation in 3D - seven - Dec 4, 2005 05:58 PM
Well said OSC.
Najdorf, there are a couple of ways to store animation information and you mentioned some of them, though you may not know you did.
Typically, a person models and animates the model in a 3D modeling package, either thru inverse kinematics or keyframing or some combination of thereof. Next the data is saved.
A commonly used frame-based format is .md2 which stores each frame's vertex data in a file, and is not too difficult to load.
The other format would store the bones of the model in the file and use that information to position vertices based on bone rotations and translations. Maybe someone who has experience with a skeleton-based format could provide more input.
How do you usually do animation in 3D - Najdorf - Dec 4, 2005 06:34 PM
Ok, thanks, it's quite clear.
How do you usually do animation in 3D - longjumper - Dec 4, 2005 09:22 PM
To do some simple animation, you can construct objects by making different movable parts of them have their own rotation/position relative to what part they are connected to. Then have a vector of "keyframes" for each piece, so for example, if you wanted an person's head to rotate back and forth on the head, you would have a set of keyframes that would keep the same position(head on top of the torso) and rotate from 0 degrees to -45 degrees, to 0 degrees, to 45 degrees, to 0 degrees again, specifying a time you definetly want these events to take place. For example, you want the head to be at -45 degrees at t = 1, and 45 degrees at t = 3. Using interpolation for the times in between there, you could provide smooth animation based on the change in time. It's a quick and easy way to do it, and you could write your own format to store that for the models. This is especially easy with a format like .obj, where you can add whatever you want to it relatively easily since it is a text format.
How do you usually do animation in 3D - Najdorf - Dec 5, 2005 05:48 PM
Quote:For example, you want the head to be at -45 degrees at t = 1, and 45 degrees at t = 3. Using interpolation for the times in between there, you could provide smooth animation based on the change in time
Ok, that's an idea too, thx
How do you usually do animation in 3D - dfmoore - Dec 20, 2005 07:13 PM
in terms of efficiency, what are the trade offs with multiple "target" meshes that get interpolated between, and a skeletal system that adjusts the geometry? Putting aside that the target mesh idea would be more limiting in terms of motion, how much faster/slower would these sorts of calculation be?