Precomputed visibility

It seems that landscape does not occlude anything with precomputed visibility. This is major problem in outdoor levels. Is this bug or planned feature? Could there be option to allow landscape to contribute to occlusion?

Hey Jenny,

This is not a feature currently, but there are reasons why. Make sure you have LODs established for your models, as well as using Cull Distance Volumes to cull out geometry and objects in your scene at specific distances. I also know that foliage can be marked with ‘Use as Occluder’ to allow foliage to occlude other objects as well.

Precomputed visibility is generally used for optimization of mobile projects so you can reduce the amount of geometry rendered to the screen. Perhaps you can explain what you are attempting to do, as there are always different approaches?

Thanks,

Our game is also targeted on mobile. What are the reasons not to allow landscape to occlude? I can only guess that lodding could cause some popping but that is also true for any static meshes with lods. Our outdoor scenes have lot of hills that are perfect ocluders and landscape would also occlude a lot of landscape components.
It would just make sense to allow landscape to occlude instead of trying to work around that.

Since there are a number of other ways to enable occlusion for foliage and actors alone, this has not been implemented for landscapes. We added a new feature in 4.12, where you now have the option to adjust the bounds for each landscape component by adjusting the Negative or Postive ZBounds Extension settings for the entire landscape or you can do override each component separately by using the component selection while in Landscape Mode.

Hi Jenny,

I’ve entered UE-30368 for this one to be tracked and investigated.

Using the cvar FREEZERENDERING I can see that the landscape is not occluding the actors in the precomputed visibility cells when not within the camera view and when the camera is within the visibility cell.

This is the default view of what the objects should be like when viewed

This is when the camera is on the other side of the mound and everything is occluded from view of the camera. I would expect that everything here is occluded, but instead it’s only the parts occluded by the static mesh from the cameras view point.

Thank you for the report.

Tim

Thanks for your answer. This will help our outdoor performance a ton when it’s fixed.

Maybe I am readind the issue tracker wrong but I don’t think this describe problem clearly. “When using precomputed visibility on device for occlusion culling the landscape does not take the cameras view into account for culling objects when out of view of the camera and inside a visibility cell.”

Problem is just that landscape does not provide occlusion for static visibility. It also seems that this is backlogged. I hope it will be fixed sooner than later.

after a very quick read of lightmass source code and experimenting, I think this “bug” has something to do with the flag used to trace visibility rays between cell and mesh bounding box. The flag used is LIGHTRAY_STATIC_AND_OPAQUEONLY and setting it to LIGHTRAY_NONE will allow landscape to occlude things behind it.
My guess is that the material of landscpae is quite different from that of static mesh?
Can anyone tell me what the real problem is?

If you really need it, maybe you could try modifiying lightmass yourself.
It worked for me to change the flag used to trace visibility rays from LIGHTRAY_STATIC_AND_OPAQUEONLY to LIGHTRAY_NONE (UnrealEngine\Engine\Source\Programs\UnrealLightmass\Private\Lighting\PrecomputedVisibility.cpp).
But I wish experts can explain why is landscape material not opaque by default.

I need to study this a bit. Maybe landscape is not static and opaque by default because of possibility to use landscape hole materials.(which we does not use.)