# How to subdivide a selection of faces in geometry nodes

In Geometry nodes I am trying to make a selection of where I want the subdivision to be applied, the only way I have been able to do this so far has resulted in the subdivided section being disconnected from the rest of the mesh. example images below are done outside of geometry nodes but achieve the same effect of subdividing by selecting faces however I am trying to do it procedurally any ideas would be greatly appreciated thanks!

• As far as I know you can only apply subdivision to the whole geometry. If you want to apply to only a part of it you will have problems with the topology. Sep 19, 2022 at 13:23
• thank you @chris for the quick response to my question, your response is basically what I had got already, the problem I'm having when I add distortion imgur.com/a/3ZZCFiy it is still disconnecting from the mesh even with the merge by distance (may be due to the way I am applying the noise) but it seems to work differently to outside of geometry nodes where it seems to divide the vertices for the joining faces which seems to keep them attached, hopefully, this all makes sense, any ideas to how I could fix this would be appreciated! Sep 19, 2022 at 13:42
• Short answer: would be nice, but does not work. A subdivision cannot be applied to a selection. Sep 19, 2022 at 13:54
• I think Chris was close to the solution, it's "just" that you need to iterate over all edges that were subdivided, find the edges in the same place but connected to the part of the mesh that wasn't subdivided, get the face(s for non-manifold geo) of that edge, check how many vertices it is supposed to have after update, create a circle with that number of verts, position the verts, delete the edge, repeat for all other edges, merge by distance. Easy. 🙄 Sep 19, 2022 at 17:26
• As @quellenform said, would be nice but doesn't work. Unfortunately the Subdivide Mesh doesn't work like subdividing a real mesh in Edit Mode. When you select e.g. a single face in Edit Mode and right-click > Subdivide, the face is connected to the adjacent faces. Subdividing it splits mutual edges with the other faces so they stay connected. Since the Subdivide Mesh node doesn't have a Selection input, separating faces to subdivide them will result in having vertices on edges where the adjacent edges of the separated faces don't have any, so Merge by Distance cannot work. Sep 20, 2022 at 7:00

## Local Subdivision

The example uses a cube that has been subdivided twice as the base model. This method moves new verts on the edge of the selection to this nearest old vert; if your topology is sufficiently dense or weird this may cause issues. Currently the vertex_crease attribute can't be accessed in geometry nodes, that is why the Named Attribute node > Add node combo is not connected.

(Blender 3.3)

## Old Version:

The example uses a cube that has been subdivided twice as the base model.

Overview: This method sets the position of each new nonmanifold vert created by the subdivision node to the position of a neighboring nonmanifold vert. Neighboring verts are found by saving the nonmanifold verts' indices into to a curve. The curve lets us find the original index of any nonmanifold verts relative to the current index(i.e. index+1 finds the next vert along the nonmanifold edge).

Note: The Mesh to Curve node seems to always select an original vert(rather than one created by subdivision) as index 0 for the curve. This means index-1 should be used when finding a neighboring vert.

(Blender 3.3)

You can also use the Decimate modifier after a subdivision modifier. That way u can use the vertex group input in Decimate to select which area of the mesh has more or less decimation. I like to use weight paint to determine the areas that will have a more subdivided mesh. Downside of this approach is that you don't get exact quads with Decimate but upside is you can achieve a smoother transition between the high poly to the low poly part of the mesh.

• I hope they add a Decimate node to geonodes soon, that way this operation can be done inside geonodes instead of w modifiers Jan 28 at 21:23