7
$\begingroup$

Is there a way to Bridge Edge Loops using Geometry Nodes?

Like if I have two edge loops, each assigned to a different vertex group of the same vert count, is there a way to get Geometry Nodes to bridge them?

$\endgroup$

5 Answers 5

3
$\begingroup$

The solution for Blender 3.1.2 would be the following:

enter image description here

  1. The vertex groups must be transferred to previously created Group Inputs (type: Boolean), so that these can be used as selection.

  2. With the help of this selection, the upper vertex group is separated from the lower part and the edges thus obtained are extruded by an arbitrary value.

  3. The extruded points are then repositioned with the node Set Position to the positions of the also separated edges of the upper part.

    It should be noted, however, that the number of points is subtracted from the index with the node Transfer Attribute, because the extruding process has now created twice the number of points. The same result can also be achieved by using the math node Modulo instead of the subtraction.

$\endgroup$
1
  • 1
    $\begingroup$ Awesome! This is exactly what I had in mind. Thanks for providing the .blend as well, as it was helpful for determining that the setup works as expected. For example, even when the geometry is transformed with the Transform node, the "bridge" remains connected. $\endgroup$
    – Mentalist
    Jun 5, 2022 at 19:03
6
$\begingroup$

Here's my take on it. Currently it is quite hard to instance or join geometry without resorting to "third party" objects. 2.93 is really limited in this regard so I'll use nodes only available in the 3.00 alpha. I hope you're not against using bleeding edge versions.

It breaks easily and is barely customizable but it may be a good start depending on your use case.

I assume you've setup your VGs like that :

n

enter image description here

Here's the setup :

enter image description here

Explanation :

  1. We transform the geometry. Translation, rotation and scale along Z is okay, but it starts breaking for transformations along X or Y axis.

enter image description here

  1. We delete all but the Top ring of the displaced geometry. This will help us compute the distance in the next step.

enter image description here

  1. Use the Attribute Proximity node to compute the distance of the bottom ring to the top ring of the other displaced geometry.
  2. Use an Attribute Mix to displace only the bottom row to the position of the nearest vertex on the displaced geometry, by using the Bottom weight as a factor.
  3. Join both geometry islands.

As you noticed, it doesn't create a bridge, but displaces the bottom row.

enter image description here

One way to circumvent that is to add an edge loop at the bottom and set it all the way next to the bottom edge's vertices. You then need to remove the new vertices from the Bottom VG because they will have a non-zero interpolated value.

enter image description here

Playing with the transform node :

enter image description here

$\endgroup$
3
  • $\begingroup$ Thank you for the interesting and nicely illustrated answer! I don't mind that it's for an alpha version, considering that otherwise there currently appears to be no other way to do this. I'm not sure this can be a solution for my use case though, because: "it starts breaking for transformations along X or Y axis". This would probably make creating tree-like geometry that branches off impossible (which is what I had in mind). But this is very interesting. $\endgroup$
    – Mentalist
    Jun 16, 2021 at 19:12
  • 1
    $\begingroup$ @Mentalist Yeah it was really a proof of concept ^^ but I'm sure in future versions there will be tools to do it more easily and foolproof it, the toolset is already expanding very fast ! $\endgroup$
    – Gorgious
    Jun 16, 2021 at 19:58
  • $\begingroup$ Now that 3.0 is out, would you be able and willing to provide an answer using the current nodes? (No need to change your existing answer, but perhaps as an additional answer...) I'm trying to recreate what you did, but in 3.0 ...many of the nodes have changed so much that I'm not sure what to do (especially with Attribute Mix being gone). $\endgroup$
    – Mentalist
    Jan 19, 2022 at 6:31
6
$\begingroup$

Here is how you can do it in Blender 3.2 alpha. You may want to Merge By Distance at the end or remove the excess joined geometry.

Pre bridged edge loops to bridged edge loops

Optimized bridge edge loops

$\endgroup$
3
$\begingroup$

I wanted to share a more elaborate version of quellenform's original answer, where even with a random vertex order, you can achieve a perfect bridge.

enter image description here

The way I did this is by converting the selected loops to curves, (then back to a mesh for extrusion) so that it reorders itself automatically. You can also reverse one of the loops if the faces are intersecting, and even offset the order too.

I added a few other options if you're interested.

Note : The Sample Index node is called Transfer Attribute in Index mode in Blender 3.1.2, this was done in 3.4)

$\endgroup$
1
  • $\begingroup$ Thanks for sharing. That's clever, getting it to reorder with curve conversion. :-) $\endgroup$
    – Mentalist
    Feb 8, 2023 at 7:48
2
$\begingroup$

And here is another funny solution for Blender 3.1.2:

This one simply creates a new mesh from the separated edges of the top and bottom parts with the node Convex Hull, from which the top and bottom faces are then removed, and then reconnected to the two original shapes.

Note: However, if the two parts are twisted, triangles instead of quads will be created in between.

enter image description here

$\endgroup$

You must log in to answer this question.

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