Weight Paint Gradient Tool doesn't consider Auto-Normalize #84651

Closed
opened 2021-01-12 19:09:13 +01:00 by Demeter Dzadik · 23 comments
Member

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: c3b68fa7b1
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
gradient_doesnt_auto_normalize.blend
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.

**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: `c3b68fa7b1` 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** [gradient_doesnt_auto_normalize.blend](https://archive.blender.org/developer/F9561315/gradient_doesnt_auto_normalize.blend) 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.
Author
Member

Added subscriber: @Mets

Added subscriber: @Mets

#78558 was marked as duplicate of this issue

#78558 was marked as duplicate of this issue
Member

Added subscriber: @filedescriptor

Added subscriber: @filedescriptor
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

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

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

Added subscriber: @ideasman42

Added subscriber: @ideasman42

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.

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.
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

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

@filedescriptor I never tried the operator `auto normalize` , could you please tell me what should be expected output for user in following case ??
Author
Member

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.

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.
Member

@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.

@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.
Author
Member

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.

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.
Member

@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 ?

@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 ?
Author
Member

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

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

Added subscriber: @LucianoMunoz

Added subscriber: @LucianoMunoz

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
Member

Sure @LucianoMunoz . I will try .

Sure @LucianoMunoz . I will try .

Added subscriber: @JerBot

Added subscriber: @JerBot

In #84651#1097867, @LucianoMunoz wrote:
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).

> In #84651#1097867, @LucianoMunoz wrote: > 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).
Pratik Borhade self-assigned this 2021-01-28 15:44:27 +01:00
Member

hey @ideasman42 and @LucianoMunoz , can you take a time and review the patch I submitted D10239 .

hey @ideasman42 and @LucianoMunoz , can you take a time and review the patch I submitted [D10239](https://archive.blender.org/developer/D10239) .

This issue was referenced by 32660201ac

This issue was referenced by 32660201acaa1138c0fed6ef3fa38f69daa3dac3

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Member
Added subscribers: @Pegacy-3, @lichtwerk, @datadieb, @zickkie, @Limarest
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
8 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#84651
No description provided.