Optimization - Need some tips/help with large landscape

Hi there. I’m working on a project with large landscape. I am using Stylescape for my assets and auto material on the landscape.



My directional light is set to movable because I’m planning to add a day/night cycle. The foliage is not casting any shadows except my trees. All shader complexity is green. Landscape also has LOD setup. However I cannot seem to get past 60-70 fps. I know this FPS is good as well however it is a stylized project with simple texturing and I’m aiming for 100+ FPS (120+ best case).

Materials of Stylescape on the other hand are pretty heavy however I tried reducing the shader calls by cutting out some stuff and using runtime virtual textures. Currently on my auto material I have 235 base pass shader calls. To add, all LOD’s have been setup as well.

When testing on Standalone, culling for my foliage seems to be different than in the PIE, anyone know why that is? In the PIE if I set the culling max distance to 2000 then all my foliage disappears however in Standalone they show.

None of the textures I am using for the materials are higher than 2048x2048. Any tips on what I can do to improve performance even more? Here are some of the materials:
Automaterial (from 500+ calls to 235 calls):


Grass material:

Leaves + bark material (trees):

Grass FoliageType:

Finally, here’s the profiler breakdown:
Stat GPU:


Stat Game:

Stat Quick:

Stat RHI:

Task manager on standalone:

To end, my scene is pretty empty and doesn’t have demanding actors such as exponential/volumetric fog except only procedural foliage and movable directional light. I’m not sure where to focus to improve upon my project.

And my PC specs:
Processor: Intel(R) Core™ i5-8500 CPU @ 3.00GHz, 3000 Mhz, 6 Core(s), 6 Processor(s)
GPU: GeForce GTX 1060 6GB
Ram: 16GB

Any tips/help/redirections appreciated!

Edit: Packaged project runs a bit smoother but still no where near my expectations.

Hi Islkdev,

One thing that may improve performance, but I don’t know if you’ll like it, is to reduce the over-all resolution of the landscape. There’s often sweet spots where it seems to run a lot smoother. You could try lowering the resolution and scaling it up - it will be a little more blocky but the increase in framerate could make a good difference.

1 Like

Hi! Thanks for the tip. How would I go about doing that? From the landscape LOD settings, textures or the material?

Thanks!

I’m afraid you would have to resize your heightmap, and create the landscape again, specifying a scale from there (or you can change the scale at any time by selecting it in the level and changing it in the details panel) - I found by recreating my landscape that was 8192x8192, at 4033x4033 and upping the scale (I used 1.5 in the end) - I got an extra 20FPS on my GTX1080ti.

There’s more details about landscape sizes here:

1 Like

Hey, thanks for the info! The thing is using runtime virtual textures already reduce the landscape resolution drastically, even tho I’m setting the RVT to be 4k.

I’ll definitely try scaling up the landscape as you said but it will probably make it look even more blurry x) But that might be worth it. Lets see!

  1. Ensure that you’ve enabled masked only in early z-pass. This is critical for foliage dense scenes.

  2. You say you’ve set up LODs… but you’re still drawing 8.3m triangles… For context, there are only 2 million pixels on your screen at 1080p. Meaning you’re drawing more than 4 triangles for every pixel on screen… There’s no way for us to know where all that geometry is from these screenshots, but my guess is it’s your grass.

    If you have LODs set up then you need to be more aggressive with their triangle count reduction, either that or your meshes have too much geometry to begin with. Ideally, your final LOD for trees/grass should be a billboard impostor.

    I suspect this is where most of your performance cost is. If you can reduce your triangle count down to half that or a third I think it will run much better.

  3. You’re spending 1.3ms just applying SSAO. Considering your scene is almost entirely foliage I would suggest disabling it and just faking the AO in the vertex color.

  4. Reduce the density of your grass, I suspect that’s where a huge amount of your triangles are.

  5. You can probably disable SSR, given that nothing in your scene is remotely reflective.

  6. Please do not profile in the editor… at least start a standalone process.

1 Like

Hi! Thanks for the lengthy in depth post. Very very helpful!

Now I did not have this enabled, just enabled it. I will look it up and learn more about it.

This makes a lot of sense. Thanks for clarifying. It looks like the grass has more triangles than it should. I will definitely increase the lod triangle reduction aggressively.

There are impostors setup as well however I’m not sure if they’re working as intended. I will be checking this out as well. Great to know.

Now this is what I do not understand. AO is not enabled in my global post process. Where else might this be coming from?

I will also be doing this.

Finally, I never profile in the editor! It’s standalone process of course.

Again, thanks a lot for the detailed response. Has been very informative and helpful. I will try and work on these and update the post accordingly. Appreciate your help, a lot!

It’s enabled by default, you have to explicitly disable it. This is true of all post processing effects, even if you haven’t enabled them in the post process volume; Unless you have explicitly disabled them then they just use the default state.

As I recall the way to turn off AO in the post process is to set its intensity to 0. There is probably also an ini command so that you can disable it project wide.

1 Like

Thanks for clarifying!

Hi again! I’ve been trying to disable AO but setting the intensity to 0 doesn’t seem to disable it. I can still see it in stat gpu. I also tried r.DistanceFieldAO=0 but that didn’t do the trick, and I cannot find any command for disabling SSAO. Why can’t I get rid of that call!? :sweat_smile:

Edit: showflag.AmbientOcclusion 0 seems to set it to zero but it’s just for profiling. It removes it from stat gpu…

Also currently doing so much better. I’ve increased LOD’s aggressively and tweaked culling a little bit more. Also reduced their density and it seems to have helped a lot. Also tweaked Landscape LOD a bit, trying not to mess up stuff.


However I still have the SSAO going on and idk why, all SSAO settings are set to 0 and disabled.

Edit 2: LOL, it was confusing to disable SSAO. You actually need to have it enabled then set the values. Guess I’m kinda dumb!

1 Like