Page MenuHome

Weight Paint Gradient Tool doesn't consider Auto-Normalize
Closed, ResolvedPublicTO DO


System Information
Operating system: Linux-5.4.0-7634-generic-x86_64-with-debian-bullseye-sid 64 Bits
Graphics card: GeForce RTX 2080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 440.100

Blender Version
Broken: version: 2.92.0 Alpha, branch: master, commit date: 2021-01-12 14:43, hash: rBc3b68fa7b1ca
Worked: Possibly never but I'm not sure.

Short description of error
Today I had a once in a lifetime opportunity to make use of the gradient tool in a weight painting case. And then it failed! It seems that when using the gradient tool in weight paint mode, the weights don't get normalized during the stroke.

Exact steps for others to reproduce the error

Click and drag on the sphere. Notice that the influence of Bone2 wasn't subtracted from Bone1.

This tool is extremely rarely used so this is a small issue.

Event Timeline

Falk David (filedescriptor) changed the task status from Needs Triage to Confirmed.Jan 12 2021, 7:30 PM

I can confirm the issue on 2.92.0 Alpha, branch: master, commit date: 2021-01-12 15:24, hash: rB957e292c5864.

Campbell Barton (campbellbarton) changed the subtype of this task from "Report" to "To Do".Jan 13 2021, 4:02 AM

Some background on this task.

  • The gradient tool has it's own logic for assigning vertex weights, so painting options aren't automatically available. *.
  • Supporting auto-normalize seems reasonable, and isn't a big project. See logic for OBJECT_OT_vertex_group_normalize_all.
  • We could check on supporting other paint options for gradient tool too, if this becomes a lot of work, we might consider sharing code-paths with paint code.

* we could rewrite this tool to use the same underlying logic as the weight paint tool, this is a much bigger task.

Campbell Barton (campbellbarton) triaged this task as Low priority.Jan 20 2021, 7:27 AM
Campbell Barton (campbellbarton) added projects: Restricted Project, Good First Issue.

@Falk David (filedescriptor) I never tried the operator auto normalize , could you please tell me what should be expected output for user in following case ??

After you've done the reproduction steps, you can go back to the Brush tool, and make a stroke with a very low brush strength like 0.00001. This will trigger the normalization, and the weights will be subtracted from Bone1 as expected.

This is also effectively the workaround to the issue.

@Demeter Dzadik (Mets) ,So effect of bone 2 is not getting subtracted from bone 1 if gradient tool is used ( but it subtracts when we do the same with brush/draw tool and same should be the expected output for gradient tool as well) .
what is roll of auto - normalize here ?? , No idea what exactly it does.

Auto-Normalize should make sure that all deforming weights on each individual vertex add up to 1.0 at all times. So, the influence of Bone2 is expected to be subtracted from the influence of Bone1, as a result of making sure that their combined weights add up to 1.0 on each vertex.

This is used in weight painting to make sure that the visual colors actually represent the amount of deformation coming from each bone. It is a bit like a user preference - different people will have it on or off, but one person wouldn't change it while working.

@Demeter Dzadik (Mets) , I appreciate your help .
I observed , for brush tool If auto normalize is turned on then only weight of bone2 is getting subtracted from bone1 . If auto normalize is unchecked then it won't subtract.
where for gradient tool same behaviour(weights don't get subtracted) is observed whether auto normalize of checked or unchecked .
So expected result is , when auto- normalize is checked , weights should be subtracted.
Let me know if I am proceeding in right way or not ?

Yep, that sounds correct! So it seems that the gradient tool is ignoring the auto-normalize setting.

I think none of the operators obey auto-normalize, as its only a painting setting, i would appreciate it that you could set a global auto-normalize for every function

I think none of the operators obey auto-normalize, as its only a painting setting, i would appreciate it that you could set a global auto-normalize for every function

I second this!
Would save me extra steps, or save me from relying on skin weighting addons (which usually have an auto-normalize option for their operations).