mix morphing and skeleton animation in a object to render

Started by
4 comments, last by thuong 19 years, 4 months ago
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
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.
Dustin Franklin ( circlesoft :: KBase :: Mystic GD :: ApolloNL )
Thanks alot.

I use format file is .X file.
i try morphing, it is OK after that i apply skeleton animation but do not effect.

Thanks alot.
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.
enum Bool { True, False, FileNotFound };
thanks alot

This topic is closed to new replies.

Advertisement