Animating mesh with multi subobjects
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?
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?
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?
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.
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.
thanks for answers,
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 ?
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 ?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement