Bone-vertex-weight question

Blitz3D Forums/Blitz3D Programming/Bone-vertex-weight question

Iamhere(Posted 2006) [#1]
I implemented boneweight colors to AnimB3D but I am not sure
if the weight can have more than 1.0, at the moment the color scale is in steps from 0.1, 0.2 ... to 1.0
but if more than 1.0 is possible I must calculate it proportionally.


Ross C(Posted 2006) [#2]
I'm not sure, but i think when you load a .b3d with bone weights greater then 1, blitz will normalise them to equal 1 again.


Iamhere(Posted 2006) [#3]
OK, thank you


jhocking(Posted 2006) [#4]
Weights greater than one cause your computer to EXPLODE! Oh noes!


Iamhere(Posted 2006) [#5]
Ah, that's th reason I must rebuild my computer , after each test run. ;)

I tell my question in an other way:
Is it a good idea to limit the input for bone-vertex-weight
to a maximum of 1.0 ?
Or is it better 2.0 or more ?


Ricky Smith(Posted 2006) [#6]
A vertex can be assigned to up to 4 different bones. The combined bone weighting for a vertex must always equal 1.0 - no more no less, e.g if a vertex is assigned to 4 bones with equal weighting each value will be 0.25.
If you use a higher value it will be reduced to 1, in Blitz3d at least - other apps may treat it differently. Results in this case will be unpredictable.
Using values higher than 1 is useless/unpredictable, so yes it is better to limit the combined value to 1.


Iamhere(Posted 2006) [#7]
Thank you


BIG BUG(Posted 2006) [#8]
Due to my personal experience it looks like that value for vertexweights isn't limited. Even negative values are valid.
There is no absolute value, one vertex will be affected relative to the value of each related bone.

The absolute weight(Range 0 to 1) gets calculated this way:
Weight / SumOfAllRelatedWeights

For example:
1. If there is only one bone, each vertex with weight > 0 will be affected by 100 %

2. Two bones containing the same weight (like 1, 0.32, 530.2 or whatever) will affect 50% each.

3. Two bones, first contains value 128, second 256:
First bone affects vertex by 33%, second one by 66%.


Ricky Smith(Posted 2006) [#9]
That may well be the case in many scenarios but you cannot be certain that every engine or "loader" will treat these values in the same way - its best to normalise the values to be sure.


Sir Gak(Posted 2006) [#10]
Umm, what's a bone weight, anyway?


Iamhere(Posted 2006) [#11]
The bone-weight is not setable by any function in Blitz3D
you can set it in Animationeditors (not in all)
and the weight regulates the moving of the vertexes by the bone.

I use now the max. weight of 1.0 for all settings of a weight in AnimB3D.
For reading from an other Editor that handles weight over 1.0 I show them in a special color.