Selection / Tagging in Geometry Nodes
#86907
Closed
opened
No Branch/Tag Specified
main
blender-v3.6-release
temp-sculpt-dyntopo-hive-alloc
temp-sculpt-dyntopo
asset-shelf
cycles-light-linking
tmp-usd-python-mtl
brush-assets-project
blender-v2.93-release
blender-v3.3-release
universal-scene-description
node-group-operators
asset-browser-frontend-split
temp-sculpt-attr-api
blender-v3.5-release
realtime-clock
sculpt-dev
gpencil-next
bevelv2
microfacet_hair
blender-projects-basics
principled-v2
v3.3.7
v2.93.18
v3.5.1
v3.3.6
v2.93.17
v3.5.0
v2.93.16
v3.3.5
v3.3.4
v2.93.15
v2.93.14
v3.3.3
v2.93.13
v2.93.12
v3.4.1
v3.3.2
v3.4.0
v3.3.1
v2.93.11
v3.3.0
v3.2.2
v2.93.10
v3.2.1
v3.2.0
v2.83.20
v2.93.9
v3.1.2
v3.1.1
v3.1.0
v2.83.19
v2.93.8
v3.0.1
v2.93.7
v3.0.0
v2.93.6
v2.93.5
v2.83.18
v2.93.4
v2.93.3
v2.83.17
v2.93.2
v2.93.1
v2.83.16
v2.93.0
v2.83.15
v2.83.14
v2.83.13
v2.92.0
v2.83.12
v2.91.2
v2.83.10
v2.91.0
v2.83.9
v2.83.8
v2.83.7
v2.90.1
v2.83.6.1
v2.83.6
v2.90.0
v2.83.5
v2.83.4
v2.83.3
v2.83.2
v2.83.1
v2.83
v2.82a
v2.82
v2.81a
v2.81
v2.80
v2.80-rc3
v2.80-rc2
v2.80-rc1
v2.79b
v2.79a
v2.79
v2.79-rc2
v2.79-rc1
v2.78c
v2.78b
v2.78a
v2.78
v2.78-rc2
v2.78-rc1
v2.77a
v2.77
v2.77-rc2
v2.77-rc1
v2.76b
v2.76a
v2.76
v2.76-rc3
v2.76-rc2
v2.76-rc1
v2.75a
v2.75
v2.75-rc2
v2.75-rc1
v2.74
v2.74-rc4
v2.74-rc3
v2.74-rc2
v2.74-rc1
v2.73a
v2.73
v2.73-rc1
v2.72b
2.72b
v2.72a
v2.72
v2.72-rc1
v2.71
v2.71-rc2
v2.71-rc1
v2.70a
v2.70
v2.70-rc2
v2.70-rc
v2.69
v2.68a
v2.68
v2.67b
v2.67a
v2.67
v2.66a
v2.66
v2.65a
v2.65
v2.64a
v2.64
v2.63a
v2.63
v2.61
v2.60a
v2.60
v2.59
v2.58a
v2.58
v2.57b
v2.57a
v2.57
v2.56a
v2.56
v2.55
v2.54
v2.53
v2.52
v2.51
v2.50
v2.49b
v2.49a
v2.49
v2.48a
v2.48
v2.47
v2.46
v2.45
v2.44
v2.43
v2.42a
v2.42
v2.41
v2.40
v2.37a
v2.37
v2.36
v2.35a
v2.35
v2.34
v2.33a
v2.33
v2.32
v2.31a
v2.31
v2.30
v2.28c
v2.28a
v2.28
v2.27
v2.26
v2.25
Labels
Clear labels
Issues relating to security: https://wiki.blender.org/wiki/Process/Vulnerability_Reports
Apply labels
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
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
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
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
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
Issues relating to security: https://wiki.blender.org/wiki/Process/Vulnerability_Reports
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 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
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
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
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
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
Milestone
Set milestone
Clear milestone
No items
No Milestone
Projects
Set Project
Clear projects
No project
Assignees
Assign users
Clear assignees
No Assignees
11 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#86907
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. It CANNOT be undone. Continue?
Background
As geometry nodes get more complicated, the need to limit operations to certain areas of the geometry is becoming more obvious.
You can't always split things apart into two pieces and work on them separately-- it's just not possible for some topology-changing operations.
Also, in a procedural context you want to be able to have multiple selections alive at the same time.
The most explicit way to refer to them is by name. These can be thought of the same way as selections in edit mode, with a different domain for each select mode.
We already have the idea of boolean attributes, which can exist on any domain. Then you can create a selection and use it just like any other attributes.
And other data types can be implicitly converted to boolean as well, making the whole system quite flexible.
The fact that a boolean attribute, or "selection," can be used like any other attribute is very powerful.
Naming
The point distribute node refers to its boolean attribute input as "Mask", but that is probably not the word to go with here. Another idea is "Tag".
I think that's a valid idea, but the word I would like to propose using is "Selection".
Explicit Selection
Every node to have one or more "selection" filter. We have this already for a few nodes (or a "factor" input that has the same purpose):
The Selection attribute input only needs to be exposed by default where it is actually useful (this decision is a bit arbitrary):
{F9909454 width=600}
{F9908331 size=full}
Pros
Cons
Implicit Selection
A part of the geometry is tagged/selected so that only this part is used by the following nodes until the selection is set again.
{F9909450 width=600}
Pros
Cons
Forking / Merging
Have a way to explicitly separate part of the geometry based on tagging and re-join them afterwards
Hans note: I don't know what this means
{F9909456 width=600}
Pros
Cons
Changed status from 'Needs Triage' to: 'Confirmed'
Added subscriber: @HooglyBoogly
#85369 was marked as duplicate of this issue
Added subscriber: @MiroHorvath
Added subscriber: @KenzieMac130
Added subscriber: @StephenSwaney
Added subscriber: @someuser
i should say, we need some way to select points/edges/faces/and_so_on by index and index range for example to be able to make selection from this string: '1,2,10-20,35'
For the records, I feel strongly that the best solution is clear: support explicit selection and real splitting, using the join and boolean nodes for combining. I think this gets you the best of both worlds:
Really this is just a continuation of what we are already doing anyway-- we already have the point separate node for splitting, and we already use boolean attributes as masks, etc.
Added subscriber: @Erindale
How does a selection differ from any other Boolean attribute?
I agree with the index suggestion by @someuser, it’s always good to be able to be really specific in selections.
Modifiers like solidify or Boolean and operations like inset, bevel, bridge loops etc should all generate masks, either as an attribute or, if you have a way to read a string of indices, they could just have a string socket output that sends out the face selection indices. For an operation like extrude/inset you’d want to be able to choose between the existing faces that were extruded, the new generated faces around the outside, or both together.
Another selection method that would be extremely useful would be by region. Similar to the box select tool we already have in 3D. I think it’s been nodded at with the
Select Inside Volume
in the first image. If you were able to output a boolean attribute for elements within the second object's volume, this could be used for making selections or doing Boolean operations on points. It also creates the possibility for your selection region object to exist and be controlled in 3D space. Having aselect by region
, as opposed toselect by index
, means that tools like subdiv or decimate will still work before without altering later extrusion regions. A kind of psudo-procedural workflow can really speed up a bunch of stuff. I'm all for nodes but sometimes you just want to grab something in 3D.A selection is just a name for a boolean attribute. It could potentially be stored differently, but it's used like a boolean attribute anyway, and that's what matters.
I would say it might be a good idea for selections to have or be automatically added to it's own namespace for creating selections. Maybe
selection:MY_SELECTION_NAME
or something? This way if the user was able to define selection sets while modeling they don't risk breaking anything that relies on other attributes while going about their own business.The point separate's
mask
makes sense to rename toselection
, while the point distributedensity
and point volumeradius
can be used to mask out points they are not really the same as a selection. The user could easily want to use a sample from a texture somewhere on the node-graph which is shared with many other operations but only select a few polygons to affect, if selection isn't available there would be some more attribute bookkeeping for the user. Even if it at first seems redundant based on the current workflow it would be nice to seeselection
everywhere it could apply just as a shared standard.Added subscriber: @dfelinto
Added subscriber: @randum
Was other alternatives considered to boolean selection? It seems to me that the approach does not cover all use cases. For example what if I want to find bounding boxes of all separate from each other mesh elements (islands). Now the node can only find bounding box of entire mesh. With boolean mask it will be able to find bounding box for only part of selected mesh. How should the solution look?
This is my understanding
On the picture the second node should create extra selection attribute where each element has unique value per separate mesh (island). For example all points of the triangle mesh can have 0 values, the points of the circle mesh have 1 values and the points of the quad mesh 2 values. It can be not only integers but any other hashable values like for example strings ('triangle', 'circle', 'quad'). Also it's similar to Blender face maps. Then the attribute can be used by the bounding box node.
This can be handled by a loop solution where each separate element by connectivity is looped over and processed. This way a solution designed to work on only a single mesh can be expanded to work on many without needing to refactor the node graph. Ex: a stone from blockout generator group being able to work in a loop over all bricks on a cobblestone wall.
The unique integer per-part seems like the best immediate solution. I don't think that should be part of the selection system but could be generated by a new node that creates it for connected geometry and overlaps/patterns in selections/face maps/attributes.
I agree assigning names to parts of a mesh might be needed in the future for more advanced loops, rigging and sims but I don't think that would be needed for a while or any reason not to have binary selection.
Added subscriber: @RiccardoBancone
Added subscriber: @JacquesLucke
Changed status from 'Confirmed' to: 'Archived'
Selections are just boolean fields now.