• Advertisement
Sign in to follow this  

Animations with rigid bodies

This topic is 3936 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Since I've never dabbled into the realms of animation I'm thinking of spending quite some time on doing an animation system combined with rigid bodies. I've thought about some concepts and I've been trying to figure out how animations really are handled. I'd love to get some feedback at my current perception of how animations work. First of all the model is rigged with bones and joints. Every vertex are then weighted for every bone in order to decide how much every bone should affect the given vertex. In order to create an animation the artists then creates key frames by moving the bones around, after which the artists needs to define more in detail how the interpolation between these key frames are to be handled. To animate the model I would have to keep track of how long into the animation the model is, and then calculate how the bones should be transformed looking at the key frames and the interpolation curves. If this is the case, then I'm thinking I would need this transformation to be relative to its last position and not absolute from its default pose. This is due to the fact that I want the bones to be affected by physic objects, such as bullets. If the transformation is relative and only try to move the bones closer to the bones ideal position in the animation this would blend the bone back in sync with the animation, or at least this is how I'm figuring it should work hehe. One large problem which I think would be to large of a nut to crack is of course that if you dislocate bones by a lot there will be resulting animations that looks very unnatural and defy the laws of gravity. As long as I don't use to large of a force on the bodies I don't think this would be a problem. After this is done I would have to transform all the vertices depending on the bones new transforms, taking the weighting into account for every bone. I'm guessing this part should be done entirely on the GPU with a vertex shader for a beefy performance gain. I'd love to get some pointers and criticism before I begin working!

Share this post


Link to post
Share on other sites
Advertisement
The animation will generally be absolute from the "bind pose" of the model. Basically when you are applying skinning weights in a 3D package, you line up the model and skeleton in what is called a bind pose. Generally its a T stance with the legs slightly apart and the arms straight out at the sides. This makes it easier to apply weights, and get a predictable result. Try looking into the FBX format for animation, it is fast becoming the industry standard, and the file SDK is free.
So when you want to render your model in you game, first you calculate the skeleton at the current time in the animation, by interpolating across keyframes if you are using keyframe animation or taking the data stright if you are using per frame data, then you take the static model in its bind pose, with the skin weights and apply the calculated skeleton to it in you vertex program (matrix palette skinning I think is the technique).
HTH.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement