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

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.

MDL Materials 3.13

The NVIDIA Material Definition Language, or MDL, is a formal specification to describe material designs that comprise all properties relevant for a realistic visualization and physically accurate appearance. That includes the base appearance like color and texture of the surface, the reflection and refraction behavior, absorption and scattering effects of volumetric parts, emissive properties, down to geometric detail from bump, normal, or displacement maps. The underlying shading models are strictly based on BSDF descriptions, and any combinations of them that do not break physics.

The MDL materials are typically provided in files of type .mdl. Often, they are part of a larger catalog, which delivers many variations of materials. A final MDL material description for use in the renderer may be built from other base MDL components within the same catalog, which are ultimately constructed from standard MDL functions and BSDF models implemented in the MDL-capable rendering engine. A renderer like mental ray can take advantage of that knowledge about shading properties by applying certain optimizations, like importance sampling.

The usage and application of MDL materials in a scene is straight forward. The .mdl files can be included into a scene like regular shader declarations. mental ray will create material nodes in the internal scene database that can be referenced by name in objects and instances in the usual way. See known limitations for details.

Copyright © 1986, 2015 NVIDIA ARC GmbH. All rights reserved.