Verge3D for Maya: glTF PBR Materials — Soft8Soft
Description: How to setup glTF-compliant PBR materials in Maya to be used with Verge3D.

# glTF PBR Materials / Maya

If your content needs to be fully-compatible with glTF 2.0 standard for some reason, you'll need to use the simplistic material setup. This setup is based on a limited set of Maya nodes which should be connected with each other as specified below.

Example of a scene made with glTF-compatible materials.

For usage example, check out the GLTF Compat demo (source files available in the Asset Store).

- Setting Up
- Exporting Textures from Substance Painter
- Alternative Setup based on usdPreviewSurface Material
- Exporting to glTF in Runtime

#

## Setting Up

Assign the Standard Surface shader node to your material then follow the procedures below.

The following Standard Surface settings are supported in Verge3D:

### Base Panel

- Weight or (Base input in Hypershade)
- Color or (Base Color input in Hypershade)
- Metalness

### Specular Panel

- Roughness (Specular Roughness input in Hypershade)

### Emission Panel

- Weight (Emission input in Hypershade)
- Color (Emission Color input in Hypershade)

### Geometry Panel

- Opacity
- Bump Mapping (Normal Camera input in Hypershade)

In addition, when dealing with Ambient Occlusion, you might also want to use Weight value from the Specular panel to make you Maya viewport look consistent with Verge3D rendering.

### Creating PBR material for general use

Follow these steps to configure standard PBR shader which has 3 maps: Base Color, ORM (Occlusion, Roughness, Metalness) and Normal Map:

1. Assign Standard Surface to your model.
2. Open the Hypershade editor, find and select this material in the Browser panel.
3. Create a file node with Base Color texture. Make sure that the Color Space setting of this node is set to sRGB.
4. Connect Out Color output of this texture to Base Color input of Standard Surface node.
5. Create a file node with ORM texture. This texture should contain 3 channels with AO (red), Roughness (green) and Metalness (blue) info. Make sure that the Color Space setting of this node is set to Raw.
6. Connect R channel of the ORM texture to Base and Specular inputs of the Standard Surface node to simulate the ambient occlusion effect.
7. Connect G channel of the ORM texture to Specular Roughness input of the Standard Surface node.
8. Connect B channel of the ORM texture to Metalness input of the Standard Surface node.
9. Create file and bump2d nodes with Normal Map texture. Make sure that the Color Space setting of the file node is set to Raw and the Use as setting of the bump node is set to Tangent Space Normals.
10. Connect file to bump2d node and bump2d node to Normal Camera input of the Standard Surface node.

This is how the material should look in the Hypershade editor:

#

## Exporting Textures from Substance Painter

The models and the baked normal and occlusion maps (if any) can be loaded in Substance Painter via OBJ format.

Overall 3 maps are produced in this software in the end: base color/transparency, occlusion/roughness/metallic and normal.

#

## Alternative Setup based on usdPreviewSurface Material

You can use these materials for both glTF and USD formats.

Assign the usdPreviewSufrace shader node to your material, the following settings are supported in Verge3D:

- Color or (Diffuse Color input in Hypershade)
- Emission Color or (Emissive Color input in Hypershade)
- Occlusion
- Opacity
- Alpha Cutoff or (Opacity Threshold input in Hypershade)

### Specular Panel

- Metalness (Metallic input in Hypershade)
- Roughness (Roughness input in Hypershade)

### Displacement Panel

- Normal Map (Normal input in Hypershade)

### Creating USD material

Follow these steps to configure standard PBR shader which has 3 maps: Base Color, ORM (Occlusion, Roughness, Metalness) and Normal Map:

1. Create a file node with Diffuse Color texture. Make sure that the Color Space setting of this node is set to sRGB.
2. Connect Out Color output of this texture to Diffuse Color input of usdPreviewSurface node.
3. Create a file node with ORM texture. This texture should contain 3 channels with AO (red), Roughness (green) and Metalness (blue) info. Make sure that the Color Space setting of this node is set to Raw.
4. Connect R channel of the ORM texture to Occlusion input of the usdPreviewSurface node to simulate the ambient occlusion effect.
5. Connect G channel of the ORM texture to Roughness input of the usdPreviewSurface node.
6. Connect B channel of the ORM texture to Metallic input of the usdPreviewSurface node.
7. Create file node with Normal Map texture. Make sure that the Color Space setting of the file node is set to Raw.
8. Connect file node to Normal input of the usdPreviewSurface node.

This is how the material should look in the Hypershade editor:

#

## Exporting to glTF in Runtime

With export to gltf puzzle you can export your models or the entire scene in realtime. Then you can download the exported model or upload to the server for permanent storage. See more in the puzzle's reference.

## Got Questions?

Feel free to ask on the forums!