Vray Dirt Tutorial

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.

dirt_quad

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.

concboards

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:

material

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:

bridge - gif

Tags: , ,

Comments

  1. 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 :)

  2. 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!

  3. 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

  4. Hmm on re-reading your question, maybe you were asking about other uses for vraydirt rather than vraycomptex?

  5. 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/

  6. Usefull as always, thank you very much for sharing!!

    best regards

  7. Bertrand Benoit

    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.

  8. 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.

  9. Man, we’re so lucky getting your explanation.

  10. 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?

  11. 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?

  12. 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?

  13. I didn’t think so, but maybe its worth seeing if it is scale related. I always work in mm

  14. Artemis

    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!

  15. Where to add material? where can i place my shaders with Spc/bump and defuse? in vray dirt? thanks..

  16. One more q… Do we need to create dirt map for every object in the scene as we can use 1 map for all objects? (which have different textures) if yes.. how.. thanks..

  17. @san place the vray dirt map in the diffuse slot

    you can of course instance the same dirt map if you want, but if all you want is a sort of ambient occlusion effect then why not just use the ambient occlusion feature in the GI rollout? http://www.spot3d.com/vray/help/150SP1/render_params_gi.htm

  18. Thanks Peter.. I am sorry i am kinda new to 3D.. so asking basic questions.. if i put my dirt map in defuse slot then where shall i put my defuse texture image file? say i have a wall texture and i want dirt effect to it.. thanks again for your time..

  19. dirt map in diffuse slot, then diffuse bitmap in unoccluded color slot and a dirty version (or simply darker) in the occluded slot. You can then either play with the radius value to control the dirt effect or put a bitmap in the radius slot.

  20. Peter, you are a beast! thank you very much. I almost asked a question but you already answer it in the comments. All your tutorials are excellent.

  21. Is there a posibility to do dirt like effect on plane? My plane edges must be dirty and I can’t find how to do that.. help!

  22. I recommend you try out coloredge by itoosoft, I think it will do what you want: http://www.itoosoft.com/freeplugins/coloredge.php

  23. Peter,

    I’m trying to follow the tutorial and everything works great but at the point where i add the Vraydirt material(s) the object turns 100% black in my viewport, I have tried many things but I’m not able to see a preview of the material in the viewport, is that normal? I have tried in 2011 and 2012

    Thanks!

  24. Peter, i have a question. When I put a bitmap in the radius slot, how does it works? For example, mi radius distance is 50 and then, below, I add a map, in black and white and greys. So what does this bitmap does? And also, If instead of 100 i give the map a value of 50, what do i get?

    Thanks

Leave a Comment