automatic weights ignores loose parts #90340

Closed
opened 2021-07-31 20:29:50 +02:00 by shannon zachow · 4 comments

System Information
Operating system: Linux
Graphics card: RTX-2060

Blender Version
Broken: 2.93.2rc, 3.0.0alpha (built on 2021jul31), 2.92.0
Worked: ?

Short description of error
Automatic Weights ignores non-overlapping loose parts in mesh to be parented to Armature.

Exact steps for others to reproduce the error
Create a Mesh containing loose parts (islands).
Create an Armature.
ctrl-P Parent mesh to armature > with Automatic Weights
Pose Mode on Armature: move whole or bones, the loose parts are left in original position.

see attached .blend file.
test039_autoWeight.blend

system-info-2.93.2rc.txt

This is not a high-priority bug, but rather a short-coming. Trying to match weights by hand doesn't give very satisfactory results, as the loose parts drift in and out of proximity during posing, because my hand-weighting doesn't quite match auto-weights generated. Overlapping the islands totally solves it, but how is anyone supposed to diagnose that?
I report this in the hopes that it can be fixed someday, in order to save others the hours I spent trying to figure out what was going on.

Thank you for blender!!! :D

**System Information** Operating system: Linux Graphics card: RTX-2060 **Blender Version** Broken: 2.93.2rc, 3.0.0alpha (built on 2021jul31), 2.92.0 Worked: ? **Short description of error** Automatic Weights ignores non-overlapping loose parts in mesh to be parented to Armature. **Exact steps for others to reproduce the error** Create a Mesh containing loose parts (islands). Create an Armature. ctrl-P Parent mesh to armature > with Automatic Weights Pose Mode on Armature: move whole or bones, the loose parts are left in original position. see attached .blend file. [test039_autoWeight.blend](https://archive.blender.org/developer/F10250958/test039_autoWeight.blend) [system-info-2.93.2rc.txt](https://archive.blender.org/developer/F10250959/system-info-2.93.2rc.txt) This is not a high-priority bug, but rather a short-coming. Trying to match weights by hand doesn't give very satisfactory results, as the loose parts drift in and out of proximity during posing, because my hand-weighting doesn't quite match auto-weights generated. Overlapping the islands totally solves it, but how is anyone supposed to diagnose that? I report this in the hopes that it can be fixed someday, in order to save others the hours I spent trying to figure out what was going on. Thank you for blender!!! :D
Author

Added subscriber: @shannonz

Added subscriber: @shannonz
Member

Added subscribers: @brecht, @lichtwerk

Added subscribers: @brecht, @lichtwerk
Member

This is essentially the same as #45493 (Bone Heat weighting: failed (due to none of the vertices in an island being visible to any bones)).

So if the bone heat algorithm cannot "see" any vertex in an island, the algo might fail, as soon as one vertex is visible (in this case here: overlapping) all is fine.

Here is the workaround (which is working fine in your file) and a more detailed explanation:

In #45493#322764, @brecht wrote:
A workaround is to split the mesh and then bind the weights. Enter editmode on the mesh, L linked select the body, P to separate into a separate mesh, compute the weights for the two meshes separately, and Ctrl + J join them again.

It seems there is some issue with the teeth where they are not visible to any bone, which is somehow messing things up.

In #45493#322765, @brecht wrote:
I think the problem is that the algorithm does not explicitly handle connected components separately. They are all handled in a single matrix, and that's usually fine. But if none of the vertices in a connected component are visible to any bones, then the matrix will not be invertible, and the solve will fail for all components.

The solution would be to detect such cases, and then disable visibility tests for such components, or somehow get the weights from nearby components. Switching the code to use BMesh instead of Mesh would make that easier.

Will merge this into #45493 though, thx reporting!

This is essentially the same as #45493 (Bone Heat weighting: failed (due to none of the vertices in an island being visible to any bones)). So if the bone heat algorithm cannot "see" any vertex in an island, the algo might fail, as soon as one vertex is visible (in this case here: overlapping) all is fine. Here is the workaround (which is working fine in your file) and a more detailed explanation: > In #45493#322764, @brecht wrote: > A workaround is to split the mesh and then bind the weights. Enter editmode on the mesh, `L` linked select the body, `P` to separate into a separate mesh, compute the weights for the two meshes separately, and `Ctrl + J` join them again. > > It seems there is some issue with the teeth where they are not visible to any bone, which is somehow messing things up. > In #45493#322765, @brecht wrote: > I think the problem is that the algorithm does not explicitly handle connected components separately. They are all handled in a single matrix, and that's usually fine. But if none of the vertices in a connected component are visible to any bones, then the matrix will not be invertible, and the solve will fail for all components. > > The solution would be to detect such cases, and then disable visibility tests for such components, or somehow get the weights from nearby components. Switching the code to use BMesh instead of Mesh would make that easier. Will merge this into #45493 though, thx reporting!
Member

Closed as duplicate of #45493

Closed as duplicate of #45493
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#90340
No description provided.