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

# glTF PBR Materials / 3ds Max

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 3ds Max 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).

## Contents

- Setting Up
- Color Space and Gamma Correction
- Exporting Textures from Substance Painter
- Alternative Setup based on glTF Material
- Alternative Setup based on Usd Preview Surface Material
- Exporting to glTF in Runtime

#

## Setting Up

Add a Physical Material shader node as follows: go to Materials/Map Browser and choose Physical Material from the General material list.

Then you can connect texture nodes to the Physical Material as described below. Note that all textures are optional and any of them can be safely omitted.

- Connect an Ambient Occlusion texture to the Base Weight Map input. For better consistency between the 3ds Max viewport and Verge3D you can also connect the Ambient Occlusion texture to the Refl Color Map input, but it's not necessary.
- Connect a Base Color texture to the Base Color Map input.
- Connect a Roughness texture to the Roughness Map input.
- Connect a Metallic texture to the Metalness Map input.
- Connect a Normal texture to a Normal Map node and then connect it to the Bump Map input of the Physical Material. You should also set the Bump Map Amount value in the Special Map panel of the Physical Material to 1.0.
- Connect an Emission texture to the Emission Color Map. You should also set the emission factor to 1.0 in the Basic Parameters panel of the Physical Material preferences.
- The Transparency map will be taken from Alpha Channel of the Base Color texture.

### Transparency Texture

The engine will use the Alpha channel from the Base Color texture as a transparency map automatically, if it is present. To make the transparency visible in the 3ds Max viewport, connect the Alpha channel of the Base Color texture to the Transparency Color Map input.

Also in the Preferences of the texture, in the Bitmap Parameters panel you should set Mono Chanel Output to Alpha and RGB Channel Output to Alpha as Gray.

#

## Color Space and Gamma Correction

For correct rendering, the color space should be taken into account for images. All images, except the Base Color and Emission textures, must be presented in the linear color space. To do this, select Override Gamma with the 1.0 value in the Gamma Preferences when you open an image in the Open Image dialog box (as can be seen below).

On the contrary, the Base Color and Emission textures must be opened in sRGB color space (with Gamma 2.2). To make it happen, just leave Automatic in the gamma preferences of the Open Image dialog box.

#

## 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.

To facilitate exporting textures from Substance Painter and to ensure maximum capabilities within the Verge3D engine we recommend using Verge3D export preset. Place this preset file to the export-presets folder usually located in the My Documents\Allegorithmic\Substance Painter\shelf\ directory (create it if does not exist).

When exporting textures from Substance Painter, choose Verge3d for 3ds Max in the export dialog window so that all generated textures are compatible with the glTF 2.0 standard Verge3D is based on.

#

## Alternative Setup based on glTF Material

Verge3D exporter plugin also supports 3ds Max' glTF Material materials by converting them directly into glTF 2.0-compatible PBR model.

Add a glTF Material shader node as follows: go to Materials/Map Browser and choose glTF Material from the General material list.

Then you can connect texture nodes as follows. Note that all textures are optional and any of them can be safely omitted.

1. Connect a Base Color texture to the Base Color Map input.
2. Connect a Transparency texture to the Alpha Map input, otherwise the alpha channel will be taken from Base Color Map.
3. Connect a Metallic texture to the Metalness Map input.
4. Connect a Roughness texture to the Roughness Map input.
5. Connect an Normal texture to the Normal Map input.
6. Connect an Occlusion texture to the Occlusion (AO) Map input.

You can also use glTF 2.0 extensions, by enabling corresponding checkers.

You can export all of them, however Verge3D does support only Unlit Material (which used to make shading independent of lighting).

#

## Alternative Setup based on Usd Preview Surface Material

You can use these materials to make your 3ds Max scenes compatible with both glTF 2.0 and USD formats. You might need to install "USD for 3ds Max" plugin, which is available from "Product Updates" in your Autodesk account.

Assign the Usd Preview Surface material node. The following settings are supported in Verge3D:

- Diffuse Color
- Metallic
- Roughness
- Occlusion
- Normal Map
- Emissive Color
- Opacity
- Opacity Threshold

Then you can connect texture nodes as follows. Note that all textures are optional and any of them can be safely omitted.

1. Connect a Diffuse Color texture to the Diffuse Color Map input.
2. Connect a Metallic texture to the Metallic Map input.
3. Connect a Roughness texture to the Roughness Map input.
4. Connect an Occlusion texture to the Occlusion Map input.
5. Connect an Normal texture to the Normal Map input.

#

## 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!