Dynamic Tessellation For Blender
What Is Dynamic Tessellation?
Well, in blender terms, it's adaptive subdivision. Basically its a method to subdivide an object dynamically based on camera distance and view frustum. Here is a video about it if you prefer to watch that.
Why?
Well put simply, the built in version of this feature takes WAY too much vram. Even in very simple scenes, the adaptive subd modifier can eat vram especially if you don't have that much like me. That was the starting goal for this projects but the node group also opens up a lot of other possibilities, one of which is use in Eevee Next. As of 4.2 Eevee has texture displacement, but no dynamic tessellation. This means if you want to use texture displacement in Eevee you have to subdivide the entire object which is incredibly unoptimal, but now, its just a simple node group. Another thing you can do with it is damage effects where you only need to subdivide a small area to add detail. I've also added some geometry nodes tools which are used in edit mode which we will get into later.
Disadvantages
While this node group is nice, it's not a one size fits all solution. If you have a lot of vram then it might not be so needed as you can tank the hit from the built in adaptive subdivision. This node group is also going to be pretty heavy on your cpu and ram (normal ram not vram) which can be a downside. For me, I prefer to take the hit on my CPU instead of vram but you might not. Even if you don't want to use this as a replacement for adaptive subdivision though it can still be used in the other ways I mentioned earlier.
Showcase
Camera Version
As you can see in this gif, the camera version of this node group subdivides your object within the view of the camera, and no where else. It allows for a lot of customization, as you can see the subdivision is following a pattern, that's because I gave it a displacement map to follow to avoid pop in (you'll see this in the settings cheat sheet later).
Object Version
This version is basically the same as the camera version, except the distance is based on an empty object and not the camera. You can still use the camera as a mask so that you aren't subdividing polygons unnecessarily.
Tools
I have these tools setup so that I can access them via the 'Face' menu at the top of my screen. If you want to do that you will have to organize the asset browser like this where you have the Dijkstra and Distance Dynamic Tessellation in a folder called 'Face':
Distance
The Distance based subdivision will subdivide an area around the selected face. This is the same method used for the other version but it is used in edit mode as you can see below and springs from the selected face.
Dijkstra
This version of the tool is useful if you want to subdivide only connected faces. As you can see in this example, Dijkstra is a path finding algorithm and it allows for the 'Distance' setting to be a face value instead of in meters. This means the subdivision will spread from the selected face and won't subdivide anything that's not connected to it.