Dirtmap 1.2 Mental Ray shader maya files

 

Overview:

Dirtmap can be used to compute occlusion information with or without environmental (ambient) lighting and bent normals. The shader can be connected to any part of a shading network, by connecting the outValue directly or converting the color information to a float value using a Maya luminance node. By connecting it to a Maya Surface Shader and assigning that to all objects in the scene you can render a pure occlusion pass.

 

Download:

- Visit Daniel Rind's site and download the shader from Stuff/Dirtmap
- Download the Maya files. (The files may be included in the new dirtmap release too.)

 

Installation:

- Copy the MI file to the `maya5.0/mentalray/include` directory.
- Copy the DLL file to the `maya5.0/mentalray/lib` directory.
- Copy the AEDirtmapTemplate.mel file to a maya script directory.
(The list of the current script directories can be queried using the following mel command: getenv "MAYA_SCRIPT_PATH")
- Copy the icon file to a maya icon directory.
(The list of the current icon directories can be queried using the following mel command: getenv "XBMLANGPATH")

- Add the following lines after similar declarations in the maya.rayrc file:
(The rayrc file is in the Maya5.0/mentalray directory in Maya 5.0)

link "{MAYABASE}/lib/Dirtmap.{DSO}"

mi "{MAYABASE}/include/Dirtmap.mi"

These lines initialize the shader for Mental Ray. If they do not exist than the shader appears only in Maya but not in Mental Ray,
and it gives error messages in the output window like these:
API 0.0 error 301031: call to undeclared function "Dirtmap"
API 0.0 error 301036: undefined shader "Dirtmap1"


Usage:

Dirtmap appears in the HyperShade at the `Create mental ray Nodes/Miscellaneous` tab.
(If you don't have this tab than create an environmental variable called
MAYA_MRFM_SHOW_CUSTOM_SHADERS set it to 1 and restart Maya. It will enable the display of MR nodes.)

Have a look at Daniel's site for the shader documentation.

 

Note for Windows XP users:

Windows XP does not include a file called MSVCR70.DLL that is needed for this shader to work properly. You can find it in the Maya files and you should put it in the windows/system32 directory. After that the shader will work nicely.