Texturing, Mental Ray
Creating procedural dirt in 3DS Max with Mental Ray
Software used: 3DS Max, Mental Ray, Dirtmap shader
This ‘procedural dirt’ tutorial is something I wrote after I found myself needing a way to apply dirt to my scenes.
I did some research with Kristian Thuesen who is a good colleague at work (a 3D artist), and we found a non-procedural way of doing this, but I really wanted it to be fully procedural.
Many tutorials on this subject deal with ambient occlusion and baking, often you have to use scripts to find the edges of the models, then apply a vertex color that you can bake to a texture.
The reason why I don’t like the above ways of doing this, is because it consumes too much time. And also, when you work with many people in a team that have varying skill levels, it needs to be as simple as possible.
The only thing you need for this technique is 1 mi file, and 1 dll file, both of which are freely available.
Downloading the material and dll’s
I’ve written this tutorial assuming you are using 3dsmax2012 x64.
This is the only version I’ve got, but it should work for other versions too.
I’m also assuming everything is installed to the default locations.
So, if you use 3dsmax 2012 x64, download the following files and place them in a folder:
Mi include files:
Installing the shader
Unpack the zip files, then copy these two files:
Into these directories:
C:\Program Files\Autodesk\3ds Max2012\mentalimages\shaders_3rdparty\mentalray\include\Dirtmap.mi
C:\Program Files\Autodesk\3ds Max2012\mentalimages\shaders_3rdparty\mentalray\shaders\Dirtmap.dll
Now, to make 3dsmax load the new shader we need to edit this file,
open the following file in notepad:
C:\Program Files\Autodesk\3ds Max2012\mentalimages\shaders_3rdparty\mentalray\3rdparty.mi
We then need to add these lines so that the dirtmap.dll get’s linked to the dirtmap.mi shader file:
Save and close the file.