Geometry nodes attribute output depends on order of outputs #93715
Labels
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#93715
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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:
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:
GNbug.blend
Added subscribers: @JacquesLucke, @vasiln
#93572 was marked as duplicate of this issue
Added subscribers: @christopher.burns, @HooglyBoogly, @null
Changed status from 'Needs Triage' to: 'Confirmed'
Geometry nodes output depends on order of outputsto Geometry nodes attribute output depends on order of outputsI 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.
Changed status from 'Confirmed' to: 'Resolved'
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.