Iray Programmer's Manual

Material Definition Language

Overview

NVIDIA Material Definition Language (MDL) enables users to define the reflective, transmissive, emissive and volumetric properties of objects. It consists of two major parts:

  1. A declarative material definition based on a powerful material model, and
  2. A procedural programming language to define functions that can compute values for the parameters of the material model.

Additional Information

The building blocks needed for part one, like elemental distribution functions, their modifiers and combiners, as well as the MDL file format .mdl and organization in modules and packages is explained in the NVIDIA Material Definition Language: Language Specification document [MDLSpecification]. The NVIDIA Material Definition Language: Technical Introduction document [MDLIntroduction] gives an introduction.

Not all of part two is currently supported in all contexts of all NVIDIA Iray render modes. Environment functions are fully programmable in all modes. In some other cases, expressions are restricted to a set of predefined functions and combinations of those, plus constant-folding in the MDL compiler. The available predefined functions and where and how they can be used is explained in the Module base.mdl documentation.

The release tape contains some example MDL materials located in the directory mdl/material_examples, which showcase some of the capabilities of the material definition language and the texturing functionality exposed through the module base.mdl.

Integration in Iray

MDL materials and functions are used in the following places in Iray: