Geometry nodes attribute output depends on order of outputs #93715

Closed
opened 2021-12-05 19:49:59 +01:00 by Nathan Vasil · 7 comments

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

Blender Version
Broken: version: 3.0.0, branch: master, commit date: 2021-12-02 18:35, hash: f1cca30557
Broken: version: 3.1.0 Alpha, branch: master, commit date: 2021-12-04 01:26, hash: 5ef5a9fc24

Short description of error
GN uses the full geometry as outputted by each output, apparently in order of creation, to determine the inputs to fields involved in later outputs.

Exact steps for others to reproduce the error
Attached file is handy for demonstrating the error:

image.png

You can see I've got stuff labelled here. "Modifier" row uses live geometry nodes modifiers; "Applied" row are the same objects, but modifiers applied (via convert to mesh) in order to examine the output. "Base" column has geometry nodes as shown; "Switched Outputs" 2 columns have the outputs reorganized to get GN to evaluate in a different order. First and second columns have inputs of "StealFrom" and "StealTo" of 1.0 each; third column has inputs of "StealFrom" of 0.5 and "StealTo" of 1.0. All vertices in the objects are assigned to these groups with the weights mentioned.

Anticipated output from first two columns is StealTo 1.0, StealFrom 0.0; in third column, anticipated output is StealTo 0.5, StealFrom 0.0. Actual output, as shown on the Applied row, differs: 0,0 in first row; 0,1 in second row; 0.25, 0.5 in third row.

It appears that the fields reading the groups are acquiring their values, in order, from each preceding output. So in the first column, we're first creating geometry (which is identical to input geometry); then running the StealFrom field on that geometry, giving us a StealFrom of 0 and outputting new geometry; then running the StealTo field on that output, giving us a StealTo of 0. And of course when we switch the outputs, these fields are evaluated in a different order, leading to different final output.

It's not 100% clear to me that this is a bug; order of operations at the final output is only implied, and I don't think is specified anywhere in the manual at https:*docs.blender.org/manual/en/latest/modeling/modifiers/generate/geometry_nodes.html# . I'm making this as at the request of @JacquesLucke , who asked for this report in a post at https:*devtalk.blender.org/t/fields-and-anonymous-attributes-proposal/19450/651 .

There is a workaround, which is to use a capture attribute node to guarantee that the initial values of the attributes are used for both chains:

image.png

GNbug.blend

**System Information** Operating system: Windows-10-10.0.18363-SP0 64 Bits Graphics card: GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 456.71 **Blender Version** Broken: version: 3.0.0, branch: master, commit date: 2021-12-02 18:35, hash: `f1cca30557` Broken: version: 3.1.0 Alpha, branch: master, commit date: 2021-12-04 01:26, hash: `5ef5a9fc24` **Short description of error** GN uses the full geometry as outputted by each output, apparently in order of creation, to determine the inputs to fields involved in later outputs. **Exact steps for others to reproduce the error** Attached file is handy for demonstrating the error: ![image.png](https://archive.blender.org/developer/F12692577/image.png) You can see I've got stuff labelled here. "Modifier" row uses live geometry nodes modifiers; "Applied" row are the same objects, but modifiers applied (via convert to mesh) in order to examine the output. "Base" column has geometry nodes as shown; "Switched Outputs" 2 columns have the outputs reorganized to get GN to evaluate in a different order. First and second columns have inputs of "StealFrom" and "StealTo" of 1.0 each; third column has inputs of "StealFrom" of 0.5 and "StealTo" of 1.0. All vertices in the objects are assigned to these groups with the weights mentioned. Anticipated output from first two columns is StealTo 1.0, StealFrom 0.0; in third column, anticipated output is StealTo 0.5, StealFrom 0.0. Actual output, as shown on the Applied row, differs: 0,0 in first row; 0,1 in second row; 0.25, 0.5 in third row. It appears that the fields reading the groups are acquiring their values, in order, from each preceding output. So in the first column, we're first creating geometry (which is identical to input geometry); then running the StealFrom field on that geometry, giving us a StealFrom of 0 and outputting new geometry; then running the StealTo field on that output, giving us a StealTo of 0. And of course when we switch the outputs, these fields are evaluated in a different order, leading to different final output. It's not 100% clear to me that this is a bug; order of operations at the final output is only implied, and I don't think is specified anywhere in the manual at https:*docs.blender.org/manual/en/latest/modeling/modifiers/generate/geometry_nodes.html# . I'm making this as at the request of @JacquesLucke , who asked for this report in a post at https:*devtalk.blender.org/t/fields-and-anonymous-attributes-proposal/19450/651 . There is a workaround, which is to use a capture attribute node to guarantee that the initial values of the attributes are used for both chains: ![image.png](https://archive.blender.org/developer/F12692752/image.png) [GNbug.blend](https://archive.blender.org/developer/F12692572/GNbug.blend)
Author

Added subscribers: @JacquesLucke, @vasiln

Added subscribers: @JacquesLucke, @vasiln

#93572 was marked as duplicate of this issue

#93572 was marked as duplicate of this issue
Member

Added subscribers: @christopher.burns, @HooglyBoogly, @null

Added subscribers: @christopher.burns, @HooglyBoogly, @null
Member

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

Changed status from 'Needs Triage' to: 'Confirmed'
Hans Goudey changed title from Geometry nodes output depends on order of outputs to Geometry nodes attribute output depends on order of outputs 2021-12-06 05:34:51 +01:00
Member

I think this should be resolved after a985f558a6

@vasiln, could you check that? I tried looking through the file but I'm finding it a bit confusing and it might be better to check that it matches your expectations anyway. Thanks.

I think this should be resolved after a985f558a6 @vasiln, could you check that? I tried looking through the file but I'm finding it a bit confusing and it might be better to check that it matches your expectations anyway. Thanks.
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Hans Goudey self-assigned this 2022-04-28 18:31:33 +02:00
Member

I'll close this as resolved since I'm pretty confident the issue was solved from looking at the code. We can easily reopen the report if I'm wrong though. Thanks.

I'll close this as resolved since I'm pretty confident the issue was solved from looking at the code. We can easily reopen the report if I'm wrong though. Thanks.
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
3 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#93715
No description provided.