Component Selection/Groups Concept in Geometry Nodes
Hi, I had the chance to use Geometry Nodes in production and I played with it at home as well.
One of the bigger showstoppers at the moment for me is the lack (as far as I know) of the concept of component selection that can be used to limit the effect of any node on just a part of the geometry.
I tried to search something similar on RCS and DevTalk as well but I couldn't find anything similar so far. Sorry if this is a duplicate of some other proposals that I didn't spot.
My proposal is to add the concept of selection various domains, that is just conceptually a special boolean attribute on components.
In other software they are called groups, but I prefer to call it selections at the moment because it makes more sense to me and doesn't collide with the name of Vertex Groups already existing in Blender (Even though I think that eventually vertex groups should be treated as selection as well, vertex selections to be precise)
What are the selection component domains?:
-Point
-Vertex -Edge -Face -Face Corner -Shell (meaning single continuous part of a -mesh)
-Control Point -Spline
How do you create a selection?:
With a new "Select component" node (it could be called "Create Selection" as well).
In its most basic form, it takes geometry as input, a string interval of component indices and a domain type, it then outputs the geometry with the newly created group attached on it.
Other ways of selecting components could be:
Select inside volume: the node could take another geometry to use as a bounding volume and/or have sliders to specify bounds of the volume selection.
Select by normal: it takes a vector and a range of tolerance
Select by face area: it takes a float and a range of tolerance
Select by loose parts: it takes only the geometry as input and outputs automatically named groups attached to the geometry (great if combined with a future fracture node)
Select by expression: input an expression string. eg. "position.z > 2.0" on vertex domain, selects all the vertices that are above a height of 2 meters.
How do you use selections?:
Every node on which a selection makes sense, should have an option to limit the effect on the specified selection or on a combination of multiple selections.
UX/UI-wise I'm not sure about the best way, but I'm thinking about a drop-down or a text field to combine multiple selections by name string (or both, like the current behavior when adding attributes to textfields)
The most basic example use-case I'm thinking of is translating points:
Let's say I have a cube, and I want to move the bottom vertices 2 meters down:
I add a "Create Selection" node, select by expression (position.z<0), call it "bottom" and feed the geometry output to a "Point Translate" node. A this point the Point Translate node has a field to specify the selection, let's say is a text field, I type "bottom" and set the Translation vector to move the bottom vertices to the wanted position.
I could have used "select inside volume" with another box geometry to select the bottom vertices as well.
Why don't just use boolean attributes?
For the expression example, I managed to do the same thing using boolean attributes to perform a translation with selection:
I'm still learning Geometry nodes, maybe there is a better and more straightforward way to do the same thing, in case let me know!
Anyway, this solution is clearly not ideal, and every point of the mesh has still to be evaluated, with built-in selections I guess there is more room for optimization, for example, just update the position after translation on selected points (I may be wrong, I don't really know implementation/performance details under the hood)
What happens if topology changes?
The selections can be interpolated just like material assignment groups.
Soft Selections:
I'm thinking about "Soft selections" as well (like proportional editing). Let's call the the selection type described above is a "hard selection" At the moment I'm not sure about the best way of implementing a soft selection but some ideas are:
-The selection concept is implemented as a special float attribute instead of a special bool attribute, so the "hard selection" is just a special case of soft selection with just "weights" of 0 and 1, with no falloff.
-The hard selection and the soft selection are two separated types of selections, one implemented like a bool, and one like a float attribute.
-The soft selection is implemented as a hard selection (bool attribute) but the falloff is managed on the node that uses the selection: e.g. the point translate (and every other node that operates on selections) has a falloff option to interpolate the effect.
In both the first and second case, It's obvious to me, that at a certain point vertex groups should be the same as vertex selections, and there is the need of general blender concepts like face groups/selections (already somehow there as faces sets) , and edge groups/selections.
Let me know your ideas and thoughts about that.
Edit 1: I added nodes mockup
3 Comments
devtalk.blender.org/t/geometry-nodes/16108
Are you suggesting to link this proposal on that thread? Or do you mean that this is already discussed in there?
I mean that there is active discussion going on right now for Geometry Nodes- the best time to be involved with that discussion if you have ideas or feedback. It's possible that something like this is already planned, but if not the best time to get eyes on a something like this would be now.