---
title: "Rendering MDL Textures from Substance Designer"
canonical: "https://documentation.chaos.com/space/VMAX/113575529/Rendering%20MDL%20Textures%20from%20Substance%20Designer"
format: markdown
---
This page provides a tutorial for using the V-Ray MDL Material to render Substance Designer MDL outputs.

## **Overview**

---


## **Making the Material in Substance Designer**

---

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.


![image](media://7e736af6-e425-4f3e-90d6-c03bf44d1913)



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:


![image](media://13bd8a00-76b4-4d17-9a64-e60c81df8e97)



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...**:


![image](media://3c8f9b62-7295-4b47-b675-a8a5b873a37d)



Now we need to create a surface to apply the base color to. Drag the **surface (material_surface)** input into the graph area:


![image](media://bc7711b4-032f-4883-a540-ef15edea8f5d)



Choose the first suggested option,** material_surface(bsdf, material_emission)**:


![image](media://b344603f-2cd8-4fc2-b34f-94abfeb0fded)



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**:


![image](media://ee7d75e8-288c-4110-bf26-87185876321d)



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:


![image](media://082a7cc5-85e9-4602-9811-edfdf9e078fe)



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:


![image](media://49211b4d-a34f-4e6f-88cf-7cbe1178872d)



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.


![image](media://fbd4e3df-bc6b-4179-8c14-fdb08845a073)



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...**:


![image](media://5185b824-beb8-41a3-9fd7-5c00bb92403f)



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:


![image](media://95363e08-0fb3-46e2-beab-ffcd5cea9744)



First, connect the **ggx** node to the middle (**layer (bsdf)**) port in the **fresnel** node:


![image](media://d15e2125-1261-4db6-9392-e5fd8a508a7c)



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.


![image](media://5181c1bb-7114-4d30-a85c-b0dfb662ccc6)



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:


![image](media://7e0f5676-4812-4835-a2f5-155dcb4b5ca5)



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:


![image](media://6129dc2e-2201-4b6c-a80c-f7b2e5b31b59)



The material is now glossy, as shown in the 3D View preview.


## **Exporting the MDL from Substance Designer**

---

### **Exporting the Object**

Right-click on the graph title and select* ***Export MDL Module...**


![image](media://32eed8d9-5359-4206-9450-6a822212bd4f)



Choose the directory you wish to save the MDL file.


## **Rendering the Object with V-Ray**

---

In 3ds Max, create an MDL Material and double-click it to activate the parameters.


![image](media://e114db25-9aa9-42d8-96d0-aa90d27b07c2)



### **Loading the MDL file**

Select the box to bring up a file navigator and locate the *.mdl* you saved out of Substance Designer:


![image](media://2b2a5946-a879-4c59-893b-db0494d9f6c6)



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:


![image](media://4a640659-8641-44bc-a076-e7f87caa0776)



The selected geometry will inherit whatever viewport color is assigned in the material properties:


![image](media://171e2a58-028a-4458-b5ac-03c05e3e9bcf)




### **Final Rendering**

Now we can render and get our final result:


![image](media://44b10542-8e58-4925-97f5-1e11ba3a645a)



## **Notes**

---

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 that will act as the MDL repository, for example *X:\MDL*, and put in it the MDL modules that are exported from Substance Designer.
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_3DSMAX20XX** environment variable.
4. Find the directory where Substance Designer keeps its MDL modules (usually *C:\Program Files\Allegorithmic\Substance Designer 5\
esources\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](https://docs-chaos.atlassian.net/wiki/spaces/VNS/pages/115605616) should look something like:

**VRAY_MDL_PATH_3DSMAX20XX=C:\Program Files\Chaos\V-Ray\3ds Max 20XX\mdl;C:\Program Files\Allegorithmic\Substance Designer 5\
esources\view3d\iray;X:\MDL**