Subdividing edges in geometry nodes

In edit mode, it’s trivial to subdivide an edge without also subdividing the neighboring faces:
Subdivide Edges - Edit Mode - 2024-05-04
But I have not been able to figure out a simple or robust way to do it in geometry nodes. Does anyone know a way?

Hi!

I thought this was an interesting problem, so I tried my hands at building a “Subdivide Edges” node group, that let’s you specify the edges to cut and number of cuts per edge:

I build the node group in 4.2, but I don’t think I used any of the 4.2 specific features. Here’s a .blend-file, if you want to give it a try:
Subdivide Edges Node.blend (1.1 MB)

It works as follows:

  1. It breaks the mesh apart into its faces
  2. Then it replaces each edge of the faces with a curve that is subdivided (resampled) according to the specified number of cuts.
  3. The curves are then reconnected to build the borders of each face from which the Fill Curve node actually creates mesh faces.
  4. In the end Merge by Distance stitches the mesh together again

Caveat: The node group tries to not unnecessarily merge vertices to keep the connectivity of the input mesh. It does so by excluding edges that were only connected to one face from the merging at the end. This should work ok on most clean meshes but it will still break in some cases.

Hope this helps!

5 Likes

Thank you for that! I had hoped it wouldn’t come to “replace faces with filled curves with the target number of vertices” but even so, I’m glad you got it to work!

Thanks again!

1 Like

Geometry Nodes: Resample Edges node/

3 Likes