I have a landscape in my scene and a contour-grid material applied to it. The material uses WorldPositionOffset to create the gravity wells. In the image below you can see that the components of the landscape are being culled because without the material they would be obstructed by the Star.
I can fix this by going to Project Settings > Engine > Rendering > Culling and unchecking Occlusion Culling.
However, actors that are outside the camera view are still culled. Consider a material that simply offsets a mesh’s Y position by -30000.
In the left image below you see this material applied to a sphere placed behind the planet. Since OcclusionCulling is off we can still see the mesh. However, as seen on the right, a slight rotation of the camera causes the sphere to be culled.
Now I can fix this by selecting the sphere, going to Details > Rendering and increasing Bounds Scale. Increasing it to 15 gets rid of culling completely. The problem is that for a Landscape there is no “Bounds Scale” option. The best I can do to imitate increasing the bounds is to set the landscape to have 255x255 quads and 2x2 sections. But even with that I still get bad edge culling as seen below. A slight change in camera angle causes culling.
To completely irradicate camera culling you need to set the Bounds Scale such that the bounding box completely contains the material offset, eg. the left image. Now as seen in the image on the right, landscape components seem to have a 2-dimensional bounding box, making any normal-offset problematic. So even scaling the bounding box won’t help me. I would have to set the dimensions of the bounding box manually or have the camera cull by the bounding sphere.
Before you say “just use a static mesh instead of a landscape,” I’ll say that doing that costs a lot more to get the same contour/well resolution. Using a landscape gives you a major LOD advantage. To get the same resolution I would need a static mesh with 2000x2000 vertices which would be 600MB added to the project as well as a major performance hit. I could use many static meshes… essentially one-to-one correspondence to the landscape components, but… I’d rather not.
1. How can I set the bounds scale of a landscape (component)?
2. Better yet, how can I manually change the bounding box dimensions of a landscape (component)?
3. How can I set the camera to cull by bounding spheres rather than boxes?
4. Is there a better way to avoid the camera landscape culling?