Sign in to follow this  
anders211

DX9 How much bones is supported for hardware skinning?

Recommended Posts

anders211    250
Hi,
I don't know why but there is number 35 in my mind. Maybe I read somewhere in the past that 35 is the limit of bones which my mesh (in X-file) can have. Could anybody confirm that it is true? Or maybe I have some code example where there was constant variable set to max number 35 and that is why this number is in my mind...I don't remember. I am asking because I am at the beginning of definition bone hierarchy in Blender for my mesh and I would like to know what maximum number may I use, for example to simulate finger movements I need at least 10 bones, so if there is really 35 bones support from DirectX I cannot waste 10 bones for fingers, I will use just 2 bones for thumbs and 2 for the rest of fingers.

Share this post


Link to post
Share on other sites
belfegor    2834

I think there is a max of 256 vertex shader constants that you can set with ver. 3.0

So you can have 256 / 4 = 64 = number of 4x4 matrices

You could try to do/attach hands separately as you might later have different pixel shaders for skin and for clothing...

 

EDIT: I cant google concrete answer:

http://msdn.microsoft.com/en-us/library/windows/desktop/bb172963%28v=vs.85%29.aspx

 

...

2. Equal to D3DCAPS9.MaxVertexShaderConst (at least 256 for vs_3_0).

...

 

I don't know what they mean by "at least", is that a guarantee minimum and can be more then this?

Edited by belfegor

Share this post


Link to post
Share on other sites
mhagain    13430

I think there is a max of 256 vertex shader constants that you can set with ver. 3.0

So you can have 256 / 4 = 64 = number of 4x4 matrices

You could try to do/attach hands separately as you might later have different pixel shaders for skin and for clothing...

 

EDIT: I cant google concrete answer:

http://msdn.microsoft.com/en-us/library/windows/desktop/bb172963%28v=vs.85%29.aspx

 

 

...

2. Equal to D3DCAPS9.MaxVertexShaderConst (at least 256 for vs_3_0).

...

 

 

I don't know what they mean by "at least", is that a guarantee minimum and can be more then this?

 

It's a guaranteed minimum and it can be more than this but in practice it won't be, even on DX10+ class hardware.  You'll also need to knock off a few for storing your MVP, any lighting or other constants, etc.

 

However, you only need a 4x3 (or 3x4 depending on your preference) matrix for skinning, so you get to have ~80 bones; a little bit better.

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