Following is a step by step guide to create an effect with our advanced shading technique which utilises physically based rendering and image based lighting.

If you don't want read and just test the example download it here and load it up in the DeepAR Studio:

The assets contain the finished effect as well as all the source materials so you can easily follow the tutorial. Load the Helmet_PBR_v1 in the studio and lets get cracking.


We'll go through each uniform and texture used in the shader but before you continue you might want to refresh your memory on some PBR/IBL theory here.


Once you have opened the effect select the polySurface12 object. In the Material properties pane on the right you will see the "PBR with Image Based Lighting (Compact)" is selected. Let's go through each parameter of the shader to achieve the best visuals.

Albedo

The Albedo map defines the raw colour of the surface of the object. For good results, this should be as flat as possible and without any baked light information.

Normal Map

The normal map is responsible for adding fine surface details that won’t be practical using geometry.

Roughness

Roughness refers to the “glossiness” factor on the surface. As the surface gets rougher, the highlights get more diffuse and vice-versa.

Besides the value, roughness can also be controlled using a roughness map where black areas correspond to zero roughness (very shiny) and white areas correspond to one roughness (very diffuse).

Metalness

Metalness defines how metallic a surface is. Similarly to the Roughness, this can be controlled either by the Metalness value or by a Metalness map with a black (zero) to white (one) range.

In this example, a metalness map was created to mask out the horns from the rest of the helmet.

In this example, a metalness map was created to mask out the horns from the rest of the helmet.

Ambient Occlusion

The Ambient Occlusion map simulates areas where the light can’t get such as holes, crevices and narrow places within the object.

Environment Map

The environment map is a 360º panoramic image that controls both light intensity and its colour. This should always be imported with the “Create mipmaps” option enabled since it’s crucial for its functionality.

PBR - Compact

The compact variant of the PBR shader works mostly in the same way but it saves on both file size and performance since it combines three of the black and white maps into one RGB image.

Aaaand thats it. Hope you like it :D

Did this answer your question?