A quick tutorial on adding dirt to specific materials in Vray. A very useful application of the vraydirt shader in Vray is to make materials look dirty/weathered. Used in it’s basic form, with default settings, vraydirt can be used to add a general darkening around edges/corners in your 3d model. It can also be modified to affect only areas directly below 3d features.
a - Shows vraydirt using it’s default settings (dirt equal on all sides)
b - Shows vraydirt using settings to force the dirt to work only in a downward direction
c - As b, but with ‘invert normal’ ticked
d - b and c used within a vraycomptex map, set to minimum
By experimenting with the distribution, falloff and z-bias values, I managed to get the downward effect I was looking for (exact settings in screen grab below). I then combine 2 versions of the vraydirt map inside a vraycomptex map. The first version is for concave creases, the other for convex creases by ticking ‘invert normal’. The vraycomptex map is set to minimum so that it combines the two maps by always using the darkest rgb value.
Above is a render with a concrete material demonstrating the effect. In this case, the occluded map is the same as the unoccluded map but darker and with a slight rusty hue (achieved using a color correction map).
The diagram below shows how the material is made up, and shows the values I used:
To take this a step further, you could additionally add a map to vary the radius of the vraydirt effect. (Note that the value I used for radius is in mm)
And finally an animated gif showing renders with and without the vraydirt:



Grat tutorial ! Just what I needed. I began to play with VRayDirt a month ago and you hints will be useful, especially the downward effect. Also you show the utility of VRayCompText which is not really documented. This is a bit off topic but we were wondering at the office what is other possible utility of CompTex other than dirt/AO pass…. maybe you have an idea
Thanks!
I use vraycomptex in the edge fillet tutorial as well: http://www.peterguthrie.net/blog/2009/03/vray-edge-fillet-tutorial/
In addtion, I have used it in the past for combining a vraysky with clouds (think it worked ok, but not as good as a hdri). There are probably loads of potential applications.. just need to think of them!
Oh and in a recent grass scene, I used vraycomptex with vrayscatter to alter the hue of individual grass blades based on a ground map
Hmm on re-reading your question, maybe you were asking about other uses for vraydirt rather than vraycomptex?
Nice! I normally use it as it is to boost shadows in corners… and also as a quick “clay like” AO pass for geometry check… I posted about it at me blog here http://www.ronenbekerman.com/using-vraylightmtl-vraydirt-ambient-occlusion-render-checkup/
Usefull as always, thank you very much for sharing!!
best regards
Thanks Peter. As it happens, I’d been struggling to find an alternative to unwrapping when texturing a big model recently and played with VrayDirt without much success. This looks like it could be the answer. Shame RT doesn’s support Dirt - I’ve got used to not having to do test renders every five minutes.
Lol, actually I was thinking of VRayExtraTex
Did you tried it with dirt shader, relaly great! I just stumbeld upon this great addition the day you wrote this post, there came the coinfusion in my mind.
Man, we’re so lucky getting your explanation.
Looks good! I am into texture baking these days, and VrayDirt is definitely a helpful extra feature to make things more realistic. I was just wondering about render times, does it take longer to render objects with dirt shader ON or about same time?
is there a way to use vray dirt or something else to procedurally deploy a gradient edge mapping? I know there’s a plugin, but I’m wondering if I need it. I would like to have a halftone pattern mapped in the dirt, the radii of the circles falling off as they leave the main surface. can you think of a way to do something like this?
I used to experiment with this on my own a while ago, but i could never get the result that i wanted. For some reason i kept getting dirt all around no matter how large my bias was.
I’m ashamed to admit, but i cant seem to comprehend the distribution and falloff (especially with pseudo LWF settings). Both of these aren’t supposed to be scale related?
I didn’t think so, but maybe its worth seeing if it is scale related. I always work in mm
Peter, you hinted at using vraycomptex with vrayscatter to alter hue of blades of grass based on ground map - any tips on how you set up the material/scene?
PS awsome work, love it!