Mental Ray for Maya


Maya 2016 Extension 2 - Mental Ray for Maya 2016R2.0 - 3.13.1.11

In this workflow it is recommended to use the MILA material. In Substance Painter, you have the ability to work with metallic/Roughess or Specular/Glossiness workflows and these shaders are geared towards real-time usage. However, Substance Painter can export textures for use with Mental Ray. By configuring an export preset, you can export the converted maps needed to work the MILA material Mental Ray doesn't currently support GGX BRDF, so it's not possible to get an exact match to Substance Painter's viewport. 

Download Example Scene

Substance Painter Export

  1. In your Project go to File / Export Textures...
  2. In the configuration tab, create a preset as shown in the image. Alternatively, you can download the Mental Ray MILA Preset and copy it to "C:\Users\xxx\Documents\Substance Painter 2\shelf\export-presets


     

MILA Material Setup

  1. Create a MILA material
  2. Import the textures exported from Substance Painter into Maya
  3. You will need to create 3 layers for the MILA shader. 1 for Diffuse, 1 for Metals (Fresnel Layer - Glossy Reflection), 1 for Dielectrics (Fresnel Layer - Glossy Reflection) 
    If you are only using a dielectric material or only a metallic material, then you do not need 2 Glossy Reflection layers. The 2 layers are needed for materials that have both dielectric and metallic. The metallic map is used as a mask for the layers.  
  4. Layer[1] Metal. This layer is needed if your material has raw metal. 
    Set the Fresnel IOR to 50 
    Add the metallic map to the Weight input
    Add the reflection map to the Color
    Add the roughness map to the Roughness *Roughness needs to be remapped. See the Roughness section for details. 
  5. Layer[0] Dielectric. This layer is for non-metals
    Set the Fresnel IOR to 1.5
    Add the metallic map to the Weight input. Metallic map needs to be inverted. Create a Reverse node. Take the Out Color of the metal map and add it to Input 1 of Reverse Node. Plug Output X of the Reverse node to the Weight.
    Add the reflection map to the Color
    Add the roughness map to the Roughness *Roughness needs to be remapped. See the Roughness section for details. 

    Substance Painter TextureColorspaceMILA Material Channel
    DiffusesRGBBase Component - Diffuse - Color
    Layer[1] Metallic
    Fresnel Glossy Reflection

    Layer for raw metal
    MetallicRAWWeight
    Roughness² (alpha gain 2.0)RAWRoughness
    ReflectionsRGBColor
    Fresnel IOR-Set value to 50.00
    Layer[0] Dielectric
    Fresnel Glossy Reflection

    Layer for non-metal
    Metallic (Reversed)RAWWeight
    Roughness² (alpha gain 2.0)RAWReflection Glossiness
    ReflectionsRGBColor
    Fresnel IOR-Set value to 1.5
    Normal Mapping
    Normal (Open GL)
    bump2D node - tangent space normal
    RAWMaterial Properties - Overall Bump

    *For Roughness and Metallic, you need to make sure Alpha is Luminance is enabled on the Texture2DNode under Color Balance.




Colorspace

It's important to make sure that textures are interpreted properly for a linear workflow. You can change the colorspace for textures on the Texture2D node. Be sure to set the Colorspace for each map as listed in the above table. 

Roughness

Mental Ray doesn't support GGX gloss curve. In order to better approximate the roughness, you need to square the result. This can be done using the Alpha Gain on the texture.

  1. Under Color Balance, make sure that Alpha is Luminance is checked.
  2. Set the Alpha Gain to a value of 2.0.