THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 03/06/2003 at 17:20, xxxxxxxx wrote:
Cinema 4D Version: 8.100
Platform: Windows ; Mac OSX ;
Language(s) : C++ ;
I'm dynamically creating vertex maps to be weight maps with bones and I'm getting puzzling results.
I create a blend zone by defining points on two different vertex maps and normalize the weights so that the sum of all weight map entries for any point is 1.0. Each bone's weight map is assigned at 100% via restriction tag.
If I don't overlap, and use only value 1.0, moving the root bone moves the entire model cleanly. With the overlapping weight maps, even though the weights add to 1.0, all the multi-mapped points are left streaming behind when the model is moved.
To keep things together, I have to set each point to 1.0 on at least one weight map.
Does anyone know how the rules on how C4D accumulates vertex weigths? I haven't been able to find any info on it.
On 07/06/2003 at 08:12, xxxxxxxx wrote:
As far as I can tell only non-zero map entries affect a point, and then a non-weigthed mean is taken between those results. So if you have two bones that are restricted to two overlapping maps it matter greatly if one of the maps is 0.0001 or 0.0. In the former case it's (0.0001*a + 1.0*b)/2 and in the latter it's simply 1.0*b, where a and b are the displacements from each bone.
On 07/06/2003 at 09:29, xxxxxxxx wrote:
That doesn't quite match what I'm seeing. If two maps each have .5 then the avarage of .5 looks right - the point moves at only half the rate of the bone and is smeared behind. But if one is 1.0 and the other is .1, I don't see a net .55 with the point left behind - instead it tracks perfectly with the bone. So any point with a 1.0 on one map tracks correctly, regardless of what is one the other map, but any point with less then 1.0 (.9 and .9) on each map does not track like I expect.
To get around this, I've normalized the values for each point across all maps it is on to make the highest value 1.0. To export the model, I have to reverse this back to a sum of 1.0 or the weight maps won't work on other systems.
I"m still not clear on how it applies the weights, as the results don't match any scenario I have come up with to test, but I'll keep experimenting.