Download

Procedural rust

So I see there’s a few procedural shaders out already, but they seem to rely on the AO map and don’t really do anything to improve the behaviour of specific things, such as rust, moss, dirt, etc.

With this in mind I’ve set out to improve the situation. Here’s a rough progress video of my rust shader:

The rust is defined first by vertex painting the model. You can also supply a rust mask as a texture. From there you can control the age of the rust, depth (it uses parallax occlusion so will actually eat into the model), sun damage such as bleaching and cracking paint and sun direction (and also whether the sun damage is relative to the object or the world). The rust textures themselves are 4k and will progress from light surface staining to deep, rich weathering that will almost certainly give you tetanus. The paint will bubble and crack even before the rust comes in.

I’m looking at adding seepage from rain next and then I’ll be looking at the moss grower and dirt dirtier.

Finally I’m considering adding a tool that can analyse a mesh and do an initial painting pass of the vertices for you, to maximise rust in enclosed corners, moss where moss would like to live and dirt where things typically get dirty.

This is the first time I’ve actually planned an asset out that far in advance so we’ll see how it goes.

Nice work so far. The only thing I’d point out is really on how rust would form in real-world conditions. You wouldn’t just have it form, particularly over such smooth surfaces. Without getting overly complicated, edges and other areas that experience wear have a higher tendency to form rust - other than that, damaged surfaces can be a great instantiator for rust. With your demo forming rust from the middle of previous smooth surfaces, you’d potentially want to consider other modifications to create a natural growth, including surface damage.

That’s why you often see rust and other ‘smart materials’ utilizing an AO mask that focuses on hard surface edges.

That’s just how I quickly painted up that particular mesh. I was going to go back and do a nicer painted texture on it with some damage to start the rust from later on.

I dig wear maps and they have their place, but AO won’t do much to contribute to exposed edge wear. It’d be better to be a mesh paint process.

So here’s one I painted up manually but spent a little more time on. Head through to youtube to see it in fullscreen.

Here’s a shot showing the difference in rust aggression from surface staining to deep, pitted damage: