For the face F, how could I get the ID/Index/any information of f1-f4 in GN?
The Face Neighbours node only provides face/vertex count, just doesn't help.
For the face F, how could I get the ID/Index/any information of f1-f4 in GN?
The Face Neighbours node only provides face/vertex count, just doesn't help.
To select the faces adjacent to a specific face, you can use the following solution:
Here, first evaluate the corresponding selection in the Face domain and then repeat the process with the node Evaluate on Domain
, but select the Edge domain and set this to "Float".
What happens here?
First, a Boolean value is defined in the face domain, which outputs true or false depending on which faces are selected. In the second step, this is evaluated in the edge domain with a float value, which means that all edges of the selected faces are assigned the value $0.0$ (for false) and $1.0$ (for true).
However, as the neighboring faces are to be selected at the end and the query is therefore based on the face domain, the float values from the edge domain are then interpolated and rounded up again to a Boolean value (true or false) as soon as just one of the edges has a value above $0.0$.
Btw: If you switch the node from "Edge" to "Point", you can also select all adjacent faces that do not share a common edge:
And of course this solution also works if you select several faces at the same time:
Evaluate on Domain
from face to edge to point to face in order to select (yuck). But even then there's not a good (fast) way to read a stored attribute. With Eval at Index
I can get 30 FPS on a grid with known indices, but on arbitrary topology the domain selection technique yields 12 MINUTES per frame.
$\endgroup$
Commented
Feb 24 at 1:18