How do you usually do animation in 3D

Member
Posts: 749
Joined: 2003.01
Post: #1
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?

Thanks

©h€ck øut µy stuƒƒ åt ragdollsoft.com
New game in development Rubber Ninjas - Mac Games Downloads
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
Use the animation facilities of your 3D modeling program, then load in the results.
Quote this message in a reply
Member
Posts: 40
Joined: 2004.12
Post: #3
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.

Cheers.

Jericho
Quote this message in a reply
Member
Posts: 749
Joined: 2003.01
Post: #4
Ok, thanks, it's quite clear.

©h€ck øut µy stuƒƒ åt ragdollsoft.com
New game in development Rubber Ninjas - Mac Games Downloads
Quote this message in a reply
Moderator
Posts: 133
Joined: 2008.05
Post: #5
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.
Quote this message in a reply
Member
Posts: 749
Joined: 2003.01
Post: #6
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

©h€ck øut µy stuƒƒ åt ragdollsoft.com
New game in development Rubber Ninjas - Mac Games Downloads
Quote this message in a reply
Member
Posts: 68
Joined: 2005.09
Post: #7
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?
Quote this message in a reply
Post Reply