PBR Materials
Learn the basics of Physically Based Rendering (PBR)
Physically Based Rendering materials consist of several layers of textures, each one a map for a different property of the material. It is a set of standards adopted across several industries. The workflow is used by Pixar for film and the Unity/Unreal engines for games. Open-source tools like Blender and Godot also use this workflow.
Maps
There are many possible maps, but the most common are:
These maps can be used in different Workflows.
One of the open-source tools in the Feywick toolbelt is Materialize, a great tool for quickly creating PBR materials. Using any 2D image, it will generate customizable maps for each key PBR property.
Below, a picture of a rock surface is placed into the "Diffuse Map." Only normal/roughness/AO were generated, since this is for realtime game use.
This material ported to Blender as-is:
Diffuse Maps
The base color or albedo. In Materialize, this is the image you start with. Different terms are used for different workflows, as explained below. In this image, "old" diffuse refers to textures used before this PBR pipeline became widely accepted. It's still a valid method today.
Normal Maps
An RGB version of bump mapping. Normal information is used in the renderer to determine light behavior, as it tells the light what the angle is for each surface. Instead of being built into the geometry, all modern rendering engines let you customize normals however you want.
Where bump/displacement maps use BW values to determine height, this map uses RGB to define the directions of normals. Each pixel in the texture contains a color (RGB), which corresponds to the direction of its normal (XYZ). This can give a flat quad the feeling of being 3D, as light will scatter at different angles depending on the normals. It doesn't really change geometry though, as you can see at the edges of the sphere below.
Height Maps
Also called "displacement maps," height Maps are a newer type of material layer, requiring a renderer that can compute displacement. This displaces the geometry in the mesh, but cannot create new geometry. It is also more expensive at runtime, and is normally used for environments in games since it can save on memory. These BW maps can be generated or created, but there are also online resources to find height maps that suit your needs.
Height Mapper can be used to grab height maps from anywhere around the world. Here's a map grabbed from Japan and rendered in Blender:
Metallic Maps
Metallic maps are used in the metallic workflow, explained further below. For the most part something is all metal or all non-metal, so this map should only be black or white. Metallic surfaces are much more specular than dialetric surfaces, and will reflect mainly the color of the material. For example, a white light on a copper surface is reflected as the copper's orange.
In the example below, the metallic map is used to simulate scratched paint.
Smoothness Maps
Smoothness Maps (also called glossiness) determine where light shines and where it scatters. White areas are glossy, black areas are rough. This will reflect the color of the environment/light without mixing the color of the material, unlike specular maps which are explained further below. To see a difference in most engines, you need to enable Screen Space Reflections so that the renderer can calculate light bounces.
Materialize uses "smoothness," but many programs will use "roughness" instead. Instead of white being smooth, black is smooth, and visa-versa. Since it's a BW map however, a simple color inversion can quickly convert between the two.
Edge Maps
Edge Maps or curvature maps depict the relative geometry of the mesh in concavity and convexity. This can be used as a mask to create wear effects around edges, or dirt buildup around cavities, for example. This is a very situational map that isn't needed in most cases.
AO Maps
Ambient Occlusion (AO) Maps define where light is absorbed. Since calculating AO at runtime can be computationally expensive, these maps can be baked to allow for more efficient rendering at the cost of memory. A game scene can have a mix of baked and dynamic ambient occlusion, depending on the optimization required.
There are many other maps, but we'll save them for another day. These basics should be enough to get satisfying and efficient PBR results. There are a few basic properties of materials that are useful to know, so let's go over a few now.
The Fresnel effect occurs at the edge of objects, where the angle of incidence for incoming light is very high. Most objects shine at these angles somewhat, even if they are very rough. In addition, the F0 value defines how reflective an object is straight-on at a 0 degree viewing angle. It's higher with more specular/metallic surfaces.
The Index of Refraction (IOR) determines how much light bends when entering a surface. This value is only used for transparent (or "transmissive") materials, and is different for every substance depending on molecular density. Physically Based is a public library of IOR values for common materials.
See if you can notice the differences with the IOR values in the picture below!
Workflows
In general, DCC (Digital Content Creation) software like Blender, Maya, Unity, etc. either use the Specular Workflow or the Metallic Workflow. The software may let you use both-- Blender uses the specular workflow for Cycles and the metallic workflow for Eevee, for example. You'll know which workflow to use based on whether it has options for specular or metallic maps. (If you can use both, don't.)
In general, the specular workflow gives you finer control but is more difficult and more expensive to render, and is typically used in offline (non-realtime) rendering. Pixar uses the specular workflow for their Renderman engine, but most game engines like Godot, Unity, and Unreal use the metallic workflow.
It's very likely that you'll be sticking with the metallic workflow as well, but it's worth going over the differences.
Specular Workflow
Uses Diffuse, Specular, and Smoothness maps to define materials.
Diffuse maps are only colored for non-metals. They should be black for metals, since they only represent diffuse light, and metallic color is handled in the specular map. If a metal has a colored diffuse map, it will behave in unexpected ways.
Specular maps define reflectivity and the color of reflected light. These are colored for metals. (It is possible to achieve unrealistic F0 values with this workflow, so doing research is required for physically accurate results.) When representing non-metals, values should be kept grey (non-colored), and the brightness can be used to control the F0. Values should sit between 0.02 and 0.05, or 2-5% F0 for non-metals, and 0.5 to 1.0 or 50-100% F0 for metals.
Smooothess maps are the opposite of roughness maps. Whiter areas are glossier, and blacker areas are rougher.
Metallic workflow
Used in Materialize, shown in the introduction.
Uses BaseColor/Albedo, Metallic, and Roughness maps to define materials.
BaseColor/Albedo is a material's unlit appearance, so shadows should be avoided where possible. This can be colored for metals too, making this workflow more forgiving.
Metallic maps define which parts of the material are metal. Black is non-metal, white is metal. Grey values shouldn't be used except for rust or some other transition.
Roughness maps are the opposite of glossiness maps. White areas are rough, and black areas are glossy. (A simple color inversion can swap between the two.)
Packing texture maps
To save on memory and optimize for games, several textures can be packed into one. In the metallic workflow, all maps except for color and normals are greyscale, meaning they only contain a value of 0-255 for each pixel. This means you can have a single RGB image with roughness, metallic, and alpha maps in each of the channels. Simply separate the RGB signal into its components and route the maps correctly.
Resources for PBR materials
Physically Based provides IOR, RGB and other useful PBR values for common materials.
Ambient CG provides a lot of CC0-licensed PBR materials.
CG Bookshelf is another library of free PBR materials, free under the CC 1.0 license.
freepbr.com is exactly what it says it is.
Height Mapper lets you grab a height map from anywhere in the world.