Published at: 05:01 pm - Wednesday January 27 2010
Vray dirt has proven to be incredibly useful for quickly creating ambient occlusion passes, but it is very rarely used in anything else.
In The Thitd & the Seventh, Alex Roman uses vray dirt to give extra depth to the materials. Its pretty straight forward to setup and use, so I thought I may as well show everyone my interpritation of this technique…..
1. Here I have a basic test scene, default vray render, no GI, standard grey vray material, simply geometry, nothing special -

2. Here I have applied a concrete map to the diffuse slot in my vray material. As you can see, it looks flat and uninteresting as you’d probably expect!

3. Now instead of using the concrete map in my diffuse slot, I have used a VrayDirt shader. All the parameters have been left to default, appart from the radius (you will need to adjust this depending on the size of your objects / scene). Try to make your radius not too large or too small, as it will not be as noticable.

4. At the moment the VrayDirt shader is only giving us dark (occluded) areas where two planes meet on inside edges, and not on the outside edges. The effect I want is to give the outside edges some dirt too. This is pretty easy to achieve. Change the diffuse channel to a VrayCompTex, and ”Keep old map as sub-map”. Copy the VrayDirt to the Source B slot, and change the opperator to Minimum (Min(A, B)).

5. Open the copied VrayDirt (Slot B) and tick “invert normal”. Click render and you will see the dirt is now on the outside edges and inside edges.

6. In Slot A, click the “None” button to apply a bitmap to the occluded colour, and select the conctrete map. Copy the concrete map to the unoccluded slot. This will override the black and white colours futher up in the parameters.

7. In the occluded colour slot, we need to edit the bitmap for the occluded areas (otherwise the occluded areas would look exactly the same as the unoccluded areas, which isn’t what I want). The easiest way to do this is to goto the Output for the occluded bitmap, Enable Colour Map, and grab the top right handle and drag it down to make the bitmap a lot darker. You could make several concrete maps and use them instead if you wanted, but it would be more time consuming, and sometimes unnecessary.
You need to now copy the VrayDirt from Slot A to slot B of the VrayCompTex, and invert the normal again (step 5), you could copy the settings from one dirt shader to the other, but this way is quicker and easier!
Hit render and you should see a more interesting diffuse material.

I hope all that made sense! If not, please ask and I’ll answer any questions!! Also let me know if you found it useful or not!
Deano.