I guess this is bad right?


I have searched online but not found much in the way of guides on how to optimize shader complexity for higher FPS . currently I’m getting around 20-17fps
The answers I did see in the HUB, I didn’t understand.
Where do I start?

Start by reducing shader complexity. :slight_smile:

You can see a small PS and VS move along the horizontal gradient based on wherever your crosshair is, which stands for Pixel Shader and Vertex Shader - two different passes that make up drawing materials and the objects. The Pixel Shader will almost always be your bottleneck as that’s where the pixel/quad overdraw goes by default, as well as most of the math that makes up the material.

Start by cutting back on features in your materials or rebuilding them to be cheaper. You can use LOD materials to simplify them for meshes farther away too. I’m not sure what is going on with the cabin, but most complex blending materials aren’t that expensive so you might want to take a look at that. You also have a lot of overdraw for your foliage, so you can reduce the amount of visible space in the alpha or compute transparency in the depth-pass.

There’s a Epic livestream that goes over this stuff too. Check out the Twitch or YouTube channel

Thanks Brian.
I wont pretend to understand everything you said but Material lods is new to me, But I understand LODS and how they work when it comes to 3D models.
Most of the foliage Is from the ue4 open world demo content on the store, apart from the trees being speedtrees

Is your scene is intended for game?

Are you using tessellation in the material?

Can you share more regular pictures on that same scene and also a closer look at the cabin surface detail?

How did you accomplished the foliage placement at the level? Did you use the procedural foliage spawner ?

If your scene is intended for a game, LoDs always 4 of them, with vertices reduction and cheap materials. If you are using Speedtree I wouldn’t touch that unless you have modified the materials for some reason, but surely the foliage needs some work. The foliage from Open World/Kite Demo were made with main purpose viewing quality since it was made for a short film and if you run the Boy and His Kite Demo you will see that the performance is quite low, while the visual is definitely good. Maybe find other foliage source or rework all the materials, the most far LoD can be even opaque material with masking, since you won’t be able to see details anyway, but careful with pops transitions.

Some big rock placement can help with culling the white spots, which overall will reduce the time to render the scene.

The dark red is not that bad as the red transition to pink and white, so maybe not worry too much with the cabin which mainly show dark red.

wait is there some obscure overhead caused by the procedural foliage spawner? AFAIK it only places regular foliage at editor time

Actually the procedural spawner creates hierarchical static mesh to realize the placement, so it gives way more performance. I was questioning because some people doesn’t know the procedural spawner exists because it is not active by default and people place the meshes by hand.

my two cents, I’ve seen “opacity mask clip value” in the material will greatly affect the shader complexity with any opacity masks, it can cause some edge issues but turning that down can really reduce the complexity of foliage.

1.Intended for VR
2. NO Tessellation
3. There are some normal pic on my Artstation
4.foliage spawner with a tiny bit of manual placement In-front of the cabin .

Thanks & I will search for some replacement foliage

@AlphaWolF Everything which resembles an open environment for VR needs a lot of careful tweaks, even more because of the performance constraints to have at least 90+FPS per eye. Your stuff can have Tessellation, but the material graph needs to be made in order to allow it only when closer look or inside the cabin. Every single foliage item you placed by hand can have increased performance if you select all of them and use the function Merge Actors (basically all will become one single mesh and one single material) no matter how far they are, which is also great for rocks hand placed. You can do for all of them or do it in groups. The better is the quality of the textures and the better is their resolution, the better are the results.


I have decided to strip this all down and redesign/ rebuild the level again and keep a close eye on performance. This was initially started a few years ago and I have learned a lot of new things since then, It was only because I decided to revisit it And try to finish things off and saw the state of the performance.
Thanks everyone.

That looks like overdraw. Your opacity is contributing to your “shader complexity” because it’s running a pixel shader and rejecting the value because of a zero value. Try having a look at quad overdraw to see if it has high values in the same place.

I have been stripping the project back to find where the issues are . removed all foliage and such. saves around 20fps BUT!
Weird thing is even after removing the materials from the landscape and other meshes, its still red ?

but foliage Is also HISMC. that’s why I ask.
also I’ve seen inconsistencies when using the procedural spawner vs painted foliage, even though they are supposed to be the same thing

Yeah they should be the same. I would need to check at the source how the placement is done when driven from the landscape material, but even that one should behave the same generating the HISMC.

Last year, I was hiring, and saw some people not having a clue about the spawner functionality and saw few ppl that was placing one SM at a time and also not familiar even with Merge Actors functionality. This makes my job a bit harder, but luckily we will stay some time without hiring for a year or more, unless some big project appears.