Skeletal animation: only 4 bone assignments per vertex?

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
Elusive Pete
Kobold
Posts: 39
Joined: Tue Jun 27, 2006 11:09 am

Skeletal animation: only 4 bone assignments per vertex?

Post by Elusive Pete »

Just ran across this in the docs. Apparently Ogre only supports 4 bone assignments per vertex? I was wondering if this is definitely still the case, or if it's changed since the docs were updated?

It's not particularly important, as 4 per vertex is usually plenty. I'm just curious.


Thanks.
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 8
Contact:

Post by haffax »

This is still the case. Else the cost-usefullness ration where too low. That said, you can recompile Ogre after changing the maximum value of bone assignments in your OgreConfig.h. I didn't try it myself yet, so I don't know if this works well, but theoretically it should. ;)
team-pantheon programmer
creators of Rastullahs Lockenpracht
User avatar
epopov
Halfling
Posts: 85
Joined: Tue Jun 10, 2003 2:57 pm
Contact:

Post by epopov »

If you do that, I think (but not sure) that you will also need to modify the vertex shader used to do hardware skeletal animation.
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67
Contact:

Post by sinbad »

It has the advantage of being able to be squished into a single 32-bit value per vertex (1 byte index per assignment) which means your vertex buffers are not bloated too much when supporting hardware skinning. And as you say, 4 bones per vertex is plenty, a lot of engines still only support 1.
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Post by xavier »

epopov wrote:If you do that, I think (but not sure) that you will also need to modify the vertex shader used to do hardware skeletal animation.
The Ogre sample materials include vertex programs for 1, 2 and 4 weights per vertex. Yes, you would have to do a separate vertex program for each weight not covered, since it is not a general technique (unless you are targeting only GPUs that support vertex program instruction branching).
Post Reply