Texturing practices

I’d like to have a talk about texturing practices, pros, cons, tips, etc.

The main question is: when to use one material/asset and when to use many different materials.
There might be obvious choises for some type of assets: for example hero character will probably have a single unique material.
I used to texture everything this way in substance painter, but recently I had a look at an asset pack where even small assets had many different material slots: painted metal, shiny metal, rubber, glass and I wonder what would be the best practice.

Different texturing methods (pros and cons just as I see it):

A, one material/asset. Within the material masks are being used to define which part is metallic, rough etc. Pros: unique normal map and details. Cons: many materials is needed and texture reuse is low.

B1, many material slots/ asset
B2, Layered materials using different masks
I guess B1 and B2 is quite similar, the first one is set up during asset creation, the other inside the material… i don’t knoq which one is less resource heavy. Pros: reuse of materials and/or textures, customizable assets, cons: is the highpoly-> lowpoly normal map is completely left out in this case?

C?

as much as possible within 1 material, as every additional material adds a drawcall to the mesh.
Imho the only reason (in general) is different blending mode needs. (transparent, masked, additive) the things that cant be done within one material.

This is how I prefer it though.

I’d like to know what asset pack you mentioned, because… it sounds like a rather poor approach (without looking at its content).

I actually noticed similar approach in the ue4 horror pack and sci-fi props pack. (I don’t onw these packs, but working with someone who has them and needs more props fitting into the environment, so I checked some assets)
I could really see the benefits of having material slots in the assets and use the same wood material on the wooden part of a chair and a wooden fence for example. Are drawcalls really that expensive?

Think about it like this:
GPU:
Oh, there’s a chair.
I see it uses the wooden material.
Let me get it.
Now lets draw this chair with this material.
Oh, there’s another chair.
I see it uses the metallic material.
Let me get it.
Now lets draw this chair with this material.
Oh, there’s a chair.
I see it uses the plastic material.
Let me get it.
Now lets draw this chair with this material!

Now imagine the chair has a fluffy pillow on it. You have to change the material twice for a single chair.

As long as you keep your total unique materials rendering on any given object to a reasonable amount, it’s not significant on modern hardware as long as you’re intelligent about it.

The method of using tiling materials for each different type of material, eg: metal, wood, concrete, etc, is preferable in situations where you have an asset that would require an obscenely large texture map (for example) to paint using the generic unwrap model –> paint it workflow.

It’s also just generally better for your visual result, because when you’re using tiling textures you’re not faced with worrying about an asset becoming obviously blurry when viewed from short distances because its texture map isn’t huge, or you didn’t allocate enough space in the texture for a specific part. Not to mention you save yourself a humongous amount of pain due to not having to deal getting a perfect bake on a mesh.

Basically, if your goal is to make visually high quality photo realistic assets, the tiling texture workflow is pretty much always going to be preferable. Look at games like Alien Isolation, and Star Citizen, which both use this method and then compare them to games that rely on assets with specific textures for each object.

Good point on tiling textures. Although an asset with a single material can still have overlapping uv-s to reuse texture space, but then it looses it’s unique normal map and it could be difficult to texture in substance painter for example.

You’re not using substance painter if you’re using that workflow. Details such as dirt, scratches, etc are handled via geometry decals and/or blend textures. You’re also not using a normal map with model specific details mapped to it, you’re modeling them in, and then using custom normals, and/or you’re using floating decal geometry like so.

that is a bit of an odd sentence.
because no matter how you put it, 10 materials on 10 meshes is 100 drawcalls.
The drawcalls will have significantly more impact (in general cases) than either 50 or 100 average materials. (I know its a rather crude example, but generally taken more instructions over more drawcalls)

__

Lets say you have 100 tree’s with 1 material. thats 100 drawcalls.
lets say you divide the tree so the leaf’s use masked. two materials > 200 drawcalls for your 100 tree’s.
Now lets say you have apples in that tree, different material > 300 drawcalls total.

so best practice would give you 300 trees for 300 drawcalls.
worst practice gives you 100 trees for 300 drawcalls.

This excludes grouping/merging actors of-course, but the less materials you need (and with proper masking you can set up a material that has proper wood, metal, plastic, plaid, other surfaces in one material) the better.
anyways, my point being: optimize, optimize, optimize.

especially the people in your team who might need to optimize/port your game to current gen consoles will thank you for saving them ms’s.

Except best practice doesn’t involve you putting every material on every single mesh. If you’re doing that, you’re most definitely not exhibiting best practices, or you’re doing a very specialized work, and for your tree example, we typically do this.

How many assets do you make that include, concrete, wood, moss, plaster, plastic, and 5 different kinds of metal? Or any other combination of ten materials. I’m going to guess not many.

Also, I suppose that sentence should be worded as on any given object instead.

very true.
just… keep in mind that --depending on who is reading-- anything can be taken as a fact.
Someone without experience might think that if you keep the amount of materials low, you can put 100 materials on one mesh.
its sometimes handy to go more in depth/over explain something to make sure that a beginner understands it correctly.

Nah you’re right I should have worded that better, and I edited the post.

high 5’s!

also, this message was to short hence <<.

. ?

I don’t think using decals for these stuff is very popular yet, it might be in the future, I don’t know… What I noticed though that the asset in the video too has many different material slots with very simple tiling materials, so it too would have many drawcalls.
And with this method (and in all which uses tiling materials) am I right to assume that they only use details normal map, and not a full normal from high poly model to low poly. So for example the edges of the low poly should be rounded because the normal map can’t store that information. This means higher poly count on the low poly.

Modern PC ready to run UE4 games can easily handle 4.000 ~ 5.000 drawcalls per frame without sweating.
On the other hand, if your target is mobile, you want to bake atlas textures for everything.

It’s something you can mostly thank consoles for holding back but even there it is catching on and will probably become a lot more standard in the next generation. You are correct that it does mean, a higher polycount, and a normal map that is not used to bake specific details. The drawcalls really don’t matter if your target is the pc or one of the not nintendo consoles, and you’re smart about your material usage (See Alien:Isolation)

As for the edges, this is how they’re handled under this workflow.

I’ve learnt about the use of custom normals some time ago, but did not consider it relevant in my workflow. But now investigating further I can see the benefit of using it. There are many addons inBlender if anyone interested, “yavne” being one of them.
About using decals… I will check workflow videos… it seems complicated first.

It’s literally just floating planes uved to specific points on a normal map texture.