Geometry Nodes versioning in Blender 3.x #91049

Closed
opened 2021-08-30 11:13:17 +02:00 by Jacques Lucke · 7 comments
Member

We have to decide how to deal with two kinds of nodes:

  • Nodes that should be removed completely (e.g. Attribute Math).
  • Nodes that are only updated (e.g. Point Distribute).

https://devtalk.blender.org/t/geometry-nodes-backward-compatibility-poll/20199

We have to decide how to deal with two kinds of nodes: * Nodes that should be removed completely (e.g. Attribute Math). * Nodes that are only updated (e.g. Point Distribute). https://devtalk.blender.org/t/geometry-nodes-backward-compatibility-poll/20199
Author
Member

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke
Member

Added subscriber: @HooglyBoogly

Added subscriber: @HooglyBoogly
Member

Here's a list of nodes that will have to change. Not including changing attribute name inputs to fields on almost all nodes:

Easily/Perfectly Replaceable

Node Notes
Attribute Color Ramp Replaced by existing function node
Attribute Combine/Separate XYZ Replaced by existing function node
Attribute Compare Replaced by "Float Compare"
Attribute Convert Replaced by "Freeze Attribute"
Attribute Fill "Store Persistent Attribute"
Attribute Math Math node
Attribute Mix Mix RGB
Attribute Vector Math Vector Math node
Attribute Vector Rotate Vector Rotate node
Point Scale Becomes completely unnecessary

Replaceable with Caveats

Node Notes
Attribute Clamp Clamp node only has float type
Attribute Curve Map "RGB and Vector Curves" node. No "float" version.
Attribute Map Range Map Range node only has float type
Align Rotation to Vector Needs a new field node
Point Rotate Needs a new field node
Attribute Sample Texture Less necessary with fields, but should still be supported, converted to a field node.
Attribute Randomize The "Random Float" node should have more types, somehow.

Larger Changes

Node Notes
Attribute Proximity Should become a "Geometry Proximity" node
Raycast Should be replaced by a field node
Attribute Transfer Replaced by a field node to get the values from the closest area on target geometry.
Delete Geometry Needs a domain drop-down
Join Geometry Needs separate sockets for joining anonymous attributes
Point Distribute Needs attribute outputs, only transfer custom named attributes and anonymous attributes. Also remove max density for random mode.

I don't think I've missed anything here, but maybe some other nodes will have to change slightly internally, I'm not sure.

Here's a list of nodes that will have to change. Not including changing attribute name inputs to fields on almost all nodes: **Easily/Perfectly Replaceable** | **Node** | **Notes** | -- | -- | | Attribute Color Ramp | *Replaced by existing function node* | Attribute Combine/Separate XYZ | *Replaced by existing function node* | Attribute Compare | *Replaced by "Float Compare"* | Attribute Convert | *Replaced by "Freeze Attribute"* | Attribute Fill | *"Store Persistent Attribute"* | Attribute Math | *Math node* | Attribute Mix | *Mix RGB* | Attribute Vector Math | *Vector Math node* | Attribute Vector Rotate | *Vector Rotate node* | Point Scale | *Becomes completely unnecessary* **Replaceable with Caveats** | **Node** | **Notes** | -- | -- | | Attribute Clamp | *Clamp node only has float type* | Attribute Curve Map | *"RGB and Vector Curves" node. No "float" version.* | Attribute Map Range | *Map Range node only has float type* | Align Rotation to Vector | *Needs a new field node* | Point Rotate | *Needs a new field node* | Attribute Sample Texture | *Less necessary with fields, but should still be supported, converted to a field node.* | Attribute Randomize | *The "Random Float" node should have more types, somehow.* **Larger Changes** | **Node** | **Notes** | -- | -- | | Attribute Proximity | *Should become a "Geometry Proximity" node* | Raycast | *Should be replaced by a field node* | Attribute Transfer | *Replaced by a field node to get the values from the closest area on target geometry.* | Delete Geometry | *Needs a domain drop-down* | Join Geometry | *Needs separate sockets for joining anonymous attributes* | Point Distribute | *Needs attribute outputs, only transfer custom named attributes and anonymous attributes. Also remove max density for random mode.* I don't think I've missed anything here, but maybe some other nodes will have to change slightly internally, I'm not sure.
Member

Recently the idea of just duplicating all of the nodes that changed and simply calling the old nodes "legacy" nodes was proposed.
So here is a more complete list, with the nodes categorized with some reasoning. It's the 10 "Maybe" nodes in the list that deserve special discussion I think.

static bool geometry_node_is_293_legacy(const int node_type)
{

switch (node_type) {
/* Not legacy: No attribute inputs or outputs. */
case GEO_NODE_TRIANGULATE:
case GEO_NODE_EDGE_SPLIT:
case GEO_NODE_TRANSFORM:
case GEO_NODE_BOOLEAN:
case GEO_NODE_SUBDIVISION_SURFACE:
case GEO_NODE_IS_VIEWPORT:
case GEO_NODE_MESH_SUBDIVIDE:
case GEO_NODE_MESH_PRIMITIVE_CUBE:
case GEO_NODE_MESH_PRIMITIVE_CIRCLE:
case GEO_NODE_MESH_PRIMITIVE_UV_SPHERE:
case GEO_NODE_MESH_PRIMITIVE_CYLINDER:
case GEO_NODE_MESH_PRIMITIVE_ICO_SPHERE:
case GEO_NODE_MESH_PRIMITIVE_CONE:
case GEO_NODE_MESH_PRIMITIVE_LINE:
case GEO_NODE_MESH_PRIMITIVE_GRID:
case GEO_NODE_BOUNDING_BOX:
case GEO_NODE_CURVE_RESAMPLE:
case GEO_NODE_INPUT_MATERIAL:
case GEO_NODE_MATERIAL_REPLACE:
case GEO_NODE_CURVE_LENGTH:
case GEO_NODE_CONVEX_HULL:
case GEO_NODE_SEPARATE_COMPONENTS:
case GEO_NODE_CURVE_PRIMITIVE_STAR:
case GEO_NODE_CURVE_PRIMITIVE_SPIRAL:
case GEO_NODE_CURVE_PRIMITIVE_QUADRATIC_BEZIER:
case GEO_NODE_CURVE_PRIMITIVE_BEZIER_SEGMENT:
case GEO_NODE_CURVE_PRIMITIVE_CIRCLE:
case GEO_NODE_VIEWER:
case GEO_NODE_CURVE_PRIMITIVE_LINE:
case GEO_NODE_CURVE_PRIMITIVE_QUADRILATERAL:
case GEO_NODE_CURVE_FILL:
case GEO_NODE_CURVE_TRIM:
return false;


/* Not legacy: Newly added with fields patch. */
case GEO_NODE_INPUT_POSITION:
case GEO_NODE_SET_POSITION:
case GEO_NODE_INPUT_INDEX:
case GEO_NODE_INPUT_NORMAL:
case GEO_NODE_ATTRIBUTE_CAPTURE:
return false;


/* Maybe legacy: Might need special attribute handling, depending on design. */
case GEO_NODE_SWITCH:
case GEO_NODE_JOIN_GEOMETRY:
case GEO_NODE_ATTRIBUTE_REMOVE:
case GEO_NODE_OBJECT_INFO:
case GEO_NODE_COLLECTION_INFO:
return false;


/* Maybe legacy: Transfered all attributes before, will not transfer all built-ins now. */
case GEO_NODE_CURVE_TO_MESH:
case GEO_NODE_CURVE_ENDPOINTS:
case GEO_NODE_MESH_TO_CURVE:
case GEO_NODE_CURVE_TO_POINTS:
return false;


/* Maybe legacy: Special case for grid names? Or finish patch from level set branch to generate

     * a mesh for all grids in the volume. */

case GEO_NODE_VOLUME_TO_MESH:
return false;


/* Legacy: Attribute operation completely replaced by field nodes. */
case GEO_NODE_ATTRIBUTE_RANDOMIZE:
case GEO_NODE_ATTRIBUTE_MATH:
case GEO_NODE_ATTRIBUTE_FILL:
case GEO_NODE_ATTRIBUTE_MIX:
case GEO_NODE_ATTRIBUTE_COLOR_RAMP:
case GEO_NODE_ATTRIBUTE_COMPARE:
case GEO_NODE_POINT_ROTATE:
case GEO_NODE_ALIGN_ROTATION_TO_VECTOR:
case GEO_NODE_POINT_SCALE:
case GEO_NODE_ATTRIBUTE_SAMPLE_TEXTURE:
case GEO_NODE_ATTRIBUTE_VECTOR_ROTATE:
case GEO_NODE_ATTRIBUTE_CURVE_MAP:
case GEO_NODE_ATTRIBUTE_MAP_RANGE:
case GEO_NODE_ATTRIBUTE_CLAMP:
case GEO_NODE_ATTRIBUTE_VECTOR_MATH:
case GEO_NODE_ATTRIBUTE_COMBINE_XYZ:
case GEO_NODE_ATTRIBUTE_SEPARATE_XYZ:
return true;


/* Legacy: Replaced by field node depending on another geometry. */
case GEO_NODE_RAYCAST:
case GEO_NODE_ATTRIBUTE_TRANSFER:
case GEO_NODE_ATTRIBUTE_PROXIMITY:
return true;


/* Legacy: Simple selection attribute input. */
case GEO_NODE_POINT_SEPARATE:
case GEO_NODE_CURVE_SELECT_HANDLES:
case GEO_NODE_CURVE_SPLINE_TYPE:
case GEO_NODE_CURVE_REVERSE:
case GEO_NODE_MATERIAL_ASSIGN:
case GEO_NODE_CURVE_SET_HANDLES:
return true;


/* Legacy: More attribute inputs or outputs. /
case GEO_NODE_DELETE_GEOMETRY: /
Needs field input, domain dropdown. /
case GEO_NODE_CURVE_SUBDIVIDE: /
Needs field count input. /
case GEO_NODE_POINTS_TO_VOLUME: /
Needs field radius input. /
case GEO_NODE_SELECT_BY_MATERIAL: /
Output anonymous attribute. /
case GEO_NODE_POINT_TRANSLATE: /
Needs field inputs. /
case GEO_NODE_POINT_INSTANCE: /
Needs field inputs. /
case GEO_NODE_POINT_DISTRIBUTE: /
Needs field input, remove max for random mode, don't transfer all builtin attributes. /
case GEO_NODE_ATTRIBUTE_CONVERT: /
Attribute Capture, Store Attribute */
return true;
}
return false;

}
Recently the idea of just duplicating all of the nodes that changed and simply calling the old nodes "legacy" nodes was proposed. So here is a more complete list, with the nodes categorized with some reasoning. It's the 10 "Maybe" nodes in the list that deserve special discussion I think. ```lang=c static bool geometry_node_is_293_legacy(const int node_type) { ``` switch (node_type) { /* Not legacy: No attribute inputs or outputs. */ case GEO_NODE_TRIANGULATE: case GEO_NODE_EDGE_SPLIT: case GEO_NODE_TRANSFORM: case GEO_NODE_BOOLEAN: case GEO_NODE_SUBDIVISION_SURFACE: case GEO_NODE_IS_VIEWPORT: case GEO_NODE_MESH_SUBDIVIDE: case GEO_NODE_MESH_PRIMITIVE_CUBE: case GEO_NODE_MESH_PRIMITIVE_CIRCLE: case GEO_NODE_MESH_PRIMITIVE_UV_SPHERE: case GEO_NODE_MESH_PRIMITIVE_CYLINDER: case GEO_NODE_MESH_PRIMITIVE_ICO_SPHERE: case GEO_NODE_MESH_PRIMITIVE_CONE: case GEO_NODE_MESH_PRIMITIVE_LINE: case GEO_NODE_MESH_PRIMITIVE_GRID: case GEO_NODE_BOUNDING_BOX: case GEO_NODE_CURVE_RESAMPLE: case GEO_NODE_INPUT_MATERIAL: case GEO_NODE_MATERIAL_REPLACE: case GEO_NODE_CURVE_LENGTH: case GEO_NODE_CONVEX_HULL: case GEO_NODE_SEPARATE_COMPONENTS: case GEO_NODE_CURVE_PRIMITIVE_STAR: case GEO_NODE_CURVE_PRIMITIVE_SPIRAL: case GEO_NODE_CURVE_PRIMITIVE_QUADRATIC_BEZIER: case GEO_NODE_CURVE_PRIMITIVE_BEZIER_SEGMENT: case GEO_NODE_CURVE_PRIMITIVE_CIRCLE: case GEO_NODE_VIEWER: case GEO_NODE_CURVE_PRIMITIVE_LINE: case GEO_NODE_CURVE_PRIMITIVE_QUADRILATERAL: case GEO_NODE_CURVE_FILL: case GEO_NODE_CURVE_TRIM: return false; ``` ``` /* Not legacy: Newly added with fields patch. */ case GEO_NODE_INPUT_POSITION: case GEO_NODE_SET_POSITION: case GEO_NODE_INPUT_INDEX: case GEO_NODE_INPUT_NORMAL: case GEO_NODE_ATTRIBUTE_CAPTURE: return false; ``` ``` /* Maybe legacy: Might need special attribute handling, depending on design. */ case GEO_NODE_SWITCH: case GEO_NODE_JOIN_GEOMETRY: case GEO_NODE_ATTRIBUTE_REMOVE: case GEO_NODE_OBJECT_INFO: case GEO_NODE_COLLECTION_INFO: return false; ``` ``` /* Maybe legacy: Transfered *all* attributes before, will not transfer all built-ins now. */ case GEO_NODE_CURVE_TO_MESH: case GEO_NODE_CURVE_ENDPOINTS: case GEO_NODE_MESH_TO_CURVE: case GEO_NODE_CURVE_TO_POINTS: return false; ``` ``` /* Maybe legacy: Special case for grid names? Or finish patch from level set branch to generate ``` * a mesh for all grids in the volume. */ ``` case GEO_NODE_VOLUME_TO_MESH: return false; ``` ``` /* Legacy: Attribute operation completely replaced by field nodes. */ case GEO_NODE_ATTRIBUTE_RANDOMIZE: case GEO_NODE_ATTRIBUTE_MATH: case GEO_NODE_ATTRIBUTE_FILL: case GEO_NODE_ATTRIBUTE_MIX: case GEO_NODE_ATTRIBUTE_COLOR_RAMP: case GEO_NODE_ATTRIBUTE_COMPARE: case GEO_NODE_POINT_ROTATE: case GEO_NODE_ALIGN_ROTATION_TO_VECTOR: case GEO_NODE_POINT_SCALE: case GEO_NODE_ATTRIBUTE_SAMPLE_TEXTURE: case GEO_NODE_ATTRIBUTE_VECTOR_ROTATE: case GEO_NODE_ATTRIBUTE_CURVE_MAP: case GEO_NODE_ATTRIBUTE_MAP_RANGE: case GEO_NODE_ATTRIBUTE_CLAMP: case GEO_NODE_ATTRIBUTE_VECTOR_MATH: case GEO_NODE_ATTRIBUTE_COMBINE_XYZ: case GEO_NODE_ATTRIBUTE_SEPARATE_XYZ: return true; ``` ``` /* Legacy: Replaced by field node depending on another geometry. */ case GEO_NODE_RAYCAST: case GEO_NODE_ATTRIBUTE_TRANSFER: case GEO_NODE_ATTRIBUTE_PROXIMITY: return true; ``` ``` /* Legacy: Simple selection attribute input. */ case GEO_NODE_POINT_SEPARATE: case GEO_NODE_CURVE_SELECT_HANDLES: case GEO_NODE_CURVE_SPLINE_TYPE: case GEO_NODE_CURVE_REVERSE: case GEO_NODE_MATERIAL_ASSIGN: case GEO_NODE_CURVE_SET_HANDLES: return true; ``` ``` /* Legacy: More attribute inputs or outputs. */ case GEO_NODE_DELETE_GEOMETRY: /* Needs field input, domain dropdown. */ case GEO_NODE_CURVE_SUBDIVIDE: /* Needs field count input. */ case GEO_NODE_POINTS_TO_VOLUME: /* Needs field radius input. */ case GEO_NODE_SELECT_BY_MATERIAL: /* Output anonymous attribute. */ case GEO_NODE_POINT_TRANSLATE: /* Needs field inputs. */ case GEO_NODE_POINT_INSTANCE: /* Needs field inputs. */ case GEO_NODE_POINT_DISTRIBUTE: /* Needs field input, remove max for random mode, don't transfer all builtin attributes. */ case GEO_NODE_ATTRIBUTE_CONVERT: /* Attribute Capture, Store Attribute */ return true; } return false; ``` } ```

This issue was referenced by e2f99c338b

This issue was referenced by e2f99c338bd5787658ce08984e6856b7d369a41f
Author
Member

Think the general design for the versioning is clear now, so I'll move this to done.

Think the general design for the versioning is clear now, so I'll move this to done.
Author
Member

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

Changed status from 'Needs Triage' to: 'Resolved'
Jacques Lucke self-assigned this 2021-09-17 15:51:01 +02:00
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#91049
No description provided.