Geometry Nodes Evaluator 3.0 #98492

Closed
opened 2022-05-30 12:24:01 +02:00 by Jacques Lucke · 12 comments
Member

The geometry nodes evaluation system is responsible for parsing and executing the user generated node tree efficiently.

Some History

The first evaluator was very simple. It parsed and executed the node tree recursively, executing every node at most once. It was single threaded, didn't support any conditional execution and the node tree complexity was bounded by stack size.

The second evaluator (introduced in May 2021) offered many more features already. Most importantly it introduced support for multi-threading, lazyness and it was non-recursive.

Now, we start to reach the limits of the existing evaluator, which should be overcome by the next evolution of the evaluator.

Goals

  • Keep the good parts of the existing evaluator: multi-threading, lazyness and non-recursiveness for node chains.
  • Make evaluator independent from the modifier, so that it can be used in different contexts.
    • The existing evaluator can essentially only be used by a modifier for the root geometry node tree.
    • To support "sub-contexts" in geometry nodes (e.g. loops or simulations) it has to be possible to evaluate a node tree that's not a root node tree in a modifier.
  • Make the evaluator independent from geometry nodes.
    • This is similar to the previous goal, but a bit stronger.
    • A node in the evaluator shouldn't always have to correspond to a node in a geometry nodes tree.
      • This allows us to insert additional nodes dynamically, or to combine multiple geometry nodes into one.
    • Makes it easier to test isolated parts of the evaluator without .blend files.
  • Don't require inlining of all node groups.
    • The current evaluator essentially inlines all node groups into a single graph before evaluation.
    • That has a fairly high constant overhead when only few of the nodes are used.
      • This becomes more common with high level node groups, where large parts of a group are disabled with a switch node.
    • Instead, we want that a node group can also be executed like any other node.
    • A node group should be able to use the evaluator internally.
  • Support preprocessing node groups:
    • This is related to the previous goal.
    • When node groups don't have to be inlined (they still can be), preprocessing can happen on the node group level.
    • For example, a node group only consisting of a couple of math nodes, could be combined into a single multi-function, which avoids executing these nodes all the time.
  • Support lazyness across evaluator boundaries.
    • The current evaluator supports lazyness within a (flattened) node tree, but all inputs to the evaluator have to be computed eagerly and all outputs are computed all the time.
    • Instead we want that the evaluator can lazily request inputs as they become required. Furthermore, the user of the evaluator should also be able to request the outputs lazily.
    • This is to keep lazyness working correctly even when node groups are not all inlined, because then multiple node groups can lazily request data from each other.
The geometry nodes evaluation system is responsible for parsing and executing the user generated node tree efficiently. ## Some History The first evaluator was very simple. It parsed and executed the node tree recursively, executing every node at most once. It was single threaded, didn't support any conditional execution and the node tree complexity was bounded by stack size. The second evaluator (introduced in [May 2021](https://developer.blender.org/rBb084b57fbf6d2b6c2a1adb2192f5d82581cede5c)) offered many more features already. Most importantly it introduced support for multi-threading, lazyness and it was non-recursive. Now, we start to reach the limits of the existing evaluator, which should be overcome by the next evolution of the evaluator. ## Goals * Keep the good parts of the existing evaluator: multi-threading, lazyness and non-recursiveness for node chains. * Make evaluator independent from the modifier, so that it can be used in different contexts. * The existing evaluator can essentially only be used by a modifier for the root geometry node tree. * To support "sub-contexts" in geometry nodes (e.g. loops or simulations) it has to be possible to evaluate a node tree that's not a root node tree in a modifier. * Make the evaluator independent from geometry nodes. * This is similar to the previous goal, but a bit stronger. * A node in the evaluator shouldn't always have to correspond to a node in a geometry nodes tree. * This allows us to insert additional nodes dynamically, or to combine multiple geometry nodes into one. * Makes it easier to test isolated parts of the evaluator without .blend files. * Don't require inlining of all node groups. * The current evaluator essentially inlines all node groups into a single graph before evaluation. * That has a fairly high constant overhead when only few of the nodes are used. * This becomes more common with high level node groups, where large parts of a group are disabled with a switch node. * Instead, we want that a node group can also be executed like any other node. * A node group should be able to use the evaluator internally. * Support preprocessing node groups: * This is related to the previous goal. * When node groups don't have to be inlined (they still can be), preprocessing can happen on the node group level. * For example, a node group only consisting of a couple of math nodes, could be combined into a single multi-function, which avoids executing these nodes all the time. * Support lazyness across evaluator boundaries. * The current evaluator supports lazyness within a (flattened) node tree, but all inputs to the evaluator have to be computed eagerly and all outputs are computed all the time. * Instead we want that the evaluator can lazily request inputs as they become required. Furthermore, the user of the evaluator should also be able to request the outputs lazily. * This is to keep lazyness working correctly even when node groups are not all inlined, because then multiple node groups can lazily request data from each other.
Author
Member

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke
Author
Member

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

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

Added subscriber: @mod_moder

Added subscriber: @mod_moder

Added subscriber: @Zorro_weaver

Added subscriber: @Zorro_weaver

Added subscriber: @ME2

Added subscriber: @ME2
Member

Added subscriber: @EAW

Added subscriber: @EAW

Added subscriber: @SteffenD

Added subscriber: @SteffenD

Added subscriber: @JanErik

Added subscriber: @JanErik

Added subscriber: @GeorgiaPacific

Added subscriber: @GeorgiaPacific

This issue was referenced by 4130f1e674

This issue was referenced by 4130f1e674f83fc3d53979d3061469af34e1f873
Author
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Jacques Lucke self-assigned this 2022-09-13 08:53:20 +02:00
Author
Member
4130f1e674
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
9 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#98492
No description provided.