Sign in to follow this  
fatihtolgaata

Animating mesh with multi subobjects

Recommended Posts

Hi, I want to learn how to animate the mesh that has got a lot of subsets. I am learned the skinned mesh animation from www.moon-labs.com. In skinned mesh animation, we must use one and only (unique) mesh. But My 3dsmax characters have got a lot of mesh and subsets. How can I do this?

Share this post


Link to post
Share on other sites
You render them like normal meshes with several subsets. Are you rendering with a shader or transforming vertices in software? If with a shader, you can optimize by only uploading the bone matrices that are in each subset.

By the way, you can animate and render a (seemingly) single skinned mesh with several seperate meshes. It works the same way as using seperate subsets. My skinned meshes actually work this way. It allows me to have unclothed characters and only load in the body sections that are not covered by clothing, saving video memory. You could also do crazy stuff like having injured or severed limbs [smile]

How are you loading in your meshes and how are you rendering them?

Share this post


Link to post
Share on other sites
It doesn't matter if your mesh has a lot of submeshes. The internal logic with skinning is that each vertex is assigned to a matrix. That means once you compute the matrices for the current animation, all vertices will be processed with those matrices and submeshes attached.

So, just assign the vertices appropiately and thats all!

Guimo

P.S. It IS different if the character is composed of many sections and you have a different fine for each section, but thats another issue.

Share this post


Link to post
Share on other sites
thanks for answers,
Quote:
Original post by Jiia

How are you loading in your meshes and how are you rendering them?


I don't know shader language, I am using vertex shader belonging to moon-labs Frank Luna's article about skinned-mesh. And when I am rendering the animation, I write like this:

_effect->SetTechnique(_hTech);
UINT numPasses = 0;
_effect->Begin(&numPasses, 0);
for(UINT i = 0; i < numPasses; ++i)
{
_effect->BeginPass(i);
// Draw the one and only subset.
_skinnedMesh->DrawSubset(0);
_effect->EndPass();
}
_effect->End();
I tried to change from DrawSubset(0) to DrawSubset(i), but this time, a foolish object was seemed. is there any article or book ?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this