Smart Material?

Hi,

Is it possible to achieve something like this with shader graphs or is there something similar to this in unity?

https://www.unrealengine.com/en-US/blog/smart-materials-and-the-future-of-texturing-with-quixel-mixer

I want to be able to add grime/dust during runtime and clean up after. Like how RDR2 does it.

I’d really appreciate it if someone can point me in the right direction.

Thanks!

There are multiple things you can do to achieve this. First, you can make a mask that automatically covers the top of an object no matter its orientation and use it to control the amount of dust, like that:

You can then change the values plugged in the Smoothstep node from a script to control the amount of dust you want.
The Vertex Color node enables you to use the object’s vertex colors to paint on the mask (you can do this from your 3D software or directly in Unity using Polybrush).

You can also bake an AO map for your mesh from a 3D software like Substance or Blender, and multiply it with this (like for the Vertex Color), to have dust in crevices.

If you want things such as edge wear, you can bake a Curvature map and use it as a mask between the object’s main texture and the texture you want on the edges.

Thank you, I will give it a try.