Dirt Mapping

I’m trying to create a dirt map to fill in some grunge on the wood around the edges of the hardware. My first thought was to try using the AO node, but that didn’t yield any shading at all in the desired areas. I saw a tutorial about baking an AO map to use for grunge, but I have a lot of overlapping UVs on the wood texture, so that didn’t work either.


Reference

1 Like

Unless it’s for a game engine that doesn’t support it, make dedicated clean UV map for this purpose. However, I’m not sure if baking unmodified will yield better results if the node by itself doesn’t work. Did you try pointiness or dirty vertex? It’s hard to make out from your image what might work. But any kind of baking would require a clean UV map without overlaps. If for a game engine and only one UV map driving bakes, you’d be pretty much forced to re-arrange the UV map and paint in the wood again.

It’s not necessarily for a game engine, just for fun. The metal and wood are separate parts, so pointiness doesn’t help. Also since there are no vertices on the flat wooden part, dirty vertex doesn’t really help either.

Great work Merckum

Thanks! I’m still just learning and I feel like I’m not very good yet, though.

Hopefully this pic is more helpful. I wanna put some grunge on the wood at the crevices where any of the hardware touches it, but they’re separate parts and not actually connected…

ideally, avoid overlapping uvs so that baking isnt broken.

theres also the alternative:

  1. create another uv map.
  2. get rid of overlaps manually or go into edit mode->select all->press u->lightmap pack.
  3. bake ao.
  4. add an image node, use second uv for texture coordinates.
  5. use ao for whatever you want.

this would be sufficient to get the desired result inside blender. note that multiple uv maps and sometimes even multiple uv coordinates per vertex (no edge splitting at seams, or no seams whatsoever) may be a problem when exporting into another 3d software, be it an editor or graphics/game engine. i know this is not your intention right now but hey, never hurts to know.

Is there an alternative that doesn’t require baking? Carl mentioned above that since the AO node doesn’t produce results, that baking might not be effective either. I suppose I could try using a 4k+ texture so I’ve got a bit more to work with. What about setting it up as UDIM? Can you bake to that?

What can you achieve if you create a normalized depth map? Blurred and mixed with some noise.

How would I do that?

pieces dont need to be connected, touch, or intersect. they dont even need to be the same object. proximity is enough to get shading.

look. using old blender render and approximate lighting.
hinges and “handle” are disconnected to the rest of the door. result:

and then with the node. note the color ramp:

youd need cycles render and some more samples obviously.

either you forgot the ramp or rendering in cycles. math doesnt just break.
id suggest you try baking before doing anything crazy. i say this as someone who always does the crazy thing first.

…my ramp wasn’t quite high enough…

Thanks…sorry… ;x

Ok…so I followed this and made a second UV map and unwrapped so that none of the faces overlapped. I used an attribute node set to the newly unwrapped map and baked to a new image and this mess is what I end up with.

I also tried using a 4k texture so I could maintain the level of detail that I currently have in the wood grain while still being able to scale everything down to fit on one map with no overlap, but that ramped up the mem usage to 1gb+ and that seems pretty excessive. I think next I’ll attempt it with different parts separated as different materials and see how that goes.

Edit: I separated into two different materials, marked seams, and unwrapped. Everything looked nice and orderly, so I baked…ended up with this…

Any ideas what would cause the AO bake to come out like that?

4k seems too high for an ao map, for a single asset. totally just my opinion.

im not sure about some of the artifacts im seeing but the grain isnt an issue with textire resolution. looks to me like you need to up the render samples a bit.

Yeah, I skipped the 4k. It’s not the grain I’m concerned about, it’s the weird diagonals in the faces. Shouldn’t it conform more to the shape of the objects instead of just arbitrarily bisecting the faces like that?

250 samples this time. Still with the weird diagonals…

interesting. it could be you have a lot of ngons in your geometry. do you?

The faces with the diagonals are all quads. There were a few tris because of the bevel, but I just removed them and another bake is in progress to see if that makes any difference.

Edit: No change in the outcome with the removal of the tris.

if its not ngons, tris, solidify or overlapping uvs and you made sure theres no duplicate verts, edges or faces then something else is going on. could be an issue with your build. i cant tell without looking at the model myself.