Search
Start typing to search...

PBR Materials

Author:
Please note that this is a BETA version of the document. All information presented is correct but we are working on improving the details.

Introduction

PBR is an abbreviation for Physically-Based Rendering. It aims to simulate real-life materials using realistic shading, lighting models, different texture maps, and values.
You can find all PBR shaders for Aximmetry in the Common\Shaders\PBR folder.

Setting up Pipeline Color Space

If you are working with PBR textures you should set the Pipeline Color Space to linear as it gives the correct results.
Go to File/Properties/Rendering and set the Pipeline Color space like so then click okay:

 

PBR workflows

There are two possible ways to create PBR materials.

Both Metalness or Specular are supported in Aximmetry. These are indicated by the shader's name.
In the following examples we will be using the most basic PBR shader to demonstrate their usage, additional shader properties are listed here. 

Metalness Workflow

In the case of Metalness workflow, you can use any PBR shader that hasn't got _SPEC_ in its name.

Let's check the properties

In this example: we will use [Common]:Shaders\PBR\PBR_Norm.xshad
It is the most basic PBR metalness shader that we have, all other PBR shaders have these inputs. 


Albedo Map is the base color input, which defines the diffuse color for insulators(non-metal) and the reflectivity for metallic surfaces.

Normal Map is used to add details like bumps without adding more polygons, usually baked from a high-res model.

Metalness Map indicates which part of the object is metallic and which is not, therefore it is usually a black and white image, white for metallic(value:1) and black (value:0) for non-metallic.
Metalness value: it should be 0 for insulators and 1 for metallic surfaces.
Note: when using a metalness texture metalness value should be set to 1.
If you don't have a map/texture, because, for example, all the values on the surface are the same, then you can set a simple white texture (this is the default) and set the value directly at the Metalness property.
Metalness should always represent the top visible layer of the material.
Metallic surfaces don't have diffuse reflection, the specular color and intensity are taken from the Albedo Map.
There can be partially metallic surfaces in which case the color is grey (value between 0 and 1), but this should be used only for transitions between materials.
The following picture show a metallic and a non-metallic sphere:

Roughness Map (also known as Gloss Map in other PBR systems, although they could be inverted) defines the smoothness of the surface. Rougher surfaces tend to show wider and dimmer specular reflections while smooth surfaces show brighter and sharper specular reflections. If you don't have a map/texture, because, for example, all the values on the surface are the same then you can set a simple white texture (this is the default) and set the value directly at the Roughness property.
Roughness value can be set by hand between 0 and 1. Smoother surfaces have lower and rough surfaces have higher values.
Note: when using roughness texture roughness value should be set to 1.
The following image shows how roughness value changes the specular reflections:
Note: all spheres are metallic to show more specular reflections.

Reflectivity value sets how much the object reflects the incoming lights
Except for very specific circumstances, we highly recommend not changing this value as the default value is correct for almost all surfaces, and changing this value can result in physically incorrect material.
 - Metallic surfaces always reflect 99% of the incoming light independently of this value. (Of course, you can make a metallic surface less reflective by using a darker Albedo Map)

Specular value sets how much the object reflects specular highlights, higher value means stronger specular reflection. This is only for special cases so normally you should not change it.

Specular Workflow

For specular workflow, you should use a shader that has _SPEC_ in its name.

In this example: [Common]:Shaders\PBR\PBR_SPEC_Norm.xshad is the most basic PBR Specular shader that we have, all other PBR shader have these inputs. 

Albedo Map contains the diffuse color of the material.

Normal Map is used to add details like bumps without adding more polygons, usually baked from a high-res model.

Specular Map is where the reflectivity intensity and reflectivity color are stored.

Roughness Map (also known as Gloss Map in other PBR systems, although they could be inverted) defines the smoothness of the surface. Rougher surfaces tend to show wider and dimmer specular reflections while smooth surfaces show brighter and sharper specular reflections. If you don't have a map/texture, because, for example, all the values on the surface are the same then you can set a simple white texture (this is the default) and set the value directly at the Roughness property.
Roughness value can be set by hand between 0 and 1. Smoother surfaces have lower and rough surfaces have higher values.
Note: when using roughness texture roughness value should be set to 1.
The following image shows how roughness value changes the specular reflections:

Please note that specular workflow gives you more flexibility, but it allows you to create physically incorrect materials. For example, a material where the outgoing light is more than the incoming light. You should try to avoid this as this will cause problems when you try to light the scene.

Environment Maps

To be able to use Environment Maps you should be using a shader that has _IBL_ in its name. You can read more about IBL here.
Most of our PBR IBL shaders let you use different kinds of Environment Maps (Env maps), namely Irradiance Env Map and/or Specular Env Map.
Env maps are used to light an object and also create a reflection of the surrounding area on the object.
Irradiance Env Map defines the diffuse reflection of the object.
Specular Env Map
defines the specular reflection of the object.
Note: to get the most realistic diffuse reflections we suggest using lightmaps as explained here.

Normally both are the same, but with different attributes.

For the Env map textures, you need to set the attributes 
If the texture is loaded straight into the shader you have to set the attributes in the shader properties using the triangle button

If the texture is connected to the shader like this:

You have to set it in the textures property with the triangle button


In both cases, the attributes have to be set in the following way:
for the Specular Env Map you have to set the Specular env attribute.

For the Irradiance Env Map you have to set the Irradiance env attribute.

You can read more about attributes here.

Keep in mind that the way the following textures are connected is only an example, you can use other methods as well.
After connecting the ENV Maps to a shader like so:



You should see something like this:

Let's apply a bit more advanced shader to the plane

You will see something like this:

You can change the color of the cube using a Solid Color node:

You will get something similar:

Using Dynamic lights

Dynamic lights are mostly used for objects/lights that are moving in the scene so they cast realtime shadows and affected by light.


However, using Dynamic light will not be physically realistic, and using too many dynamic lights can cause performance issues.
In this example, we are going to use the same scene but with dynamic lights.


Add a Spot Light node and connect its Affected Object pin to the Scene Root nodes Affecting Lights pin.
Your connections should look like this:
Keep in mind that the way the following textures are connected is only an example, you can use other methods as well.

And you should see something like this:

You can also combine it with IBL like this:

To get results similar to this:

Light Maps

Lightmaps are used to store pre-baked brightness of the texture to save some GPU time, mostly used for static objects. Lightmaps can be baked in many 3D modeling software.
You can achieve realistic lighting, shadows, and color bleeding with lightmaps.
Keep in mind that lightmaps only store diffuse lights, to get specular highlights you should use either a dynamic light or Specular Env Map or their combination.
To use lightmaps in Aximmetry choose a shader that has Light in its name i.e PBR_IBL_Norm_Light.
These shaders have their Irradiance Env Map replaced with the Lightmap.
Let's say you have a scene in a 3D modeling software that looks like this rendered:

To achieve the same result in Aximmetry using Lightmaps is a great option, after generating and importing the maps to Aximmetry make connections like here:
(Solid Color node is used to change the Albedo of the cube to red as in the original render)
Keep in mind that the way the following textures are connected is only an example, you can use other methods as well.

you should see something like this:

Adjusting Tone Mapper

We suggest that you adjust the lighting in your 3D modeling software in a way that it is correct with the default Tone Mapper values.
If you find your scene too bright or too dark to your liking you can adjust the Exposure parameter of the Tone Mapper 4 node, which is located inside the Render_General_PBR compound.
A higher exposure value means brighter a lower value means a darker scene.

Examples of PBR materials

You can find example projects here: [Tutorials]:Materials\

Article content

Loading
Close
1/10