Weightpainting with "x-mirror" and "auto normalize" fails for center bones #29832

Closed
opened 2012-01-08 19:10:15 +01:00 by Tobias Oelgarte · 9 comments

%%%While weightpainting with "auto normalize" enabled, the x-mirror code is buggy and that in all combinations (x-mirror, topology mirror, x-mirror + topology mirror). It computes the weights wrong or ignores them entirely. I appended an example file. Just start painting and you will see that it's not mirrored as expected. My current version of blender is r43173.

Typical examples are:

  • Painting on left vertex has no influence on right vertex.
  • Sometimes it does work (not in my test scenario), but then it doesn't keep the other vertex groups (auto-normalization, not the one painted on) mirrored.

This behavior gets worse and worse with any additional changes to the weightpainting. It's really annoying and currently impossible to use. :-(

Can't it simply calculate the normalized result for one side and then copy it to the vertex from the other side? With copying i mean that .L and .R groups will be switched before transfering the values. This is simple and would always work.

%%%

%%%While weightpainting with "auto normalize" enabled, the x-mirror code is buggy and that in all combinations (x-mirror, topology mirror, x-mirror + topology mirror). It computes the weights wrong or ignores them entirely. I appended an example file. Just start painting and you will see that it's not mirrored as expected. My current version of blender is r43173. Typical examples are: * Painting on left vertex has no influence on right vertex. * Sometimes it does work (not in my test scenario), but then it doesn't keep the other vertex groups (auto-normalization, not the one painted on) mirrored. This behavior gets worse and worse with any additional changes to the weightpainting. It's really annoying and currently impossible to use. :-( Can't it simply calculate the normalized result for one side and then copy it to the vertex from the other side? With copying i mean that .L and .R groups will be switched before transfering the values. This is simple and would always work. %%%

Changed status to: 'Open'

Changed status to: 'Open'

%%%confirmed, looking into it.%%%

%%%confirmed, looking into it.%%%

%%%I appended a little bit more advanced scenario (added one left and right bone) for testing purposes.

If it works correctly you should be able to paint on "B.L" and "B.R" should show the same but mirrored result. But additionally the groups "A" and "B" should also be mirrored. The last time i painted on the left upper leg (leg-upper.L) i had to notice that the right upper leg (leg-upper.R) was mirrored correctly, but the centered group for the hips (hip) was only changed on the left side and not affected on the right side.

One more thing comes to my mind: If i paint on ".L" oder ".R" groups i noticed that the strength is at best 0.5, even so if set to 1.0. I assume that it is applied as 1.0 but then mixed with the other sides old value, resulting in the average of both groups/sides. I don't know if this is intentional, but from a user perspective the painted weight should be the reference. It sets the value and anything else has to adjust to it, while leaving the currently painted group unaffected.%%%

%%%I appended a little bit more advanced scenario (added one left and right bone) for testing purposes. If it works correctly you should be able to paint on "B.L" and "B.R" should show the same but mirrored result. But additionally the groups "A" and "B" should also be mirrored. The last time i painted on the left upper leg (leg-upper.L) i had to notice that the right upper leg (leg-upper.R) was mirrored correctly, but the centered group for the hips (hip) was only changed on the left side and not affected on the right side. One more thing comes to my mind: If i paint on ".L" oder ".R" groups i noticed that the strength is at best 0.5, even so if set to 1.0. I assume that it is applied as 1.0 but then mixed with the other sides old value, resulting in the average of both groups/sides. I don't know if this is intentional, but from a user perspective the painted weight should be the reference. It sets the value and anything else has to adjust to it, while leaving the currently painted group unaffected.%%%

%%%thanks for the second example, helpted with testing.
fixed r43342. commit log.


also fix 3 other bugs / inconsistencies

  • when mirror is enabled, center verts get themselves as the mirror vertex, wpaint code didn't check for this case, mirroring the vertex to it self (would work, but unneeded).
  • normalizing after painting would scale the active weight too, now keep the painted weight and adjust others when normalizing.
  • VP_ONLYVGROUP wasn't respected for mirror (mirror vertex group would always be added).

this changes normalize behavior - comment from code:

/* note on normalize - this used to be applied after painting and normalize all weights,

  • in some ways this is good because there is feedback where the more weights involved would
  • 'risist' so you couldn't instantly zero out other weights by painting 1.0 on the active.
  • However this gave a problem since applying mirror, then normalize both verts
  • the resulting weight wont match on both sides.
  • If this 'resisting', slower normalize is nicer, we could call
  • do_weight_paint_normalize_all() and only use...
  • do_weight_paint_normalize_all_active() when normalizing the mirror vertex.
    • campbell
      */

Setting as closed but I'd like to know if this makes mirror/normalize workflow work smoothly for you in more complicated cases.
if not will re-open.%%%

%%%thanks for the second example, helpted with testing. fixed r43342. commit log. --- also fix 3 other bugs / inconsistencies * when mirror is enabled, center verts get themselves as the mirror vertex, wpaint code didn't check for this case, mirroring the vertex to it self (would work, but unneeded). * normalizing after painting would scale the active weight too, now keep the painted weight and adjust others when normalizing. * VP_ONLYVGROUP wasn't respected for mirror (mirror vertex group would always be added). --- this changes normalize behavior - comment from code: /* note on normalize - this used to be applied after painting and normalize all weights, * in some ways this is good because there is feedback where the more weights involved would * 'risist' so you couldn't instantly zero out other weights by painting 1.0 on the active. * * However this gave a problem since applying mirror, then normalize both verts * the resulting weight wont match on both sides. * * If this 'resisting', slower normalize is nicer, we could call * do_weight_paint_normalize_all() and only use... * do_weight_paint_normalize_all_active() when normalizing the mirror vertex. * - campbell */ Setting as closed but I'd like to know if this makes mirror/normalize workflow work smoothly for you in more complicated cases. if not will re-open.%%%

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

%%%I will test it out. Since i have to paint on a stomache with lots of overlapping weight groups (even left bones have little influence on right side, etc.) . That was usually the case in which the weightpainting didn't work as expected. So i will be compiling and do a lot of testing and come back if i find things that aren't as they should be.%%%

%%%I will test it out. Since i have to paint on a stomache with lots of overlapping weight groups (even left bones have little influence on right side, etc.) . That was usually the case in which the weightpainting didn't work as expected. So i will be compiling and do a lot of testing and come back if i find things that aren't as they should be.%%%

%%%I found something. If a vertex lies at a center position (x=0.0) and you paint on a .L/.R vertex group to which this vertex not already belongs, then you will need to click/draw twice before a change is visible. Must be something like: First click assigns vertex to vertex group(s). Second click draws the actual weight to this groups.%%%

%%%I found something. If a vertex lies at a center position (x=0.0) and you paint on a .L/.R vertex group to which this vertex not already belongs, then you will need to click/draw twice before a change is visible. Must be something like: First click assigns vertex to vertex group(s). Second click draws the actual weight to this groups.%%%

%%%This seams also to affect the blur-brush on any part of the mesh. If you just hit on a vertex (neigbour of a vertex beloning to the group) it has no effect. As soon as a vertex that belongs to the group is included in the selection (brush area) it will be luring inside this region. But i don't know how the blur-brush is supposed to be working in weightpaint mode. Does it blur the vertices under the brush (average) or does it blur neighbouring vertices (like smooth in edit-mode)?%%%

%%%This seams also to affect the blur-brush on any part of the mesh. If you just hit on a vertex (neigbour of a vertex beloning to the group) it has no effect. As soon as a vertex that belongs to the group is included in the selection (brush area) it will be luring inside this region. But i don't know how the blur-brush is supposed to be working in weightpaint mode. Does it blur the vertices under the brush (average) or does it blur neighbouring vertices (like smooth in edit-mode)?%%%

%%%fix L/R double click on center verts r43382.

re: Blur brush - it finds the average value from all points under the brush and paints from it - I don;t really like this method much but it works as intended.

%%%

%%%fix L/R double click on center verts r43382. re: Blur brush - it finds the average value from all points under the brush and paints from it - I don;t really like this method much but it works as intended. %%%
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
2 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#29832
No description provided.