Materials

A material determines the response of a surface to illumination. Materials in mental ray consist of a material name and one mandatory and several optional shaders, each of which can be a standard shader or a user-provided C/C++ shader:

The shading function may be either a user written function linked at run time, or it may be one of the standard functions. Shaders may define parameters that control their behavior. Shaders are completely free to define any set of parameters required for their function, but there is a set of commonly used terms and parameter names that will be found in many parameter lists.

Parameters have names and values. The declaration of a shader, which is provided by the author of the shader, defines the list of possible parameters, including names and types (such as "color" or "vector"). The definition of a shader is done in a scene file, and provides the values. For example, a shader might have a color parameter named "diffuse" with the value 1.0 1.0 0.0, which specifies a yellow color. Parameter values can be given in any order. Parameters can also be omitted; mental ray will substitute null values. Shaders are typically programmed to provide reasonable defaults in this case.

BRDF/BSDF 3.7

A Bidirectional Reflection Distribution Function (BRDF) is a common model in computer graphics to describe illumination characteristics of a material. A Bidirectional Scattering Distribution Function (BSDF) is an extension of a BRDF with transmission properties like refraction added to the model, and used in mental ray as the basis for its internal representation.

A BRDF can provide additional information to the renderer compared to conventional shaders normally used in materials. As a benefit, these functions typically adhere to physical or mathematical constraints. This knowledge can be essential to improve rendering efficiency. On the other hand, a BRDF does not offer the same flexibility as a material shader. However, this flexibility is not needed for the majority of rendering applications, but the performance costs associated with "black box" shading can be avoided in those cases.

The current implementation allows rendering algorithms to take advantage of specified BRDFs as needed, or still support fully programmable shading. mental ray provides a set of built-in BRDF shaders for common shading models. They are exposed as built-in shaders which can be attached to materials slots like regular material or photon shaders. For advanced rendering algorithms like irradiance particles a BRDF should be attached to the bsdf slot of a material description.

Copyright © 1986-2008 by mental images GmbH