Multiple same material for combined mesh

Hi… i am currently using just one material (vertex colored) for all of my static meshes, but there are a lot of single static meshes since im building modular…

I need to combine many static meshes into one, that is pretty well done… but i see multiples indexes for the same material (each for static mesh that was combined)…

Since all of those materials are the same… can i reduce index to one ?

if not… so my question is… will using multiple indexes for the same material be performance lost ?

thanks.

If you intend to use the same material for multiple instances then yes.
There is no need for multiple versions of the same material in the level,
unless you intend to create different variations of the same material.
But even then that could be done with per instance function in one material.

1 Like

Thanks for your answer .

S what is the better way to build my levels? My target is android mid specs mobiles…

I was thinking on:

  1. combine meshes in unreal and replace those multiplicated materials with lightweight overrided instances of that material…

  2. use bsp brushes to build the walls, floors, ceillings, etc and apply the only one material to it.

  3. build the whole level in Blender, combine meshes by level sector and export them to Unreal then apply the material to each combined sector.

Maybe other else?

Thanks again

I found the right tool to make it!, its called “Merge Actors” which is found in…

Window → Developer Tools → Merge Actors

i dont really understand yet why there are two ways to combine meshes, the previous way i used made the job but replicated materials for each object, that is good only if you have more than one material per object… in my case Merge Actor was the solution…

thanks anyway!

1 Like

Well anytime you can instance an asset the better and more so as to overall memory footprint requirements and material complexity could add an unacceptable performance load. Since your target is Android materials has a high cost both to performance and memory limitations so even though an mesh asset may have a number of material ID’s the number of draw calls is still equal to the use of a single material as to storage as the shader is just a list of instructions as to the variations as to how the material needs to render.

The Amazing One Texture project is a awesome example using a single 256X512 texture.

Another option is using a procedural material like Substance Designer which can be use to create material functions based more on math rather than texture dependency.

Using the procedural pathway you could create you mesh with a number of material ID’s yet use a single material base along with the use of instances of that material that generate high detail rendered results but with little performance and memory (footprint) requirements.

So by default excessive material slots is not a bad thing, as you did discover merge actors, but rule of thumb it’s better to have to much as it’s easier to make less than it is to make more after the fact.