Compositor freeze in heavy scenes #121188

Open
opened 2024-04-28 12:43:02 +02:00 by Rincewind · 5 comments

System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 4090/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 551.86

Blender Version
Broken: version: 4.1.1, branch: blender-v4.1-release, commit date: 2024-04-15 15:11, hash: e1743a0317bc
Worked: never

Short description of error
Compositor freeze in heavy scenes.

Exact steps for others to reproduce the error
This is a follow up of #101861 (which was fixed in 4.1 - but there seem to be other conditions which freeze the compositor).
In this case the issue is caused by hair nodes.

  1. Open the attached blend file.
  2. Go to the compositor
  3. Change a node (disconnect, delete, add a new one)
  4. Compositor freeze for several seconds.

Also happens in the latest alpha of 4.2.

**System Information** Operating system: Windows-10-10.0.19045-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 4090/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 551.86 **Blender Version** Broken: version: 4.1.1, branch: blender-v4.1-release, commit date: 2024-04-15 15:11, hash: `e1743a0317bc` Worked: never **Short description of error** Compositor freeze in heavy scenes. **Exact steps for others to reproduce the error** This is a follow up of #101861 (which was fixed in 4.1 - but there seem to be other conditions which freeze the compositor). In this case the issue is caused by hair nodes. 1. Open the attached blend file. 2. Go to the compositor 3. Change a node (disconnect, delete, add a new one) 4. Compositor freeze for several seconds. Also happens in the latest alpha of 4.2.
Rincewind added the
Priority
Normal
Status
Needs Triage
Type
Report
labels 2024-04-28 12:43:02 +02:00
Richard Antalik added
Module
VFX & Video
Status
Confirmed
Interest
Compositing
and removed
Status
Needs Triage
labels 2024-04-29 08:07:49 +02:00
Omar Emara self-assigned this 2024-04-30 12:45:36 +02:00
Omar Emara removed their assignment 2024-04-30 15:44:08 +02:00
Member

This is caused by the Geometry Node stack evaluating everytime the compositor executes. In particular, when evaluating the compositor dependency graph. The graph constructs the entire scene while I expect it to be minimal enough, so something might be wrong in the depsgraph construction.

@Sergey Any idea?

This is caused by the Geometry Node stack evaluating everytime the compositor executes. In particular, when evaluating the compositor dependency graph. The graph constructs the entire scene while I expect it to be minimal enough, so something might be wrong in the depsgraph construction. @Sergey Any idea?

This is a variation of a known short-coming of the dependency graph w.r.t ID properties. Currently, all ID properties are considered "needed to be evaluated", so if, say, scene points to a collection, everything if that collection will be evaluated. This is exactly what happens here.

For the pipeline addons type of a use-case i was trying to implement a concept of weak-referencing, so it is possible to reference ID from custom property, but not force the ID to be evaluatable. It turned out to be less straightforward than I hoped it will be, so it is on a longer list now.

For this issue I think we should be able to optimize out evaluation of the IDs referenced by custom properties. It will solve the majority of the performance impact, but not the memory usage.

In any case, it is something to be handled by the Core/Depsgraph. Don't think it is something we can do from from the compositor side.

This is a variation of a known short-coming of the dependency graph w.r.t ID properties. Currently, all ID properties are considered "needed to be evaluated", so if, say, scene points to a collection, everything if that collection will be evaluated. This is exactly what happens here. For the pipeline addons type of a use-case i was trying to implement a concept of weak-referencing, so it is possible to reference ID from custom property, but not force the ID to be evaluatable. It turned out to be less straightforward than I hoped it will be, so it is on a longer list now. For this issue I think we should be able to optimize out evaluation of the IDs referenced by custom properties. It will solve the majority of the performance impact, but not the memory usage. In any case, it is something to be handled by the Core/Depsgraph. Don't think it is something we can do from from the compositor side.
Author

@Sergey
is there a chance that we see that optimization workaround in 4.2? At least for me, those dependency graph issue makes the compositor regularly impossible to use.

@Sergey is there a chance that we see that optimization workaround in 4.2? At least for me, those dependency graph issue makes the compositor regularly impossible to use.

@Rincewind3D Hard to tell, hopefully yes. But maybe there will be some unforeseen issue with the approach discovered.

Maybe it is also something you can work-around from your side by avoiding custom properties on a scene which points to an ID? Here at the studio we avoid those and use a poor-man's weak-referencing using string property with a name of ID instead of a direct reference to the ID.

@Rincewind3D Hard to tell, hopefully yes. But maybe there will be some unforeseen issue with the approach discovered. Maybe it is also something you can work-around from your side by avoiding custom properties on a scene which points to an ID? Here at the studio we avoid those and use a poor-man's weak-referencing using string property with a name of ID instead of a direct reference to the ID.
Author

Thank you! I'm happy to hear that you try it.

That compositor freezes torments me since years! I did already multiple reports about it, which all got fixed - but I always find a new condition which is causing those. Hopefully this is the last one.

To be honest, I never reference IDs. I guess this is always caused by addons or assets I use. ;)
In this case, the built-in geo node hair.
But I have these issues also with scattering with Geo-Scatter, so I guess Geo-Scatter may also use IDs.

There is really no feasible way to avoid this, for me.

But there is an interesting detail I want to share. My workaround is, to use addons for most composition work.
Addons which change the compositor via Python does not cause the freeze! As long the compositor is not visible in the UI, eveything is fine. But sometimes I need adjustments my addons can't do and than it's get ugly. Sometimes 20 to 30 secs, for every single change in the compositor.

Thank you! I'm happy to hear that you try it. That compositor freezes torments me since years! I did already multiple reports about it, which all got fixed - but I always find a new condition which is causing those. Hopefully this is the last one. To be honest, I never reference IDs. I guess this is always caused by addons or assets I use. ;) In this case, the built-in geo node hair. But I have these issues also with scattering with Geo-Scatter, so I guess Geo-Scatter may also use IDs. There is really no feasible way to avoid this, for me. But there is an interesting detail I want to share. My workaround is, to use addons for most composition work. Addons which change the compositor via Python does not cause the freeze! As long the compositor is not visible in the UI, eveything is fine. But sometimes I need adjustments my addons can't do and than it's get ugly. Sometimes 20 to 30 secs, for every single change in the compositor.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser Project (Legacy)
Interest
Asset System
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#121188
No description provided.