Use a custom-made mental ray for Maya shader in Maya

To use custom-made mental ray for Maya shaders in Maya

  1. Write or obtain a shader declaration file (that is, an .mi file that contains the description of the shader(s)).

    See Write a shader declaration file.

    Tip:

    mental ray user data is now supported in Maya. Declared (with parameters), and Literal (raw bytes) data are translated as two separate nodes in Maya. This applies only to mental ray for Maya custom shader nodes.

  2. Insert the shader into a shader library (.dll on Windows; .so on Linux and Mac OS X).
    • mentalrayForMaya201x/shaders contains shader libraries that are compiled and loaded into Maya by default.
    • Compiling and linking a shader on Windows requires including shader.h and linking to shader.lib. These two files are shipped with Maya, and can be found at mentalrayForMaya201x/devkit.

    For more information on shader libraries, see mental ray for Maya custom shaders.

    Note:

    mental ray for Maya uses the default substitution rule .so > .dylib for the Mac OS X platform. Old shader libraries with a.so extension must be renamed. The consistent .so/.dll/.dylib substitution rules provide .mi scenes with cross-platform compatibility.

  3. Load the shader by doing one of the following

    See Load shaders.