Occlusion problem


When I’m opening doors in my project I can see that some objects are appearing. It is connected to visibility occlusion.
The simplest solution would be to exclude doors from vision blocking occlusion.

Is it possible to do this?

Still havent found a way to fix this. Any help?

Hi Jaro,

The issue you’re running into here is caused by dynamic occlusion. You get that instant flash/pop that happens where a meshes bounds are now within view and then rendered.

I’ve covered this briefly in a video before that I’ve done to show some tips/tricks for occlusion culling that you can find here: PBF: Brief Overview of Occlusion Culling - YouTube

There a couple of things you can do to get around this.

  • If this is something like a wall or floor mesh that is popping into view try not to over modularize these so that the wall has the larger bounds and you won’t have as much of a problem where these individual pieces have to be checked via dynamic occlusion queries.
  • Depending on the scene and your overall setup, use larger meshes to surround the rooms outside of the one you’re coming into with a dark material or closed off from light. This can help mask the popping you’re seeing. Think of it like a cave loading in chunks but having a brightly lit outside that’s noticeable when these chunks pop in blocking the light,
  • slightly increase the bounds scale for the mesh so that its bounds are within view to be checked for visibility.
  • Use “r.HZBOcclusion 1” that uses a different approximation for calculating mesh bounds. This can help reduce some of the popping you’d likely see.

Theses would be the areas I would start with when correcting something like this.


I have seen your video before writing this post.
Poping happends mostly on frames/doors/stairs

Increasing bounds scale helped when turning characted around, but not helped when opening doors. r.HZBOcclusion 1 is not giving any effect. Also I can’t use your solution with large mesh surrounding rooms.

Can you show a video or couple of images demonstrating your setup for your scene? Or if you have a sample scene setup I could take a look and give more direct feedback.

I really would have expected HZBOcclusion enabled to help more so here, but I guess there could be some edge cases where it wouldn’t depending on how everything is set up. With doors opening, depending on how fast it opens you may want to slow down the door opening to hide this.

Another alternative would be to use the console variable for “r.AllowOcclusionQueries 0” to disable hardware (GPU) occlusion queries. This doesn’t disable frustum culling or cull distance volumes, but just dynamic occlusion that results in this popping. So what does that mean you may wonder? That means that anything in the cameras frustum direction will not be occluded. So the wall/door would not occlude anything behind it leaving it rendered ALL the time. You would need to extensively use cull distance volumes, Max/Min Draw Distance settings, and Precomputed Visibility to no longer render these when not and occluded by another actor. I recommend using other methods to hide the popping before disabling hardware occlusion queries, but it’s an option. Also, if you do use it. I would only recommend it being used when absolutely needed for the level and not as a project wide solution.

Thank you for this option, I think it is gonna help :slight_smile:

If this doesn’t help or you have trouble setting up any of it just uncheck the accepted answer, so that I see it in my queue again, and I’ll see if I can have some other suggestions. :slight_smile: