Download

DistanceFieldAO huge performance hit with landscape

Hi there!
I’m no artist, so please excuse my lack of knowledge and please explain your potential answers as you would to a layman.

I have an empty level with nothing but a landscape, skysphere, two directional lights (sun and moon) and a skylight.

I drop to around 20fps.

Profile GPU tells me that the culprit is Skylight Diffuse -> Distance Field Lighting -> Heightfield Occlusion.

Turning off DistanceFieldAO with r.DistanceFieldAO 0 solves the issue, but is not a real solution since it makes the “real” level look terrible.

Is there a workaround for this?
I want to have DistanceFieldAO in the game, but perhaps have it not affect the landscape?
Is there an alternative, less costly solution?

Thanks in advance!

What kind of hardware most importantly GPU are you using?
DFAO can be a bit costly but I haven’t experienced performance hits as big as you describe and I use it on a huge landscape with very thick vegetation.

GPU: GTX 960, Processor: Intel(R) Core™ i7-2600 CPU @ 3.40GHz (8 CPUs), ~3.7GHz, 16GB RAM.

I noticed that increasing the landscape component size to 63x63 quads solved it for me as well. Seems that the “testing landscape” wasn’t set up properly.

I’ll look into it further, but the problem seems to have resolved itself.

Thanks!

Great! :slight_smile:
You might save even more by setting up more aggressive LOD on the landscape as well.

What settings did you use to create your landscape in the first place? I’m guessing it was creating many tiny components, which makes the landscape occlusion slower.

In the future you can use ‘r.AOHeightfieldOcclusion 0’ to disable just landscape occlusion instead of disabling all Distance Field Ambient Occlusion.