Page 1 of 1
what is the maximum number of bones per vertex?
Posted: Wed May 25, 2005 11:27 am
by bugshake
when skinning, in 3dsmax, you assign bones to vertices in varying weights.
I noticed with my model, hardware skinning produces strange behaviour. Specificly, vertices not participating in the movement of certain bones anymore.
i'm assuming this is because of a hardware maximum
my question is: what is this maximum? and if it depends on the hardware, what is a reasonable amount? 2? 4?
thanks
Posted: Wed May 25, 2005 11:54 am
by walaber
the maximum is 4 bones per vertex.
Posted: Wed May 25, 2005 1:46 pm
by sinbad
If it's hardware skinning that's not working, it's the max number of bones, not the bones per vertex. vs_1_1 only has enough constant space for about 24 bones, if your skeleton has more you'll have to use vs_2_0 or split up the skeleton.
Posted: Wed May 25, 2005 4:03 pm
by bugshake
4 bones per vertex? I've got a max of three but I'm also blending animations, so maybe then it can get higher?
I didn't know about the 24 bones limit, thanks. i've got 23 however, so that's not the problem.
thanks for the answers, I'm doing a new model at this moment with max 2 bones/vertex, if it turns out I have the same problem there, I'll upload this model.
BTW, i'm using the exact same material as Examples/Robot, but with a different texture
edit:

just realized this shader is called 'HardwareSkinningOneWeight' which might be an indication

so I guess I might need to make and use a 'HardwareSkinningTwoWeights' script... right?
Posted: Wed May 25, 2005 4:22 pm
by :wumpus:
Or just use the fourweights one.
Posted: Wed May 25, 2005 4:41 pm
by bugshake
How do I use the fourweights one? I tried simply replacing the name of the shader:
Code: Select all
vertex_program_ref Ogre/HardwareSkinningFourWeights
{
param_named_auto worldMatrix3x4Array[0] world_matrix_array_3x4
param_named_auto viewProjectionMatrix viewproj_matrix
param_named_auto lightPos[0] light_position 0
param_named_auto lightPos[1] light_position 1
param_named_auto lightDiffuseColour[0] light_diffuse_colour 0
param_named_auto lightDiffuseColour[1] light_diffuse_colour 1
param_named_auto ambient ambient_light_colour
}
but then i get a different problem. I think the other glitch is gone now, but I get 2 new strange yet rather funny things:
- the first position of the animation is blent in 50% all the time... (in this case the position is the character crouching to start a jump, with this 50% blent in, it seems he walks like a really old guy)
- the fog distance is different (closer) for the character, so when far away, the character appears as a fog-colored silouette in not-quite-so-foggy surroundings
I tried removing the "shadow_caster_vertex_program_ref HardwareSkinningOneWeightShadowCaster" bit, but with no effect.
I would really appreciate if you have more clues