Start typing to search...

Using PBR in Aximmetry


What is PBR?

PBR is an abbreviation for Physically-Based Rendering. PBR aims to simulate real-life materials via realistic shading, lighting models, and different texture maps and values that represent the real-world materials.
You can find all PBR shaders for Aximmetry in the Common\Shaders\PBR folder, as their name indicates they each serve a slightly different purpose, but the principle is the same for all of them.

Setting up Pipeline Color Space

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


PBR workflows

There are two possible ways to achieve PBR material, Metalness or Specular workflow, both are supported in Aximmetry indicated by the shaders name. 

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 through this example, we will use PBR_Norm.xshad.

As you can see it has all input pins for metalness workflow, Albedo Map, Normal Map, Metalness Map, and Roughness Map.
Albedo Map is the base color input, which defines the diffuse color for insulators 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. 
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.

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.

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.

Reflectivity value sets how much the object reflects the incoming lights
Except for very specific circumstances, we highly recommend not to change this value as the default value is correct for almost all surfaces, and changing this value can result in a 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 one shader that has _SPEC_ in its name, for this example, we shall use PBR_SPEC_NORM.xshad to go through the properties.

Specular workflow uses some identical maps to Metalness workflow, namely Normal and Roughness map.
Despite its name Albedo Map is different as in this case it only contains the diffuse color.
Specular Map is where the reflectivity intensity and reflectivity color are stored.
Roughness value works the same way as in metallic workflow.

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

Additional shader properties

The earlier two shaders are the most basic PBR shaders for Aximmetry, but we have more complex shaders for various needs. Their names indicate what maps can be used in addition to the basic maps.

Let's see what the abbreviations stand for:

  1. AO - Ambient Occlusion
  2. Light - Light Map
  3. Refract - Refraction
  4. Emiss - Emissive Map
  5. Disp - Displace Map
  6. IBL - Image-Based Light
  7. MIRROR - Mirror camera input for planar reflection
  8. Fabric - Opacity of the material changes relative to the view angle

IBL shaders

IBL is an abbreviation for Image-Based Light which means the shader uses Environment maps to light the object.
IBL treats the surrounding environment as one light source thus giving a more realistic feel to the object.
Dynamic lights also affect the IBL shader.
Non-IBL shaders are only affected via the dynamic lights.

Using Environment Maps

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

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 here:

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

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


Keep in mind that the way the following textures are connected is only an example, you can use other methods as well.
I have connected the Env map to a shader of an object 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 Light Maps

Lightmaps are used to store pre-baked brightness of the texture to save some computer time, mostly used for static objects. Lightmaps can be baked in many 3rd party 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:

Using Dynamic lights

Dynamic lights are mostly used for objects/lights that are moving in the scene.
However, using Dynamic light will not be physically realistic, and using too many dynamic lights can cause performance issues.
In this example, I'm 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:

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.
Alternatively, 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 usage

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

Article content