tessarakkt/godot4-oceanfft

better performance of mesh/lods

Opened this issue · 4 comments

lw64 commented

I used the clipmesh of Terrain3D as a replacement for the quadtree based mesh thast there currently. It works way better and I got it running in the editor even.

Terrain3D referring to https://github.com/TokisanGames/Terrain3D ? Does clipmesh refer to the GeoClipMap defined here? https://github.com/TokisanGames/Terrain3D/blob/main/src/geoclipmap.cpp?

lw64 commented

yes.

lw64 commented

basically I modified the ocean shader to work as a custom terrain shader and put it into the terrain3d node. then modified ocean.gd to change the shader parameters of the terrain3d node. Note that you need to add one dummy terrain material, so that not automatically the squares debug view gets enabled.

I haven't had a chance to try this out myself, but I am very much interested in this idea. Do you have an example project you are willing to share? From what I understand, this would allow a combination of ocean and land within the same Terrain3D, correct?