Applying Many Imperfections to a Material and controlling their intensity during run?

Not sure how to execute this or best practices, asking for some insight or advice.

I would like to create a wall texture.
The wall texture has a lot of different imperfections, finger prints, smudges, scratches etc.
I want to be able to control the degree of these imperfections.

Example:
Wall spawns and has 10% finger prints and nothing else.
Another wall spawns and now has 10% finger prints and 10% smudges.
Another wall spawns and now has 0% finger prints and 20% smudges and 10% scratches.

I’m curious if there is some how a way to make a master material with scalar params that you can adjust via a blueprint during game run…

OR

If it’d be better to make tons of “transitional” Material Instances: ie MI1 is smudge at 10% and MI2 is smudge at 20% and I write a logic that just selects the next appropriate MI to select.

I’m new to UE so I have no idea if Im missing something obvious, over complicated things or if the MI method is the perfect solution. I looked up MI’s and they have a tiny spacial footprint, could put 1000s in the game for practically free, also correct?

1 Like

Only one material and one instance. The amount of finger prints, smudges etc would just be controlled by a scalar parameter on the instance. In the material, these parameters would probably feed into lerp nodes.

Keep in mind that there is (or was) texture samples limit of 16 per material. So store all smudges etc in either packed RGBA mask textures (each greyscale mask in single RGBA chanel) or put them into ATLAS textures (8192x8192 texture can gold 16 1024x1024 textures). Or make them into RGBA packed and Atlas texture. That makes 4 x 16 1024 greyscale maps in single texture.

And you can create layered materials (but i think they also have that 16 textures liming per material (or stack of layers).

Can get around this using shared:wrap… bumps it to 24 if I remember correctly.