This page provides information on the MDL Material.


Page Contents

 

Overview


The VRayMDLMtl material loads NVIDIA Material Definition Language files (.mdl) and renders them directly with V-Ray.

 

 



 

 

UI Path: ||Material Editor window|| > Material/Map Browser > Materials > V-Ray > VRayMDLMtl

 

Installed Material Library


The following MDL material files are included when installing V-Ray, starting with V-Ray for 3ds Max 3.5. They are located in Local Disk (C:) > Program Files > Chaos Group > V-Ray > 3dsmax 20xx for x64 > mdl

 

 

 
Aluminum Anodized

 


Architectural

 


Asphalt

 

 

 


Carbon composite

 


Carpet Berber White

 


Ceramic Tiles Small

 

 

 

 
Chrome

 

 
Coated Flipflop Paint

 

 
Coated Flint Glass

 

 

 

 
Colored Wax

 

 
Concrete

 

 
Concrete Polished

 

 

 

 
Copper

 

 
Granite Black

 

 
Mahogany Floorboards

 

 

 

 
Marble White

 

 
Metal Examples

 

 
Noise Flow Glossy

 

 

 

 
Noise Perlin Glossy

 

 
Noise Worley Glossy

 

 
Pattern Blended

 

 

 

 
Pattern Checker Glossy

 

 
Porcelain

 

 
Resin Polyurethane Matte

 

 

 

 
Rubber Studded Black

 

 
Stucco

 

 
Walnut Semi Gloss

 

 

 

Coordinates and Noise


These rollouts are standard 3ds Max texture rollouts.

 

 

 

General


The General rollout holds parameters that control common shader characteristics.

 

 

 

mdl filename – Specifies the .mdl file. This button control also supports a context menu with the following options:

Clear – Unloads the current shader and restores the plug-in as if no shaders have been loaded. 
Open Containing Folder – Reveals the shader location in Explorer.
Open in External Editor – Opens the shader in an appropriate text editor.
Recent Files – Holds a list of the recently loaded shaders and an option to clear the history list.

mdl material – Displays the material name.

max ray depth – Specifies the maximum reflection/refraction depth for the shader.

show preview – Determines whether to render a shader preview in the material editor.

clamp shader result – Determines whether to force the result in the [0, clamping limit ] range or not.

clamping limit – Specifies the upper clamp limit if clamp shader result is enabled.

viewport color – Specifies the diffuse component of the material used in the viewport shading.

wrap texture coordinates – Automatically wraps the texture coordinates for the MDL material passing only values in the [0.0, 1.0] range.

 

Compiler Output


The Compiler Output rollout holds shader compilation and manipulation result messages.

 

 

 

Parameters


Any additional material-specific parameters (if any) are listed in this rollout. The example below shows parameters for a chrome mdl.

 

 

 

Importing NVIDIA vMaterials


In order for the MDL Material to correctly import NVIDIA vMaterials, the following two paths should be set in the environment variable below:

VRAY_MDL_PATH_3DSMAX20yy_x64=%PROGRAMDATA%\NVIDIA Corporation\mdl;%USERPROFILE%\Documents\mdl

where yy is the version of Max installed.

 

Example:

VRAY_MDL_PATH_3DSMAX2018_x64=C:\Program Files\Chaos Group\V-Ray\3dsmax 2018 for x64\mdl;%PROGRAMDATA%\NVIDIA Corporation\mdl;%USERPROFILE%\Documents\mdl

 

Importing MDL Files from Substance Designer 


In some cases, when using MDL files exported from Substance Designer, V-Ray may fail to load some modules. In order to load these modules, a folder needs to be set up before starting 3ds Max.

  1. Make a folder, for example X:\MDL, that will act as the MDL repository. Put the MDL modules that are exported from Substance Designer into this folder.
  2. Put the textures needed by the MDL materials in the same repository in their respective subfolder (for example, X:\MDL\MDL_Plywood_02).
  3. Tell V-Ray where the MDL repository is by appending it to the VRAY_MDL_PATH_3DSMAX20yy_x64 environment variable.
  4. Find the folder where Substance Designer keeps its MDL modules (usually C:\Program Files\Allegorithmic\Substance Designer 5\resources\view3d\iray but may differ from version to version) and append its path to the same environment variable. 

In the end, the environment variable should look something like:

VRAY_MDL_PATH_3DSMAX20yy_x64=C:\Program Files\Chaos Group\V-Ray\3dsmax 20yy for x64\mdl;C:\Program Files\Allegorithmic\Substance Designer 5\resources\view3d\iray;X:\MDL


References