Precomputed visibility VS actor merging

Hi, i’m trying to optimize my mobile VR game made for Daydream and I don’t know what is the best choice to reduce draw calls

All the game take places in a building with some rooms so it could benefit of precomputed visibily because most meshes are hidden by walls. I have a problem with this because I don’t notice fps increase when i’m looking at a wall which have meshes behind him (the precomputed visibility is built, I can’t see the cells in the editor)

I can merge all meshes into a single mesh to reduce draw call but by doing this, precomputed visibility become useless (because hidding a mesh would mean hidding the whole scene)

So, in my situation, what is the best option to reduce draw calls?
A working precomputed visibility? (I don’t know why it doesn’t work)
Actor merging?
A mix of both? If so, how should I choose which mesh I should merge?

It is about finding balance between both. For actor merging should pick meshes, that are close together.
When optimizing draw calls, don’t forget that re-using materials and atlasing textures can also facilitate it.

This may help with precomputed visibility setup for you until we have some documentation: http://timhobsonue4.snappages.com/culling-precomputed-visibility-volumes

For Precomputed visibility to work you need to make sure it’s been enabled per-level via the World Settings. You can use Stat Initviews to see how well it’s performing as well.

If you’re targeting mobile, you’ll need to remember that dynamic occlusion does not work for mobile, so you’re left with three options.

  • Cull Distance Volumes
  • View Frustum Culling (Anything that doesn’t have its bounds visible within the camera view is not rendered, so actor will be culled from view, but if they are visible within the view of the camera and occluded by another actor they are not.)
  • Precomputed Visibility Volume.

In that order above is how expensive they are to use. Precomputed Visibility is largely dependent on the size of the space being used because the cells store information for each actors visibility state from its perspective.


I don’t notice fps increase when i’m looking at a wall which have meshes behind him (the precomputed visibility is built, I can’t see the cells in the editor)

Seems you’ll need to enable Precomputed Visibility and to remember that the anything in the cameras viewing angle cannot be dynamically occluded so even if it’s not visible it’s still rendered. Use FreezeRendering console command to freeze the rendering state and then fly/move around the level to see if things were occluded correctly.

I can merge all meshes into a single mesh to reduce draw call but by doing this, precomputed visibility become useless.

Merging the mesh would reduce draw calls but it would also keep everything rendered at all times which is not good for mobile development or game development in general.

Thanks, precomputed visibility is already enabled and built, I can see the visilibility cells in editor, I will try this FreeRendering thing. Occluded mesh still generate draw calls?
So, mixing the two technics looks like the best option, I guess I should merge all objects of a room so precomputed visibility will occlude the room when hidded by walls.

I have a problem with lightmap UV and actor merging. I think there’s a bug a will post it in bug report

Occluded mesh still generate draw calls?

Not if it’s actually occluded.

So, mixing the two technics looks like the best option, I guess I should merge all objects of a room so precomputed visibility will occlude the room when hidded by walls.

It doesn’t quite work like that. It’s better to keep them as separate objects to guarantee they get culled more easily. Merging the actors creates a larger bounds for the single actor that either won’t cull or be easily culled when occluded. If it’s a moderately sized level it’s ok to do this. Large open worlds have problems with precomputed visibility because it can use more memory to load the visibility for the generated cells.

I have a problem with lightmap UV and actor merging.

There was a bug with this that I had reported a month or so ago. I think it will be fixed in 4.14 and was not something fixed in 4.13.1, though.

Ok thanks. Yes, has i’m working on mobile VR, I only have levels with few small rooms