more than 100% bone weight on a vertex?

Problems building or running the engine, queries about how to use features etc.
Post Reply
Bill
Gremlin
Posts: 167
Joined: Sun Sep 26, 2004 11:50 pm
Location: Arkansas

more than 100% bone weight on a vertex?

Post by Bill »

I don't suppose you can have more than 100% bone weight on a vertex?

for example:

Code: Select all

<boneassignments>
    <vertexboneassignment vertexindex="0" boneindex="1" weight=".2" />
    <vertexboneassignment vertexindex="0" boneindex="2" weight=".8" />
    <vertexboneassignment vertexindex="0" boneindex="3" weight=".3" />
    <vertexboneassignment vertexindex="0" boneindex="4" weight=".7" />
<boneassignments>

The thing is, I can weight a vertex like this in XSI by having the vertex be part of multiple point clusters. While XSI will not let you weight a point for more than 1 in any given cluster, it doesn't care about the weights across clusters. So I could have 2 clusters with vertex 0 in them with weights of .2 and .8 in one cluster and a weights of .3 and .7 in the other.

Do you think that in this case you might just scale the weights (e.g. .1, .4, .15, .35)?
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 »

Yes, you should re-normalise the weights so that they add up to 1.0.
Bill
Gremlin
Posts: 167
Joined: Sun Sep 26, 2004 11:50 pm
Location: Arkansas

Post by Bill »

Is it alright to have a weight less than one?

Code: Select all


<boneassignments> 
    <vertexboneassignment vertexindex="0" boneindex="1" weight=".7" /> 
<boneassignments>
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 »

No. Weights must be normalised.
Bill
Gremlin
Posts: 167
Joined: Sun Sep 26, 2004 11:50 pm
Location: Arkansas

Post by Bill »

I did some tests in XSI. Normalizing the weights will not have the same effect in Ogre as the non-normalized XSI weights.

In the case of weights < 1. For example if the only weight on a vertex is .5 then it will only deflect half as far as if it had a weight of 1.

In the case of weights > 1 via multiple clusters. This is more more complex. Say you have 2 weights on a vertex of 1 and 1. It first deflects due to the weight in one cluster and then deflects again from it's new starting location due to its weight in the second cluster.

The best thing might be to have the exporter print out an error and leave it at that.
Post Reply