mental ray Shaders


In mental ray, a shader is a function that calculates light effects. There can be shaders for lights, cameras (lens shaders), materials, shadows, and so on.

NoteIn 3D modeling, the term “shader” typically refers to an algorithm that specifies how a surface responds to light. (The shaders for Standard and Raytrace materials fall into this category.) With the mental ray renderer, “shader” has a more general sense of any algorithm used in rendering.

The mental ray renderer can render most types of 3ds Max materials and maps. See 3ds Max Materials in mental ray Renderings. In addition, if you have enabled mental ray extensions (see mental ray Preferences), you can apply a variety of shaders to materials. Materials designed for use with the mental ray renderer have specific components to which you can assign a shader. And for standard 3ds Max material types, the mental ray Connection rollout lets you add mental ray shading.

WarningWhen you use the Default Scanline renderer, mental ray shaders typically appear as black or white surfaces, or they are ignored entirely.

You use the Material/Map Browser to assign a mental ray shader the same way you do a map.

mental ray maps in the Browser list

NoteOther kinds of special-purpose shaders include shaders for cameras and lights. Buttons to assign camera shaders are found on the Render Setup dialog Camera Effects rollout, and the controls to assign light shaders are on a light object's mental ray Light Shader rollout. This rollout appears only on the Modify panel, not the Create panel.

The shaders listed in the Browser come from several libraries that are provided with 3ds Max. Shaders created specifically for 3ds Max are described in this document. Shaders provided with the NVIDIA or lume shader libraries have their own online documentation.

In addition to the shaders described in the topics that follow, 3ds Max includes these shaders:

NoteWhen you wire the parameters of an object whose material has mental ray shaders assigned, names of shader parameters might differ from those in the Material Editor interface. Also, parameters not supported by 3ds Max might appear as blanks in the wiring menu.

mental ray Shaders not Provided with 3ds Max

If your installation includes shader libraries other than those listed in this reference (whether obtained from a third-party source, or custom written), then the Browser might list those shaders as well. Documentation for third-party or custom shaders should come from the shader's provider.

Where Shaders Are Installed

Shaders provided with 3ds Max are installed in the subdirectory \nvidia\shaders_standard\, below the 3ds Max root directory. The \include folder is for the MI include files, and the \shaders folder is for the DLLs.

Third-party shaders should not be installed in \shaders_standard. They should be installed either in \shaders_3rdparty or \shaders_autoload. If a third-party shader is present in \shaders_autoload, it is loaded automatically when you start 3ds Max. If a third-party shader is present in \shaders_3rdparty, you must update the file 3rdparty.mi so it explicitly loads the shader. The MI file \shaders_3rdparty\3rdparty.mi contains comments that explain how to add load statements.

NoteShaders listed in the MI file are loaded in reverse order: that is, from the bottom of the list to the top.