Multi-material performance

How is perfomance of meshes with with multi-materials appiled to them ?
I know it was pretty bad with UE3.
Are there any improvments on this subject ?

The reason I ask is because multi-material simplify workflow for more complex stuff. Especially architecture where I can just slap on buildings set of tileable textures each in unique material slot without worring about unique masks or other stuff.

really interested in knowing this as well.

lately I’ve been toying with the idea of improving my workflow by leaving behind the whole concept of ‘baking normalmaps from hi-poly geometry’ for modular level meshes (ie. big things like walls, floors, stairs, etc), and rely on vertex painting to give some flavor to the repeating tiled textures (much less UVMapping time as well), and leave all unique detail to the actual geometry.

Hi Lukasz,

Each material results in a separate draw call and draw calls have some cost to them. How many draw calls (or “sections” when looking at primitive stats) you can support in your game is largely dependent on what hardware you’re targeting. Modern midrange PCs running D3D11 have lower overhead per draw call than older PCs. But lower end laptops have slower CPUs and the cost will hurt more. It’s a tradeoff you will have to make for your project.

You can consider using material layers (see the demolet for an example). That is the method we used for constructing materials in the Infiltrator demo though this does require painting mask textures. The upside is that it reduces draw calls and you can have smooth transitions between materials. The downside is that it increases the per-pixel cost of your material which can affect your framerate especially at high resolutions on older GPUs.

Also you can leverage distance culling to help reduce draw calls on lower spec machines if that makes sense for your game.

I hope that helps!

I guess this comment also applies to landscape materials? I.e. it is better to use a single landscape material with lots of blended layers inside the material rather than one material per ground type?