changing a material in the properties panel causes geometry node modifier to recalculate. #93148

Closed
opened 2021-11-17 03:02:36 +01:00 by michael campbell · 15 comments

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

Blender Version
Broken: version: 3.1.0 Alpha, branch: master, commit date: 2021-11-11 18:53, hash: 0533f2851e
Worked: (newest version of Blender that worked as expected)

changing a material in the properties panel causes the geometry node modifier to recalculate even if the material is not in use. For complex node trees this can result in 60 second waits for nothing to happen other than the material to change in the properties panel. Happens with or without any set material or set material Index nodes in the tree, and even if the material is not in use on the object.

2021-11-17 02-00-12.mp4

**System Information** Operating system: Windows-10-10.0.19042-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 472.12 **Blender Version** Broken: version: 3.1.0 Alpha, branch: master, commit date: 2021-11-11 18:53, hash: `0533f2851e` Worked: (newest version of Blender that worked as expected) changing a material in the properties panel causes the geometry node modifier to recalculate even if the material is not in use. For complex node trees this can result in 60 second waits for nothing to happen other than the material to change in the properties panel. Happens with or without any set material or set material Index nodes in the tree, and even if the material is not in use on the object. [2021-11-17 02-00-12.mp4](https://archive.blender.org/developer/F11817316/2021-11-17_02-00-12.mp4)

Added subscriber: @3di

Added subscriber: @3di
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'
Member

Hi, thanks for the report.
I am not sure if it's related to Geometry nodes. Does this happen when you apply modifier?
Perhaps the same issue as reported in #94609 (Modifiers are always reevaluated when using an image texture data-block)
Can you provide a sample .blend file?
Does this issue persist on recent development builds?: https://builder.blender.org/download/daily

Hi, thanks for the report. I am not sure if it's related to Geometry nodes. Does this happen when you apply modifier? Perhaps the same issue as reported in #94609 (Modifiers are always reevaluated when using an image texture data-block) Can you provide a sample .blend file? Does this issue persist on recent development builds?: https://builder.blender.org/download/daily
Member

@3di Hi, any updates? Otherwise I will have to close the task since its more than a week without reply :)

@3di Hi, any updates? Otherwise I will have to close the task since its more than a week without reply :)

Hi, here's a file. Open the file click suzanne, go to the material panel and click the 'new' button to add a new material. Blender will freeze for several seconds whilst the geometry node modifier re-calculates needlessly.

geo node update bug.blend

Hi, here's a file. Open the file click suzanne, go to the material panel and click the 'new' button to add a new material. Blender will freeze for several seconds whilst the geometry node modifier re-calculates needlessly. [geo node update bug.blend](https://archive.blender.org/developer/F12855093/geo_node_update_bug.blend)

geo nodes needs to check if a changed/new attribute in use by the node network? if not do nothing. If it has changed, check the hash of the attribute for all elements combined (just in case the user/external functions have refreshed but not changed.)

geo nodes needs to check if a changed/new attribute in use by the node network? if not do nothing. If it has changed, check the hash of the attribute for all elements combined (just in case the user/external functions have refreshed but not changed.)
Member

Changed status from 'Needs User Info' to: 'Needs Developer To Reproduce'

Changed status from 'Needs User Info' to: 'Needs Developer To Reproduce'
Member

Added subscriber: @HooglyBoogly

Added subscriber: @HooglyBoogly
Member

Thanks for the file. Can confirm.
This even happen when I use primitive node as input. Which I think shouldn't happen as material slots are not directly used by mesh created from scratch (with GN nodes).
(eg. input UV sphere node to the same node tree).
@HooglyBoogly , can you check?

Thanks for the file. Can confirm. This even happen when I use primitive node as input. Which I think shouldn't happen as material slots are not directly used by mesh created from scratch (with GN nodes). (eg. input UV sphere node to the same node tree). @HooglyBoogly , can you check?

I get that if geo nodes creates new geometry, that the attributes need propagating to the new elements, but that should be done without re-calculating the tree if the result is unaffected by that attribute.

I get that if geo nodes creates new geometry, that the attributes need propagating to the new elements, but that should be done without re-calculating the tree if the result is unaffected by that attribute.
Member

Changed status from 'Needs Developer To Reproduce' to: 'Archived'

Changed status from 'Needs Developer To Reproduce' to: 'Archived'
Member

This isn't a bug, material assignments can change the evaluated state of a mesh, so the modifier stack must be reevaluated. Theoretically there could be checks if the updates could be avoided some of the time, but that's not something Blender really does anywhere, and the information will not always be easy to know statically. The dependency graph just doesn't have the opportunity for such fine-grained dependencies at the moment.

This isn't a bug, material assignments can change the evaluated state of a mesh, so the modifier stack must be reevaluated. Theoretically there could be checks if the updates could be avoided some of the time, but that's not something Blender really does anywhere, and the information will not always be easy to know statically. The dependency graph just doesn't have the opportunity for such fine-grained dependencies at the moment.

Just a thought, could the geometry node modifier have it's own inbuilt logic so that when the modifier stack updates, it can see if an update is necessary based on the hash of modifiers before it and their parameter value? I was able to do this in the compositor to achieve real time interaction and caching during playback without referring to the depsgraph (because of the shortcomings you mentioned). Then the only thing to check would be any new or updated attributes to see if they're in use by the tree, if they contribute to the outcome of the tree, and if they've actually changed (based on the hash). If not, maybe the geometry node code itself could update/write the attributes without executing the whole tree needlessly?

Just a thought, could the geometry node modifier have it's own inbuilt logic so that when the modifier stack updates, it can see if an update is necessary based on the hash of modifiers before it and their parameter value? I was able to do this in the compositor to achieve real time interaction and caching during playback without referring to the depsgraph (because of the shortcomings you mentioned). Then the only thing to check would be any new or updated attributes to see if they're in use by the tree, if they contribute to the outcome of the tree, and if they've actually changed (based on the hash). If not, maybe the geometry node code itself could update/write the attributes without executing the whole tree needlessly?
Member

Yes, I think that is mostly possible, we've discussed it a bit before anyway. I don't think it's quite the time to work on that yet, with some designs for an "edit mode node" still up in the air. But I think it will happen eventually.

Yes, I think that is mostly possible, we've discussed it a bit before anyway. I don't think it's quite the time to work on that yet, with some designs for an "edit mode node" still up in the air. But I think it will happen eventually.
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#93148
No description provided.