How to create materials and texture sets (externally) according to the performance?

You know, we can make materials in different ways, in 3D graphic softwares.
Which one is the best solution on the side of the performance?

  1. Separating meshes into many objects that are supposed to be made of the same material, where each one has its own UVmap and texture of the Base Color, but the specularity and metallic properties will be added in UE4 without any specular/metallic external texture.
  2. Merging many meshes in the same object, having only 1 general UVmap, and differentiating their materials by adding a specularity and a metallic texture that define different zones, and so we obtain different “materials”.

All of this considering the same resolution on the final result, so on the point 2 there will be a big texture + additional textures, and on the point 1 there will be many little textures but no additional textures.

Also, I want to know if I can overlap UV islands when 2 meshes have the same geometry, in order to save pixels and enlarge them a bit, or if this would creare problems.

Thanks!

It depends on the objects, most of the time you’re going to have objects made of multiple materials, in those cases you can define different material properties within the textures by changing the roughness/metallic/specular values.
For performance, it’s best to use just one material for an object and try to find ways to make your texture maps as low of a resolution as you are comfortable with.

Ah so you mean only 1 texture set with metallic/roughness external maps in addition, instead of defining all the separated inside UE4.
Well, nice, thanks!!! :slight_smile:
And what about overlapping the UV islands on the UVmap? Does it give any problem?

Yeah, it’s much better to use a single material and have the different types of things (like metal/plastic) created with textures within that material rather than just applying an entirely separate material to different polygons.

You can have overlapping UV’s for your material, for your lightmaps you would set a second UV channel and that requires everything to fit in the 0-1 UV space and nothing can overlap.

If your object has wildly different materials, like a door with a transparent window, you’ll need drastically different shaders to represent them. Objects with subsurface or metallic properties are best handled separately as well, though you can merge them together for props. I find myself in the realm of preferring more materials because at the expense of one more draw call you bring the overall pixel shader complexity way down. But this approach wouldn’t work so well if you have thousands of different objects and materials onscreen all at once.

Instanced objects use the same material for each instance, so you can have thousands of plants where the leaves are separated from the bark and it would run faster than running a foliage model over the whole thing.

Overlapping UVs are fine, just not for your lightmap.