collada-exporter icon indicating copy to clipboard operation
collada-exporter copied to clipboard

Adding some weight if the vertex has none

Open set-killer opened this issue 9 years ago • 6 comments

Fixing a warning if the vertexes has 0 weight. Issue #38

set-killer avatar Oct 22 '16 17:10 set-killer

Your fix is good (and it was in the TODO), but can a smaller (closer to 0) number than 0.001 be used?

ghost avatar Oct 23 '16 07:10 ghost

I guess it should be possible. How much smaller?

<color> 0.800000011920929 0.800000011920929 0.800000011920929 1.0 </color> This is how the color 0.8 0.8 0.8 is written into the exported files. So 7 digits after the delimiter looks fine.

Will fix it and make some tests soon.

set-killer avatar Oct 23 '16 21:10 set-killer

@set-killer The smallest possible - it means zero after all. I think you could even go 0.000000000000001.

Edit: How come it's not possible for vertexes to have zero weight?

ghost avatar Oct 24 '16 15:10 ghost

That is what i found in the documentation (page 174):

Generating default blending weights, usually with some fall-off function: 
the farther a joint is from a given vertex, the less it influences it. 
Also, if a weight is 0, the influence can be omitted. 

That should mean vertexes with weight 0 may not be influenced by the bone. In that case i am not sure that we should artificially add weight to the vertexes.

set-killer avatar Oct 24 '16 20:10 set-killer

In that case we should reconsider what #38 says. Is the "unassigned weights" error due to weights not being assigned at all or due to weights being zero (pinging @linuxfree2016)? If it's the former, I think that setting the weights to 0 is the right thing to do, according to what the documentation says.

ghost avatar Oct 25 '16 08:10 ghost

What's the status on this PR? Should I merge as is or do you want to experiment further with zero-er weights?

akien-mga avatar Mar 06 '17 10:03 akien-mga