Everything About PBR Textures And A Little More – PART 1

Article by Luis Mesquita

I originally wrote this article for the brazilian website Computação Gráfica and now translated to english so more people can get something from it. In this article we will see how the main texture maps are used to compose a material in a PBR workflow. It’s an extensive article so I will include a summary on each topic. What will be shown here are guidelines and not restrictions. The final choice is always yours!

Just to remember: In computer graphics, texture maps are images mapped on the surface of a 3D object to control various properties of materials, such as color and brightness.

NOTE: These maps can also store other types of information, and can even be used to control the flow of particles for example.

Example of some texture maps that make up a stone wall material

BUT WHAT IS PBR?

Example of a granite cliff PBR material with moss by Daniel Thiger

PBR stands for Physically Based Rendering. The idea is to use several texture maps to control different material properties, determining how that material reacts to light. The shader itself solves some calculations automatically (like the fresnel and other laws of physics), helping to maintain a result close to realism. This method of creating materials has been widely used in real-time renderings, mainly with the popularization of scanned textures from the real world, providing a high level of realism and consistency under any type of lighting.

The structure of a common material is basically as follows:

  • Color: the diffuse color reflected by the material when illuminated, that is, the color that we see (an apple for example is red because it reflects the red color and absorbs the others);
  • Reflectivity: the amount of light that is reflected by the material. This amount varies depending on the angle we look at (Fresnel effect, explained below);
  • Microsurface: tiny irregularities on the material surface that alter the definition of reflections;
  • Relief: extra details in the material such as cracks or pores.

FRESNEL EFFECT: this effect establishes that the amount of reflected light rays that we perceive depends on the angle at which we observe the material. A material reflects less light when we look directly at it (at an angle of 0 °, called “fresnel zero”, or F0), and reflects more light at grazing angles. For example, when we enter a lake and look down, we can see the bottom clearly (because looking directly the water reflects very little light). If we look at the horizon we realize that the water reflects much more light, almost like a mirror. The minimum reflectivity value of a material, the F0, is the value that we will use on some of our maps. The PBR shader automatically transitions between F0 and maximum reflectivity according to the angle.

Examples of the Fresnel effect

It is also good to understand the difference between dielectric and conductive materials:

Dielectric materials: they are basically non-metals, like plastic, wood or stone. The specular reflection in this type of material is always white (if the color of the incident light is also white). The F0 varies between 2% and 5% for most non-metals (that is, they are generally very poorly reflective when viewed directly), increasing up to 100% when viewed at grazing angles.

Conductive materials: these are metals, characterized by their high reflectivity and conduction of heat and electricity, such as gold, aluminum and copper. Metals do not have an observable diffuse color, and what we perceive in specular reflections is the color of the material itself (if the color of the incident light is white). Gold for example will have yellowish reflections. Worn or rusted metals, however, tend to reflect light as dielectric materials, not as metals. The F0 varies between 50% and 100% for most metals (that is, they are generally very reflective when viewed directly), increasing up to 100% when viewed at grazing angles.

Example of dielectric and conductive material. Notice the differences in color and intensity of reflections.

Summing up:

PBR materials are based on physics and therefore close to realism, achieved through the combination of various texture maps and internal shader calculations.

Fresnel effect: materials are less reflective when viewed directly and more reflective at grazing angles. The F0 value is used to determine the minimum reflectivity of the materials.

Non-metals: diffuse color. They have white specular color. F0 = 2% -5%.

Metals: have no diffuse color. They have colored specular color. F0 = 50% -100%.

MAIN WORKFLOWS

The word “workflow” is often used to refer to the method of creating the materials, for example defining which types of texture maps will be used at the expense of others or how these maps are combined. The choice of the workflow to be used is entirely up to you, based on what software will be used, the style of art, the needs of the project, etc. It is possible to obtain good results regardless of the workflow. The most important thing is that the chosen workflow is maintained from start to finish to avoid confusion and inconsistencies in the style of the project.

Let’s take a look at some of the most common workflows:

SPECULAR WORKFLOW: For a long time, the specular workflow was quite common in several offline renderers (Vray, Corona, Cycles, etc.) and today most renderers still work primarily on this model. In this workflow, the main maps used to control the color and reflection of the material are DIFFUSE, SPECULAR and GLOSSINESS MAPS. We’ll see more details about these maps soon. In this workflow you have total control over the F0, but it’s not very intuitive (since it’s possible to break the law of energy conservation if you use wrong values, mainly in the Specular Map) and a little less optimized.

Example of a scene made in the specular workflow by Wiktor Öhman

METALLIC WORKFLOW: More optimized and intuitive (since the shader itself keeps track of the light reflectance values within realistic standards). Several game engines have adopted this workflow and gradually also offline renderers. In this workflow, the main maps used are BASECOLOR, METALLIC and ROUGHNESS MAPS. It’s friendlier starting point for beginners.

Example of a model made in metallic workflow by Jonathan Benainous

Several other maps can be used in the two workflows, such as Ambient Occlusion, Normal Map, Bump Map, etc.

STYLIZED WORKFLOWS: Several games with a more stylized artstyle often don’t use any of these workflows because they don’t need reflections in the materials or because they already have the light information painted directly on the color texture (as in hand-painted textures). An example is the one adopted in the game Dota 2. This is not a PBR workflow, as there is no commitment to physical accuracy.

Example of a scene made with a workflow stylized by Anngelica Parent

Summing up:
Specular workflow: Uses the DIFFUSE, SPECULAR and GLOSSINESS maps. Customizable, little intuitive, can break laws of physics, less optimized.
Metallic workflow: Use the BASECOLOR, METALLIC and ROUGHNESS maps. Not very flexible, very intuitive, physically stable, more optimized.
Both can use other maps, such as Ambient Occlusion, Normal Map, Bump Map, etc.
Stylized workflows have varied approaches and are not PBR.

Article by Luis Mesquita

Leave a Reply

Your email address will not be published. Required fields are marked *