mix morphing and skeleton animation in a object to render
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
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.
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.
i try morphing, it is OK after that i apply skeleton animation but do not effect.
Thanks alot.
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement