Occlusion Culling & Bounds Scale. Is there a better way?

So we have a corridor level, created with wall pieces crafted by our artists, that have been placed in blueprint actors in order for us to re-use “modules” to create our level.

There is a problem with these wall meshes visibly popping in when the player comes around a corner too fast and they become un-occluded. On searching around I discovered that increasing the Bounds Scale under Rendering on these meshes should help fix this problem. It has helped somewhat, however I’m having to use values that seem a bit too large (up to 20 for example)

What’s struck me as a problem is: This still doesn’t fully solve the issue. AND I’m going to have to go through and set this manually on every placed wall piece in the game; which is far from an ideal workflow.

My question is thus: Is there a better way of solving this popping problem? Is there anything we can do to the meshes when they’re created to add a “custom bounds”? Can I not set this value on the mesh itself instead of having to do it every time I place the mesh in a level?

All help super appreciated! There has to be a better way!!?

1 Like

Before I ask you any further questions, can you try something for me?

Run your game (in editor or standalone, it doesn’t matter) and execute the console command “r.HZBOcclusion 0”. After running this, do you still have the same problems with pop-in on your wall panel meshes?

With setting on 0,1 or 2, the popping still occurs.

Hi AH_Rob,

Here’s a break down of the options you can use with Occlusion Culling.

Bounds Scale: This is mesh specific and can be changed via the details panel. The default value is 1.0. Increasing the bounds scale to 1.15 increased the bounds enough that These object rendered before the noticeable pop-in. Since the walls are broken up into smaller pieces they have a smaller bounds (which can be visualized by going to viewport > Show > advanced > bounds). Smaller object bounds will occlude the object more quickly to better optimize the scene.

r.VisualizeOccludedPrimitives 1: enabling this console command will use green bounding box around any occluded primitive. This works while editing, but not during PIE/simulate. This can be useful when adjusting the bounds scale of objects to see if they are occluded or not. The green bounding box will adjust to the size set for the bounds scale.

Project Settings > Rendering: Disabling Occlusion Culling completely. Not really an option for most, but an option none-the-less.

r.HZBOcclusion: This setting used to be enabled by default (which if you look at the tip in the output log will indicate 1 use to be the default), but needs to be enabled now to use since it still needs a little bit of work. HZB Occlusion’s results are more approximate, but it is meant to scale better.

0 (default): disabled

1: Use HZB occlusion system (Less GPU and CPU cost, more conservative results)

2: Froce HZB occlusion system (overrides rendering platform preferences)

Enabling HZB Occlusion will likely provide the better result for you without the need for tweaking bounds scales for any meshes that are causing issues. In your test scene, simply enabling HZB occlusion solves the issue. There is the occasional pop-in from the corners if moving the camera really fast, but it’s not as noticeable as before. On the other hand, if it’s only a few meshes that are causing issue then I would suggest adjusting just those meshes bound scales slightly until they do not pop-in like so.

Can I not set this value on the mesh itself instead of having to do it every time I place the mesh in a level?

This value is on a per-instance base in the level, however you can put the asset into a Blueprint and then edit the property for the mesh inside the BP or the BP bounds itself.

I hope this has been helpful.

Tim

1 Like

Increasing the bounds scale did not solve the issue, nor did Enabling/Disabling HZB Occlusion.

You can use the visualization mode in the editor with r.visualizeOccludedPrimitives 1 to see how occlusion is working. This will be indicated by a Green Bounding box based on the Bounds Scale set for the mesh.