Do you experience mesh flickering or does your mesh gets invisible too soon when it is at the corner of the camera?
Chances are high that your problem is bad culling. Which is what this article is about.
This article includes:
What is culling?
Fixing culling problems
What is culling
In short, culling is the general term for methods to reduce the number of visible objects in a scene with the goal of gaining performance.
Two important culling methods are Distance culling and Frustum culling.
Distance culling
Distance culling does not render actors when they reach a certain distance. This type of culling is often used for small foliage objects but isn’t necessarily suitable for bigger objects like buildings.
Frustum culling
This method simply ignores objects which are not inside the camera’s frustum. Objects who are occluded by other actors will also not be rendered.
Fixing culling problems
Unreal Engine checks if an object is visible by the object bounds.
Here you see the object bounds for a cone. The Sphere, which is larger than the box most of the time, is used for fast collision tracking, the box for a more accurate one.
Culling problems occur mostly because of a too-small bounding box.
An easy way to debug this kind of problem is to visualize occluded objects. You can achieve it with this comment:
r.VisualizeOccludedPrimitives 1
If you see a too small bounding box for the problematic object, then bad culling is your problem. But luckily, the fix is simple. The unreal engine allows you to change an objects bounding size for both static and skeletal meshes.
You find the Positive Bounds Extension and Negative Bounds Extension settings in the static and skeletal mesh editor:
For actors, you can increase their bounds scale by the Bounds Scale setting under the Rendering Tab:
When you adjust the bounding box, try to adjust it as much as necessary but as little as possible to save performance.
This is all for today. I hoped this information helped you!
If you have any questions, feel free to write them in the comments.
If you haven't subscribed already, make sure you do to never miss out on any content! There are no costs, and you can quit whenever you want.