Vertex weights visualization change

Hi guys,

I’m working for a client that uses Blender to feed models and data into a custom physics engine, and we are having some issues with the new vertex weight visualization in 2.80/2.81.

We use vertex weights as connection markers and the new falloff makes it impossible to see accurately where the weights change. We need to visualize the weights without falloff, if there is no falloff. On the other hand, we also use weights to define a material’s hardness property and in this case we do need to see the falloff.

Custom colors for weights can’t solve this since we need both the falloff and a sharp separation between weights. So making a sharp custom ramp would make us lose falloffs when we need them. This image explains it better:

Is there some way to replicate the way this worked in 2.79? If not, would you guys be open
to patches that bring back this functionality? What do you think?


Weight painting with verification by eye is not the correct tool to create weights that must be 0 or 1. For one, it is impossible to distinguish 1 and 0.999 by eye. That is best achieved by edit mode selection with assignment to weight group, or by using the Quantize operator with one step to actively round the weights to only 0 or 1.

Hey, thanks for replying but we don’t use this as a visualization tool not to set weights. The goal is to visualize the weights to confirm and find issues. That’s why we need to see the difference between 0 and 1 clearly

If you know all weights are either 0 or 1, then you know that any color that isn’t red or blue is between vertices and can be ignored. In fact, the green contour would form the boundary outline located precisely between vertices.

Vertex weights are not able to give you “no falloff”.

The weight is distributed from the main vertex to the other, so there is a fallof because the is nothing between those vertices that change the value, if you want a sharp line is like with modeling, you would need to group of edges, so it’s not a visualization thing, is that you cannot have what you want, at least not correctly since if you go with a sharp gradient, you would have error in one place or the other, you could have red values up to a vértice that is 0 or directly blue from a vértice that is 1.

If I understood correctly what you want is not possible, the only way would be to separate parts of the mesh :slight_smile:

You should make a custom Python tool for this. Or maybe make a material that does this with vertex groups instead. It’s pretty trivial to convert the two back and forth.

I made a script a while back that can turn weight groups into vertex colors: You could convert each group this way and make a custom shader that visualizes them however you want.

1 Like

Yeah, this is right. Vertex groups are stored (obviously) on the vertices, so there can’t be a sharp line. Vertex colors are stored in face corners, so this could be done with vertex colors. The script I mentioned above will just convert them directly, but it could be modified to consider the faces and automatically mask to make sharp lines.

1 Like

Yep, and I think that it could be a more adequate way than using weight painting, si ce weight painting is not though for visualization but for weight painting indeed :slight_smile:

It could be done by an addon probably

a sharp line is not what is required. in 2.79 there was never a falloff between a non weighted vertex and a weighted one, so the visualization is not correct in 2.8 since it can also have vertices without a weight that will produce a falloff. i would even go as far as saying this is a bug and does not properly represent what is configured.

and in 2.7 it looks like this if there are no active vertex weights which makes a lot more sense