feedback loops occuring with Geonode Modifier when working with vertex-group attr #84757

Closed
opened 2021-01-15 21:34:09 +01:00 by DorianB · 11 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 452.06

Blender Version
Broken: version: 2.92.0 Alpha, branch: master, commit date: 2021-01-12 20:03, hash: 719bea0d6d

Short description of error
In this simple example (file available below) I created a vertex group that i used as an attr in a geonode modifier then remove some weight using an attr math node, at first glance everything seem to work fine. But on some condition (entering a field then hit esc, or evaluating the depsgraph with python or else?) the node keep re-evaluating itself, this can be repeated indefinitely.

So the attr workflow seems to re-evaluate the attr it produces (feedback loop) This is quite an unexpected workflow-breaking behavior, it's the first time that a modifier re-evaluate something that it produces (for example the vgedit modifier only evaluate the vertex-group initially, and don't re-evaluate the resulting vertex-group) Somehow this is not making any crashes as the re-evaluation is not continuous. blender is re-evaluating only on some conditions, not sure why and when this re-evaluation occurs?

this is significantly breaking the attr workflow.
here's a gif illustrating the issue

2e5156f3fb2b388f148118bf94764bd57ebbaa18.gif

Exact steps for others to reproduce the error
Blank file:

  • Create a new vertex group on a subdivided plane and paint something
  • Create a new geonode modifier, and add a node that will change the vertex-group weight.
  • Evaluating the mesh with his modifiers using python or entering and quitting the B arg of the math node will trigger a re-evaluation of the node. this re-evaluation may be triggered by some other events.

Use file below:

  • just enter in the edition of the "B" FloatProperty of the AttributeMath node then hit ESC witouth changing any values, this is one way to trigger a re-evaluation of the node resulting in a change of this vertex-group
    feedback_loop.blend

note that entering edit mode will reset the weight

**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 452.06 **Blender Version** Broken: version: 2.92.0 Alpha, branch: master, commit date: 2021-01-12 20:03, hash: `719bea0d6d` **Short description of error** In this simple example (file available below) I created a vertex group that i used as an attr in a geonode modifier then remove some weight using an attr math node, at first glance everything seem to work fine. But on some condition (entering a field then hit esc, or evaluating the depsgraph with python or else?) the node keep re-evaluating itself, this can be repeated indefinitely. So the **attr workflow seems to re-evaluate the attr it produces (feedback loop)** This is quite an unexpected workflow-breaking behavior, it's the first time that a modifier re-evaluate something that it produces (for example the vgedit modifier only evaluate the vertex-group initially, and don't re-evaluate the resulting vertex-group) Somehow this is not making any crashes as the re-evaluation is not continuous. blender is re-evaluating only on some conditions, not sure why and when this re-evaluation occurs? this is significantly breaking the attr workflow. here's a gif illustrating the issue ![2e5156f3fb2b388f148118bf94764bd57ebbaa18.gif](https://archive.blender.org/developer/F9580942/2e5156f3fb2b388f148118bf94764bd57ebbaa18.gif) **Exact steps for others to reproduce the error** Blank file: - Create a new vertex group on a subdivided plane and paint something - Create a new geonode modifier, and add a node that will change the vertex-group weight. - Evaluating the mesh with his modifiers using python or entering and quitting the B arg of the math node will trigger a re-evaluation of the node. this re-evaluation may be triggered by some other events. Use file below: - just enter in the edition of the "B" FloatProperty of the AttributeMath node then hit ESC witouth changing any values, this is one way to trigger a re-evaluation of the node resulting in a change of this vertex-group [feedback_loop.blend](https://archive.blender.org/developer/F9580897/feedback_loop.blend) note that entering edit mode will reset the weight
Author

Added subscriber: @dodododorian

Added subscriber: @dodododorian
DorianB changed title from Geonode Modifier is creating feedback loops when changing vertex-groups (possibily with other attr?) to feedback loops occuring with Geonode Modifier when working with vertex-group attr 2021-01-15 22:03:29 +01:00

Added subscribers: @JulianEisel, @rjg

Added subscribers: @JulianEisel, @rjg

I'm not familiar with the design decision here so this is more of an observation/comment than triaging.

@JacquesLucke CC

@dodododorian I can see that this might be an issue if this would be a continuous loop or cause unexpected internal state. However, as far as I can tell, this is not the case and since you are deliberately using the same attribute for input and output, I'm not entirely sure what behavior you're expecting? The way is see this, the implementation could either update the attribute that it is using as an input for subsequent evaluation or refuse to write to an attribute that it uses as input*. Evaluating it only once doesn't seem like a plausible solution.

(*) Edit: Always starting the evaluation with the original value would make sense I suppose.

The current behavior does seem to match the description in the manual that states:

Result
Name of the attribute where the computed result it stored. A new attribute with that name is added if it does not exist yet. If it does exist, the values of the existing attribute are overridden.

I'm not familiar with the design decision here so this is more of an observation/comment than triaging. @JacquesLucke CC @dodododorian I can see that this might be an issue if this would be a continuous loop or cause unexpected internal state. However, as far as I can tell, this is not the case and since you are deliberately using the same attribute for input and output, ~~I'm not entirely sure what behavior you're expecting~~? The way is see this, the implementation could either update the attribute that it is using as an input for subsequent evaluation or refuse to write to an attribute that it uses as input*. Evaluating it only once doesn't seem like a plausible solution. (*) Edit: Always starting the evaluation with the original value would make sense I suppose. The current behavior does seem to match the description in the manual that states: > **Result** > Name of the attribute where the computed result it stored. A new attribute with that name is added if it does not exist yet. If it does exist, the **values of the existing attribute are overridden.**

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke

Removed subscriber: @JulianEisel

Removed subscriber: @JulianEisel
Member

I haven't looked at the file yet, but I'm pretty sure this is a bug. We do not support any kind of feedback loops yet.
My guess is that we forgot to copy a referenced custom data layer in the attribute system. Will check it in more detail a bit later.

I haven't looked at the file yet, but I'm pretty sure this is a bug. We do not support any kind of feedback loops yet. My guess is that we forgot to copy a referenced custom data layer in the attribute system. Will check it in more detail a bit later.
Author

and since you are deliberately using the same attribute for input and output

The goal of this example is to do operations on vertex groups, similar to modifiers like VG-edit or VG-proximity (input is also output in these cases).
the geometry node is a modifier like any other. no current modifiers can evaluate the content it creates, only evaluates what's above of them on the stack
If this is by design, there's a strong contradiction with current established modifiers behaviors

> and since you are deliberately using the same attribute for input and output > The goal of this example is to do operations on vertex groups, similar to modifiers like VG-edit or VG-proximity (input is also output in these cases). the geometry node is a modifier like any other. no current modifiers can evaluate the content it creates, only evaluates what's above of them on the stack If this is by design, there's a **strong** contradiction with current established modifiers behaviors

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

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

You're right, the geometry nodes should operate like a modifier. From this perspective the behavior is definitely wrong. Apologies for my misunderstanding/uninformedness. Given that @JacquesLucke confirmed that geometry nodes are not supposed to break with the convention of modifiers and I can reproduce the behavior, I'm marking this ticket as confirmed.

You're right, the geometry nodes should operate like a modifier. From this perspective the behavior is definitely wrong. Apologies for my misunderstanding/uninformedness. Given that @JacquesLucke confirmed that geometry nodes are not supposed to break with the convention of modifiers and I can reproduce the behavior, I'm marking this ticket as confirmed.

This issue was referenced by 1e193a0b56

This issue was referenced by 1e193a0b564c72c006203a1e349269e4bb004d0e
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Jacques Lucke self-assigned this 2021-01-16 15:26:14 +01:00
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
4 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#84757
No description provided.