Advice on Tessellation system

Im planning on making a custom water engine so that I can have more control over what it looks like and how it behaves. For performance reasons, I will have to start with a very low poly grid (something like 64x64 studs) and then increase resolution of this grid the closer the geometry is to the camera.

This requires me to dynamically change the number of vertices. How would you guys go about it?

I could completely wipe the mesh every update, then rebuild it with tessellation near the camera’s current position. This would incur heavy performance costs every time the water is re-tessellated.

I could also find some way to add and remove vertices dynamically. This would probably be the better way, but i would need to be able to reference specific vertices and remove them

How about a grid pinpoint system where the water is low resolution except for the specific node the player is located in? That way you can easily select every vertex you need cleanly and only update when the player veers too close to another grid. The surrounding grids can be slightly less complex so from the player’s pov the water seamlessly changes.

In this image, the big white nodes are low poly and distant, the red squares are subdivided nodes that are slightly higher quality shapes, and the dark red squares are complex water formations where the player is.

(excuse the white watermarks and bad coloring)

Edit: I’m actually trying to solve a similar problem right now. I hope this is what you’re asking.

1 Like