Download

What causes lag in materials?

So i’m new and still trying to understand how things figure into what. I did an experiment and I used the foliage tool to drop 2k of rocks with a small radius around my character, the rocks used default material they came with and to my amazement I was hitting 65fps. I then cleared them out, I changed the material on the rocks to one from another pack I’d bought and did the same dropping 2k rocks in my vicinity, with the new material I was hitting as low as 30fps.

So my question is, what exactly is it with materials that causes this kind of performance drop? I keep hearing people talking about shaders, talking about LODS and other stuff. What is it I should be looking out for to try and keep the materials looking decent but not too taxing on the playability?

You left out what fps you usually get.

It’s not uncommon in scenes with a lot of foliage ( rock, plants etc ) to drop to 60 or below. You can improve on this by spending a long time messing around with meshes, LODs, textures, shadows blah blah blah…

When you open a material in material editor it tells you how complex it is in the compiler details:

Once you start getting above 500, it might be considered expensive. What actually triggers that cost varies from material to material.

Another way to find expensive materials is by using the shader complexity view in the editor:

As stuff gets more red, it’s costing more ( white is even worse ).

Try to do test with exactly same scene and just change material. Now you did have different rocks in difference locations. So test wasn’t that accurate.