glTF PBR Materials / Blender

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 Blender nodes which should be connected with each other as specified below.

Example of glTF-compatible materials
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).

Texture Packing

The glTF 2.0 standard implies that you pack the PBR components of materials into a single image (aka ORM texture):

Setting Up

Add the Princlipled BSDF shader node to your material then connect texture nodes as follows. Note that all textures are optional and any of them can be safely omitted.

Example of glTF material

If you need to tune your Base Color texture, e.g make it darker or mix with some other color, use Multiply node as shown on the picture below:

glTF material with Multiply node

You can also use the Alpha input to tune your material transparency.

To see the preview of the Principled BSDF shader in the Blender viewport, you can set the display method of the 3D View to Rendering or just preview your scene in Verge3D with the Sneak Peak button on the same panel.

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.

Substance Painter

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

ORM texture map

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

Export material from Substance Painter

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

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!