Occlusion (or visibility) culling not working on mobile?

Currently when under SM5 rendering, I think culling is working correctly and draw calls are reduced significantly when I’m facing directly at the wall. However, when I switch to either ES2 rendering or deploy and play on an iPad, even when I’m facing directly at the wall and I can’t see anything beyond the wall. It seems like everything behind the wall is still rendering (seems like I can see through the wall). I’ve attached screenshots to illustrate the problem.

SM5 rendering

ES2/mobile rendering

Is this expected behavior? How do I make the engine not render the objects behind walls as this is starting to give me performance issues when running on mobile?

Thanks!

Bump this question. I have the same problem.

Hi -

Dynamic occlusion is not handled on mobile. You will want to use Precomputed Visibility Volumes around your playable areas. Then you can build lighting and it will use the cell size to handle occlusion on your devices.

There isn’t a whole lot in the way of documentation for Unreal Engine 4 at the moment, but the documentation from UDK/UE3 is still fairly accurate with using this system. There are a couple of things that are no in UE4 that is demoed in this page, but it can still help you get it setup and working properly.

https://udn.epicgames.com/Three/PrecomputedVisibility.html

I hope this helps.

Tim

1 Like

Can you tell me why dynamic occlusion is not enabled on mobile? We are building a project with scenes that consist a lot of objects, therefore, occlusion culling is fairly important.

@EGDiamondDog

Dynamic occlusion is expensive to put it lightly. These occlusion tests need to be sent to the GPU and then read back. The limitation of a lot of mobile devices is their capabilities to have a powerful GPU.

As far as Visibility and Occlusion culling goes this is the order they are considered from cheapest to most expensive:

  • Distance based (Per instance setting and Cull Distance Volumes)
  • View Frustum Culling
  • Precomputed (Precomputed Visibility Volumes)
  • Hardware Occlusion Queries (Dynamic occlusion)

As mobile devices become more powerful it may be possible for this to change. Even with dynamic occlusion as an option, it is always recommended to still use Cull Distance Volumes and Precomputed Visibility Volumes to reduce the need for the queries to be sent to the GPU. This is where a lot of performance loss can bottleneck by having so many actors to check their visibility state.

The only thing that makes Precomputed Visibility a bit more expensive is that it is precomputed and needs to store the information. The larger the are you’re using precomputed visibility volumes to cover and the smaller the cell placement size the more the stored information will cost to decompress when being used.

Just to revisit and clarify, that Occlusion Culling is not removed from Mobile. There is just an alternative development process that gives all the options as before, just without dynamic occlusion queries. It put’s the optimization in the developer’s hands to keep in check, which everyone should do regardless.

There is documentation currently being worked on for Visibility Culling, Cull Distance Volumes, and Precomputed Visibility Volumes. The information on the UE3 pages is still fairly relevant, though.

https://udn.epicgames.com/Three/VisibilityCulling.html

I hope this helps!

Tim

Is this still the case today?

1 Like