Failure to preserve vertex groups through Geometry Nodes, new to 2.93 #88334

Closed
opened 2021-05-17 04:30:42 +02:00 by Nathan Vasil · 16 comments

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 456.71

Blender Version
Broken: version: 2.93.0 Beta, branch: master, commit date: 2021-05-14 16:16, hash: d4a36c7ad5
Worked: version: 2.92.0, branch: master, commit date: 2021-02-24 16:25, hash: 02948a2cab

Caused by a4baedea91

Short description of error
Vertex groups (even VGs existing on both objects) are not inherited through geometry nodes

Exact steps for others to reproduce the error
Here's a 2.93 beta file:
GNVGbug.blend

It contains three cubes. All three cubes contain a vertex group named "test". On the leftmost cube, labelled "Source", the top four verts are assigned at 1.0 to this vertex group. On the middle cube, labelled "Geo Nodes", no vertices are assigned to this group.

The second cube has a pretty simple geometry nodes modifier, which replaces its geometry with the geometry from Source.

The third cube, labelled "Applied", is just a duplicate of the second cube, with the geometry nodes modifier applied, to make it easier to directly inspect what the geometry node modifier did.

Even though Geo Nodes is copying the geometry from Source, and has a VG with the same name, no verts are assigned to the test vertex group. You can see this by inspecting Applied's vertices.

Expected (and working in 2.92) is for Geo Nodes and Applied to have the same vertex group assignments as Source, at least for vertex groups that are present on both objects.

Possibly, see https://developer.blender.org/rB102eff0bd45e . Conversation on this subject in the bug tracker has been a bit confusing for me, as it's not perfectly clear to what extent VG support from geo nodes is intended vs. serendipitous; that earlier commit, and @HooglyBoogly 's reply, suggest that 2.92's level of support was probably intended.

Edit, possibly interesting: if I change the geometry replacement to a join operation instead, and assign verts in Geo Nodes to the VG, no assignment survives the geometry nodes modifier, either for application of the nodes or for a following modifier (tested a vg-limited displace.)

**System Information** Operating system: Windows-10-10.0.18362-SP0 64 Bits Graphics card: GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 456.71 **Blender Version** Broken: version: 2.93.0 Beta, branch: master, commit date: 2021-05-14 16:16, hash: `d4a36c7ad5` Worked: version: 2.92.0, branch: master, commit date: 2021-02-24 16:25, hash: `02948a2cab` Caused by a4baedea91 **Short description of error** Vertex groups (even VGs existing on both objects) are not inherited through geometry nodes **Exact steps for others to reproduce the error** Here's a 2.93 beta file: [GNVGbug.blend](https://archive.blender.org/developer/F10114695/GNVGbug.blend) It contains three cubes. All three cubes contain a vertex group named "test". On the leftmost cube, labelled "Source", the top four verts are assigned at 1.0 to this vertex group. On the middle cube, labelled "Geo Nodes", no vertices are assigned to this group. The second cube has a pretty simple geometry nodes modifier, which replaces its geometry with the geometry from Source. The third cube, labelled "Applied", is just a duplicate of the second cube, with the geometry nodes modifier applied, to make it easier to directly inspect what the geometry node modifier did. Even though Geo Nodes is copying the geometry from Source, and has a VG with the same name, no verts are assigned to the test vertex group. You can see this by inspecting Applied's vertices. Expected (and working in 2.92) is for Geo Nodes and Applied to have the same vertex group assignments as Source, at least for vertex groups that are present on both objects. Possibly, see https://developer.blender.org/rB102eff0bd45e . Conversation on this subject in the bug tracker has been a bit confusing for me, as it's not perfectly clear to what extent VG support from geo nodes is intended vs. serendipitous; that earlier commit, and @HooglyBoogly 's reply, suggest that 2.92's level of support was probably intended. Edit, possibly interesting: if I change the geometry replacement to a join operation instead, and assign verts in Geo Nodes to the VG, no assignment survives the geometry nodes modifier, either for application of the nodes or for a following modifier (tested a vg-limited displace.)
Author

Added subscribers: @HooglyBoogly, @vasiln

Added subscribers: @HooglyBoogly, @vasiln

#87482 was marked as duplicate of this issue

#87482 was marked as duplicate of this issue
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

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

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

Can confirm.

Caused by a4baedea91

Also not 100% sure about intentions, but seems like an unintentional change.

Can confirm. Caused by a4baedea91 Also not 100% sure about intentions, but seems like an unintentional change.
Member

First of all, this is a nice bug report. Thanks a lot for taking the time to write a good description of the problem.

Here's what's going on:

  1. The object info node creates an instance as an optimization (rather than copying the cube mesh)
  2. When you apply the modifier, the instance is realized using the same process as if you used an attribute node in the node tree.
  3. Realizing the instance creates a generic float attribute rather than a vertex group, that's just the way geometry nodes works.
  4. Applying the modifier replaces the object's mesh (you would think this would also remove the vertex group too, replacing it with the generic attribute!)
  5. It does not! The list of vertex groups is stored on the object rather than the mesh! Why? I couldn't say!

So IMO this comes down to a backwards legacy implementation decision. I would like to refactor this, but it probably would be an API breaking change.

First of all, this is a nice bug report. Thanks a lot for taking the time to write a good description of the problem. Here's what's going on: 1. The object info node creates an instance as an optimization (rather than copying the cube mesh) 2. When you apply the modifier, the instance is realized using the same process as if you used an attribute node in the node tree. 3. Realizing the instance creates a generic float attribute rather than a vertex group, that's just the way geometry nodes works. 4. Applying the modifier replaces the object's mesh (you would think this would also remove the vertex group too, replacing it with the generic attribute!) 5. It does not! The list of vertex groups is stored on the object rather than the mesh! Why? I couldn't say! So IMO this comes down to a backwards legacy implementation decision. I would like to refactor this, but it probably would be an API breaking change.
Member

As proof, try removing the vertex group on the "Applied" object and checking the values in the spreadsheet.

As proof, try removing the vertex group on the "Applied" object and checking the values in the spreadsheet.
Author

Thanks for taking a look.

I want to share another file to demonstrate the edit I made to the original report, so it's more clear:

GNVGbug1.blend

In this file, we're now joining Source and GeoNodes via geometry nodes, and GeoNodes has some vertices assigned to "test", as well as a vg-limited displace so we can see whether those VGs survive. It's clear that the presence of the geometry nodes modifier is voiding the vertex group. Even though the GN nodes mesh now forms part of the output, via a join operation, that join operation seems to destroy any vertex group assignments from the original GeoNodes mesh.

Thanks for taking a look. I want to share another file to demonstrate the edit I made to the original report, so it's more clear: [GNVGbug1.blend](https://archive.blender.org/developer/F10123960/GNVGbug1.blend) In this file, we're now joining Source and GeoNodes via geometry nodes, and GeoNodes has some vertices assigned to "test", as well as a vg-limited displace so we can see whether those VGs survive. It's clear that the presence of the geometry nodes modifier is voiding the vertex group. Even though the GN nodes mesh now forms part of the output, via a join operation, that join operation seems to destroy any vertex group assignments from the original GeoNodes mesh.
Member

Thanks for the example again. As I said above, the join node doesn't destroy vertex groups, the output is just a regular attribute rather than a vertex group. When you have a vertex group and an attribute of the same name on a mesh, the vertex group takes priority, even if it has no values.

This didn't appear in 2.92 since the object info node didn't generate instances, geometry nodes was very different back then.

I'm going to classify this as a known issue for now, since it just comes down to the fact that vertex group names are stored on the object.

Thanks for the example again. As I said above, the join node doesn't destroy vertex groups, the output is just a regular attribute rather than a vertex group. When you have a vertex group and an attribute of the same name on a mesh, the vertex group takes priority, even if it has no values. This didn't appear in 2.92 since the object info node didn't generate instances, geometry nodes was very different back then. I'm going to classify this as a known issue for now, since it just comes down to the fact that vertex group names are stored on the object.
Author

That's a shame :( Hopefully we can eventually get some kind of attribute->VG node in that case, or a data transfer node to reconstruct VGs (in conjunction with strange transforms and anti-transforms to copy on the basis of nearest). Again, thanks for taking a look, I appreciate all the work on GN.

That's a shame :( Hopefully we can eventually get some kind of attribute->VG node in that case, or a data transfer node to reconstruct VGs (in conjunction with strange transforms and anti-transforms to copy on the basis of nearest). Again, thanks for taking a look, I appreciate all the work on GN.
Member

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke
Member

Ref #88951.

Ref #88951.
Member

Added subscribers: @SensArice, @ankitm

Added subscribers: @SensArice, @ankitm

This issue was referenced by 3b6ee8cee7

This issue was referenced by 3b6ee8cee7080af200e25e944fe30d310240e138
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Hans Goudey self-assigned this 2021-07-13 18:14:15 +02:00
Member

This should be resolved by 3b6ee8cee7

This should be resolved by 3b6ee8cee7
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
5 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#88334
No description provided.