Fabazo
(Fabazo)
June 27, 2020, 8:28pm
11
chrudimer:
Looks really cool!
As for the 5 materials, each additional material is an additional draw call. There is no real measurement as for how many draw calls you can have before you get performance problems cause performance depends on many different things. Generally speaking with the hardware today 1000 draw calls -> no problem, 10000 -> might give you problems.
So whether you use 5 or 15 materials won’t make any difference there. What will make a difference is the complexity of the materials (so the amount of instructions that get executed per vertex and especially the amount of instructions that get executed per pixel). If you try to put different logic into one material instead of separating it into several materials you might/will end up with a higher pixel shader instruction count.
For example if you apply the same material for the glass and for some metal parts of the robot and you want to execute some fancy stuff for the glass parts, then those instructions will also be executed for the metal parts and in such a case it would be better for performance to split it up into two separate materials.
[HR][/HR]
Just as a test to get a better feeling for it you could try to see how far you can push it before you experience performance problems. So create a plane, put 10 different materials on it, then duplicate it 10 or 100 times. That would be roughly the same as if you would use one plane with 100 (if you duplicated 10 times) or 1000 (if you duplicated 100 times) materials.
And this is always useful to learn about UE and what to consider for performance An In-Depth look at Real-Time Rendering | Course
Thanks for the input, surley valuable information! I feel like these questions regarding optimization and whether something is going to be very taxing on the system in the long run just comes down to working on different/many project and just seeing and comparing what works and what doesn’t.