Physical material
Physical materials are provided in Blender by the Cycles-based node group called Verge3D PBR.
Setting up
You can add either the complete PBR material or just the Verge3D PBR node group to your project as follows: select File > Append then go to /applications/materials/pbr_material.blend file.
Then either from the Material category select Verge3D PBR material, or from the NodeTree category select Verge3D PBR node group.
You can connect texture nodes to the Verge3D PBR node as described below. Note that all textures are optional and any of them can be safely omitted.
-
Connect a BaseColor texture to the BaseColor input of the Verge3D PBR node. Color Space of the texture must be set to Color.
-
Connect an OcclusionRoughnessMetallic texture to the MetallicRoughness and Occlusion inputs of the Verge3D PBR node. For optimal loading and rendering of the PBR shader you should pack your occlusion, roughness and metallic textures into R, G and B channels of a single texture respectively. A variant is also possible when you only pack roughness and metallic textures and leave occlusion as is. The Color Space setting of this texture must be set to Non-Color.
-
Connect a NormalMap texture to the Normal input of the Verge3D PBR node. Color Space of the texture must be set to Non-Color.
-
Connect an Emissive texture to the Emissive input of the Verge3D PBR node. Color Space of the texture must be set to Color.
-
Connect the Alpha output of the BaseColor texture to the Alpha input of the Verge3D PBR node. To enable transparency for a material you must have a transparency map packed in the alpha channel of your BaseColor texture - connect it to the Alpha input. Use the AlphaMode slider to change transparency type of the material: 0 - Blend, 1 - Mask.
-
You can also use one vertex color layer in the Verge3D PBR material. To do it, simply connect the Color output of the Attribute node (found in the Input category) to the the COLOR_0 input of the Verge3D PBR node and set Use COLOR_0 to 1. Make sure that the name of the vertex color layer is specified in the Name field of the Attribute node.
To see the preview of the Verge3D PBR 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.
Using PBR shader without textures
If you'd like to use solid colors instead of textures, you can use the BaseColorFactor input instead of BaseColor. Сorrespondingly, in order to set Roughness, Metallic and Emissive, use the value inputs of the Verge3d PBR node with the same names instead of color inputs. Occlusion and Transparency, however, cannot be set without a texture.
Exporting Textures from Substance Painter
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\ folder (create if not).
When exporting textures from Substance Painter, choose Verge3d for Blender in the export dialog window so that all generated textures are compatible with the glTF 2.0 standard Verge3D is based on.