How to do proper culling with Mesh

Godot Version 4.2.1

How to do proper culling.

I want to make mesh which is static (not changin over time). So I tried to implement it with ArrayMesh. But this is very large mesh so it is less efficient to render them all So I need frustum culling.

Implementation:
I devided the mesh into multiple surfaces and Subsurface helper class holds verticies and indexes the surface and all the sub surfaces store in an array. And I calculated AABB for the sufaces. I run for every subsurface and check it’s AABB aginst camera frustum. If it intersects and not added to mesh I call add_surfaces_from_array() on mesh using data on subsurfaces.
But if AABB misses frustum and already in the mesh I had to call clear_surfaces() and re-add all subsurfaces which are intersects the frustum.

This feels purely inefficient. I wonder what is the best way. I am hoping an answer. Thank you for your time

Not really sure, but how complex is this mesh? Could you not use a small mesh and then repeat it with a MultimeshInstance3D node (or a few of them)? Then you can use the normal culling settings on the node.

You could also try creating individual meshes out of your surfaces and have Godot do the frustrum culling for you, using regular MeshInstances.