Jump to content
  • Advertisement
Sign in to follow this  
SephireX

Same Animation For Different Skeletal Models

This topic is 2147 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

Hi. I am currently developing a game engine using Directx 11 api and I want to know if its computationally feasible to use the same animations for multiple models by calculating joint positions at runtime instead of having them pre-calculated. I have skeletal animation working using MD5 model format and I do skinning in the vertex shader. For each frame in an animation, I store a vector of joint structures with their position in model space and orientation in model space. I build an interpolated skeleton every frame and pass it as a structured buffer to the gpu where the vertex shader uses it for skinning. Animations work on different skeletal models with the same hierarchies but if their joint positions are significantly different, the animations look weird. By storing the default joint positions in joint space (before being multiplied by parent joint's orientation in model space and added to parent joint's position in model space) of a skeletal model, I could calculate their model positions and orientations each frame by multiplying their position by the parent's orientation in the animation and adding to the parent joint's model position and then multiplying the joint's orientation by parent orientation for every joint excluding the root joint. For interpolation, the orientations in joint space would be first interpolated between the orientation of the joint for the current and previous frame. Is what I'm suggesting plausible or would it be too expensive in comparison to having the joint positions pre-calculated. Sorry if I haven't explained this properly.

Share this post


Link to post
Share on other sites
Advertisement

i use a rigid body system for speed that's roughly equivalent to the bones in a skinned mesh system. i'm able to use the same animation for any model with the same basic "skeleton"  layout.  but  as you say,  they may not look right, especially if the limbs vary greatly in length.  In those cases i use as few animations as possible to cover as many models as possible. as a result, i've been able to do basic animations for about 80 different kinds of models with perhaps two dozen animations.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!