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.
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:
- Assign Standard Surface to your model.
- Open the Hypershade editor, find and select this material in the Browser panel.
- Create a file node with Base Color texture. Make sure that the Color Space setting of this node is set to sRGB.
- Connect Out Color output of this texture to Base Color input of Standard Surface node.
- 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.
- Connect R channel of the ORM texture to Base and Specular inputs of the Standard Surface node to simulate the ambient occlusion effect.
- Connect G channel of the ORM texture to Specular Roughness input of the Standard Surface node.
- Connect B channel of the ORM texture to Metalness input of the Standard Surface node.
- 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.
- 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:
- Assign usdPreviewSurface to your model.
- Open the Hypershade editor, find and select this material in the Browser panel.
- Create a file node with Diffuse Color texture. Make sure that the Color Space setting of this node is set to sRGB.
- Connect Out Color output of this texture to Diffuse Color input of usdPreviewSurface node.
- 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.
- Connect R channel of the ORM texture to Occlusion input of the usdPreviewSurface node to simulate the ambient occlusion effect.
- Connect G channel of the ORM texture to Roughness input of the usdPreviewSurface node.
- Connect B channel of the ORM texture to Metallic input of the usdPreviewSurface node.
- Create file node with Normal Map texture. Make sure that the Color Space setting of the file node is set to Raw.
- 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!