Jump to content
  • Advertisement
Sign in to follow this  
thuong

mix morphing and skeleton animation in a object to render

This topic is 5060 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 All, I am working on animation, i have problem is mix morphing and skeletal animation. I have head, i must animate both morphing face expression and eyeball glance. Can you help me? Thanks alot

Share this post


Link to post
Share on other sites
Advertisement
Are you using your own file format, or X files? I don't think X files can even do morphing. Anyways, if you have written your own format, it's pretty easy.

You should take care of the morphing part first. Instead of trying to do it in hardware, like you do with skinning, it has to be done in software (unless you want huge memory overhead). Just translate each vertex by the delta of your morph vertex times the percentage of the morph. Like this:

pos += (morphPos - pos) * morphPercentage;

After you have done that to all the vertices, you can go ahead an do your skeletal animation. You can easily apply multiple morph targets to the mesh at the same time, if needed be.

Share this post


Link to post
Share on other sites
You need to first apply the morphing channels, and then apply the skeletal animation. If you store vertex positions in bone space, you need to store morph targets in bone space, too.

I don't know how to do this in the D3DX library functions -- I'm doing it in my own code, and it works fine; dunno if Microsoft did the same thing. I suggest doing your own character animation code :-) Or maybe use Cal3D.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!