This page provides a tutorial for using the V-Ray MDL Material to render Substance Designer MDL outputs.
In this tutorial, we will render an object with a basic MDL material created in Substance Designer via the VRayMDLMtl.
Open Substance Designer and create a new MDL material by clicking the Add New MDL Material button.
For this tutorial, we are starting with an empty map.
The material root automatically populates in the graph. Now we need to work our way over to creating the base color of the material.
Drag the input connector out into the graph to activate a drop-down with a list of possible nodes to add:
Substance Designer populates the drop-down with the most commonly used nodes toward the top. Choose the first option, material(bool,material_surface,material_su...:
Now we need to create a surface to apply the base color to. Drag the surface (material_surface) input into the graph area:
Choose the first suggested option, material_surface(bsdf, material_emission):
Now that we have the surface node, we need to add a node that allows us to choose the diffuse color. Drag the material surface input into the graph space and choose the first suggested node, diffuse_reflection_bsdf:
The top (yellow) input port is responsible for the tint of the surface. Drag it out into the graph space and choose the color option from the drop-down:
Double-click the tint node to activate its properties in the right-hand panel. Choose the desired color. For this example, we are using a shade of orange:
In order to adjust this color later without having to find the specific node, right-click the tint node and choose Exposed from the options. This pins the color properties to the attributes panel on the right-hand side of the screen along with all the other properties of the graph, and any other properties you choose to pin. This can be useful for complicated materials.
In order to add reflection to the material, tap the space bar in a blank space in the graph (making sure no nodes are already selected) and type ggx. Select the first suggested option, microfacet_ggx_smi...:
In order to combine the reflection and the diffuse color, we will "blend" them using a fresnel node. Tap the space bar in a blank part of the graph and type fresnel, selecting fresnel_layer that appears in the drop-down:
First, connect the ggx node to the middle (layer (bsdf)) port in the fresnel node:
Now, rearrange the connections as shown below. The diffuse reflection connects into the base (bsdf) port, and the fresnel layer output connects into the material surface node. Substance Designer will automatically break the existing link between the diffuse reflection and material surface.
The material is still matte because it lacks an ior value in the fresnel layer. In order to add a number, tap space bar in a blank space and type float. Select the first suggested option:
Connect the float node to the ior (color) port at the top of the fresnel layer node. Substance Designer will automatically convert the black and white node with a color node. Double-click the float node to open its options on the right-hand side of the screen. It will have a value of 0. Double-click the 0 to add the desired ior numerical value. For this example we used 1.6:
The material is now glossy, as shown in the 3D View preview.
Exporting the Object
Right-click on the graph title and select Export MDL Module...
Choose the directory you wish to save the MDL file.
In 3ds Max, create an MDL Material and double-click it to activate the parameters.
Select the box to bring up a file navigator and locate the .mdl you saved out of Substance Designer:
With both the desired geometry and the MDL Material selected, apply the material by selecting the application button at the upper left of the dialog:
The selected geometry will inherit whatever viewport color is assigned in the material properties:
Now we can render and get our final result:
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.
- Make a folder that will act as the MDL repository, for example X:\MDL, and put in it the MDL modules that are exported from Substance Designer.
- Put the textures needed by the MDL materials in the same repository in their respective subfolder (for example, X:\MDL\MDL_Plywood_02).
- Tell V-Ray where the MDL repository is by appending it to the VRAY_MDL_PATH_3DSMAX20XX_x64 environment variable.
- Find the directory where Substance Designer keeps its MDL modules (usually C:\Program Files\Allegorithmic\Substance Designer 5\resources\view3d\iray\alg but may differ from version to version) and append its path to the same environment variable, separated by a semi-colon.
In the end, the environment variable should look something like:
VRAY_MDL_PATH_3DSMAX20XX_x64=C:\Program Files\Chaos Group\V-Ray\3dsmax 20XX for x64\mdl;C:\Program Files\Allegorithmic\Substance Designer 5\resources\view3d\iray;X:\MDL