Proper way to do an infinite subdivided plane

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By PaperMartin

I’m making a plugin that adds “water bodies” to godot, and I want to add the option to have infinite (or really big) water planes, like oceans etc (right now it’s only 1 plane with a setting for the scale and subdivision)

The issue is, I don’t really know what’s the “proper” way to do that. I imagine it involves a huge grid of planes, and dynamically spawning them in and out, but I don’t know if I should just do that with a bunch of mesh instance or if there’s a better optimised way to do it.

I also don’t know if there’s a way to change the amount of polygons based on distance too

The plugin right now
A video