Geometry Nodes - Precise face index range selection and other questions

Hi guys,

I’m looking for some advices since I’m having a hard time figuring out how to do some precise face selection in Geometry Nodes.

At first I was trying to do a precise procedural model but I have realised that selection field aren’t working like I was expecting. For example with the Extrude Mesh node, Top and Side output aren’t enough, I need more control over the selection for subsequent extrusions.

So I did a simpler example ( from @Charles_Weaver thread, thanks ! ), and I’ve realized that I really don’t understand the concept behind selection in GN. I can’t even target a specific face with an integer node.

Base Mesh

Attempt to target a specific face

Attempt to target a face index range

So as you can see nothing works as I’ve expected, I really must have missed something so I have few questions :

  • First why the selection field is a boolean value ? I was expecting an integer value for an index range ( of vertices / edges / faces ID )
  • How to do a range selection ?
  • Can I make a relative selection to the current index range ( for example the first element, or the last 3 ? I thought I would use Min / Max and Add / Sub for this )

And finally is it the right way to work with Geometry Nodes ? I have seen quite some examples of GN nodegraph which often relies on geometric properties / attributes rather than elements index / ID.

Thanks !

2 Likes

To select a single face, you don’t need to capture the attribute:

  • The selection is a field of booleans because an element is either selected or it isn’t. You need to do the integer evaluation and boolean math to get your selection set.

  • This is a way to select a range of face indices:

  • a relative selection is a bit tougher, you essentially need to modify your original selection to extract the relative info based on what you input:

4 Likes

Thanks for the help ! I now understand a bit better the logic behind selection, so I’ve made some node groups for my needs.

Select Last

Checker Selection

GN_01_Select_Nodes.blend (1.1 MB)

5 Likes

That is cool, but what if you want to get the index of faces of an input mesh, NOT a mesh primitive generated by geonodes?

For input meshes, I found a workaround using the Edge Split Modifier, and then adding Geometry Nodes modifier under that like so. Edge Split>Edge Angle essentially will give you mesh islands based on face angles relative to eachother, like with auto smooth. Each island has its own index number. These of course change if you change the Edge Angle, and they increase in total count as the Edge Angle drops to 0 because it has less of a tolerance for different angles between faces and separates them.

And yes you can do those fun extrudes tricks discussed earlier: