To use custom-made mental ray
for Maya shaders in Maya
- 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.
Tipmental 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.
- Insert the shader into a shader library
(.dll on Windows; .so on
Linux and Mac OS X).
- Maya2011/mentalray/lib 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 Maya2011/devkit/mentalray.
For more information
on shader libraries, see
mental ray for Maya custom shaders.
NoteBeginning Autodesk
Maya 2011, mental ray for Maya has implemented 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.
- Load the shader by doing one of the following
See
Load shaders.