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!
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.
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.
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.