3
$\begingroup$

I want to move an edge loop (marked blue in the image below) along the x-axis. Is there a way to select an edge loop in Geometry Nodes? enter image description here

$\endgroup$
2
  • 1
    $\begingroup$ Do you want a solution to this specific scenario or to be able to select an arbitrary edge loop in an arbitrary mesh ? $\endgroup$
    – Gorgious
    Commented Mar 28, 2022 at 8:52
  • $\begingroup$ I imagine if I have the solution for this scenario, I might expand the idea across other projects. The problem is I don't have a fundamental idea of selecting an egde loop (or face loop for that matter.). Give me what you think is best to learn. $\endgroup$ Commented Mar 28, 2022 at 8:57

4 Answers 4

10
$\begingroup$

In Geometry Nodes there is no node that says "Select this or that edge loop" as you know it when editing your mesh in Edit Mode.

...the only possibility you have with Geometry Nodes is to select the points or edges by their indices.

You have different ways to get to these indices, but it basically depends on the topology of the mesh.

If you use a mesh primitive like in this example, the matter is easily solved with a little logic, since the order of the points/edges is always continuous and traceable.

However, if you use a self-made or more complex mesh, this does not help you, because then the order of the indices is usually wildly jumbled, and thus no logical selection can be made. In this case you would have to check point by point whether the index meets your criteria or not.

Selection of edge loops in a grid:

  1. In each case you have to find out or know how many points one of the two sides consists of, because only then you can select a certain row. Of course, this is different for rectangles and squares. With a rectangle you must know at least the number of points of one side, with the square the values result from the square root of the number of the total points:

    How do you select an edge loop in geometry nodes - Screen 1

  2. With this value for the number of points of a side you can now create a selection.

    Instead of tinkering with Modulo here, the simpler solution is to use Snap instead!

    Snap "rounds the input value down to the nearest integer multiple of Increment ". Increment in this case is the number of rows.

    Depending on which direction you want to select, you directly compare the index of the current point with the result of Snap, or multiply the index again by the number of rows and then compare:

    How do you select an edge loop in geometry nodes - Screen 2

This logic can be applied to all grids that are either rectangular or square and created with Geometry Nodes or that have continuous indices.

How do you select an edge loop in geometry nodes - Screen 3

Here is the blend file:

$\endgroup$
5
  • $\begingroup$ Good work, sir! thanks $\endgroup$ Commented Mar 30, 2022 at 7:06
  • $\begingroup$ The problem is not solved satisfactorily. I think I want to leave it open. $\endgroup$ Commented Apr 15, 2022 at 22:08
  • $\begingroup$ @EdwardSerfontein If this update doesn't help either, then there is a serious problem with your grid ;-) $\endgroup$
    – quellenform
    Commented Apr 16, 2022 at 18:16
  • $\begingroup$ Thank you for the update. Very informative and well explained. I think I phrased my question wrong. These methods all do work. But they are complex and the effort does not justify the selection of a loop/s. I am aware that almost everything in geometry nodes requires more effort to do compared to traditional methods. I think loop selection sits at the extreme end. I was hoping someone would post a simpler means. Thanks again for your efforts. I do appreciate. $\endgroup$ Commented Apr 16, 2022 at 18:55
  • $\begingroup$ @EdwardSerfontein Geometry nodes don't offer a solution for every problem, of course. It is only one approach of many, and it always depends on how procedural you want to make your scene. btw: With Chris's answer you don't get a selection for an edge loop. ;-) ...So if this answer still doesn't answer your question, then it would be good if you could modify your question again. $\endgroup$
    – quellenform
    Commented Apr 16, 2022 at 19:06
2
$\begingroup$

one very tedious way to do that is use the vertex indices like this:

enter image description here

$\endgroup$
1
  • 1
    $\begingroup$ I would not say it's tedious, I'd say it's a way to select specified vertices. This method becomes tedious only as the number of vertices in the mesh increases. Nevertheless, thank you for your contribution. I was however hoping for a different solution. $\endgroup$ Commented Mar 28, 2022 at 9:25
2
$\begingroup$

Thought I would add another answer to this since I find it so useful

img1

img2

$\endgroup$
1
$\begingroup$

You could also combine both Quellenform and Chris's answers and move the edge loop using a Set Position node like Chris mentioned but also use Quellenform's edge loop node setup.

1) Original setup img1

2) Edge loops moved img2

3) Animation: ani1

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .