Occlusion Culling doesn't work

I made in the Shootergame example project (a new map) a landscape with a dungeon, now if I’m standing outside and look into the direction of the dungeon I get low fps even I don’t see the dungeon because it is fully concealed through the landscape. If I delete the dungeon and look again the fps are high. So the dynamic occlusion culling doesn’t work in this situation.

Why this happen? Any ways to fix the dynamic occlusion culling?

Should I use precomputed visibility? The cave walls are static meshes, should or may the cave walls be into the precomputed visibility volumes or only the place where I can walk (without the walls included)?

Hi,

Dynamic occlusion is on by default and does a pretty good job when given the opportunity. Unless all your static meshes are all one single mesh then occlusion is working.

You can test this by using the console command r.visualizeoccludedprimitives 1. This will create a green bounding box around the actors that are occluded. This will work only while working in the editor and not while in PIE/standalone game modes. Alternatively, you can use the console command FREEZERENDERING to toggle the current rendering state. Move the camera to outside of the are where it’s suppose to occlude the actors behind it. Use the console command and then you’ll see Rendering Frozen in the top left of the screen. You can now freely move the camera around the scene and it will have frozen/paused the actors at their current rendering state. So if they were occluded and not being rendered they will not be visible when you move the camera behind you walls that were occluding them.

This is a good method to start troubleshooting your occlusion issues. You can also use the console command Stat Initviews while in PIE/Standalone game and look at the counters at the bottom. Follow the stat for Visibile Satic Mesh Elements. This number should rise and lower depending on the number of Static Meshes that are visible in the viewing area.

Lastly, for Precomputed Visibility Volumes, this is a static, offline, way of handling occlusion. There are some caveats to using it, but overall it can be used. Before investigating adding it to your game I would instead troubleshoot and narrow down the issues regarding your issue with dynamic occlusion before moving to something else.

There is some documentation that is being worked on for Visibility Culling, Precomputed Visibility Volumes, and Cull Distance Volumes that will be available hopefully in the not too distant future.

If your still having issues or something I said doesn’t make sense feel free to post back here.

Tim

Thanks Tim, with the console commands I see that everything is culled out in the dungeon if I’m outside. I have found the source of the low fps, they are the lights in the dungeon. After deleting the lights in the dungeon the fps is same if I delete the whole dungeon.

They are stationary and some few moveable lights. Why this happen, how does the engine work with lights from culled area? Any way to fix this?

The radius of the lights doesn’t touch the landscape, see pic.

At this point, I would say it would be a good idea to run some profiling tests and see what the results are. The FPS counter is not the most accurate way to know if you’re game is optimized or performing well. These three pages below should get you started in your investigation.

As for the lights, I find it suspicious that it’s causing that much a dip, but this is without knowing or being able to profile your scene myself. It’s a good opportunity to learn about optimization since it’s not something that can be necessarily summed up in a few sentences for things to make it just work without investigating.

With GPU Profiling I see that all lights which are in the dungeon near the landscape interacts with the landascape and casuses this low fps. The lights radius doesn’t touch the landscape but was 2-13 meter away from the landscape.

The landscape uses the Grass Tool which causes this strange problem. After removing the grass tool foliage from my landscape material, the lights doesn’t interact with the landscape anymore. It seems to be a bug. This happens only with stationary lights. Static or dynammic lights are ok.

Sorry for offtopic but:
Is it true that the grass tool have more performance cost as I would put the grass self with the foliage tool?
What is with Procedural Foliage Tool? Is it so fast in the game as I would put the foliage self with the foliage tool?