You have probably heard of PBR. But what is it and how do we use it in Blender?
PBR stands for Physically Based Rendering. It is a loosely defined framework for storing data that is needed to recreate real-world material in a digital 3D format. We use it to store different material properties in individual texture maps that together can be used to recreate realistic materials.
In the rest of this article, we'll go over more details about PBR as well as how to set up a PBR Material.
If you are new to texturing and shading in Blender, I suggest that you also read this article.
Related content: The complete beginners guide to Blender nodes, Eevee, Cycles and PBR
Let's dive in.
PBR stands for Physically Based Rendering. Physically Based Render Materials in general can be thought of as a method of more accurately recreating the visuals of a real-world material.
Rather than simply taking a picture of the material and applying it as a texture, we use a PBR workflow. In a PBR workflow we have predefined texture maps that each contain a piece of information about how the material should react to light.
There are two kinds of PBR workflows. They are called metallic and glossiness. Not to be confused with any of the individual parts of a PBR workflow. These are just names. For the most part, we use the metallic workflow, and this is the workflow that Blender supports through use of the Principled BSDF shader.
The metallic workflow is so much more popular and widely used than the glossiness workflow so if glossiness isn't specifically mentioned, you can assume that the metallic workflow is what is meant. When it comes to Blender, even more so since the glossiness workflow isn't even supported right now.
We cover the principled BSDF shader in detail in this article.
Related content: Physically based rendering and Blender materials
These are the most common PBR texture maps in a material, but other kinds of maps can also occur.
Normally, these maps are image textures stored in jpeg or the png file formats. Sometimes other formats are also used such as tiff and exr. Usually, tiff and exr formats are used for normal maps and displacement maps because these formats support higher bit count. A too low bit count in a normal map or displacement map can result in banding artefacts. You can read more about this here:
Related content: How to use displacement in Blender
The render engine uses all this information to determine what color each pixel in the final render should have that is occupied by this material.
The PBR format is also standardized. This means that it works with any renderer that supports it and today most render engines do. But results still vary between render engines because they all implement it slightly differently.
To understand what problem a PBR workflow solves, we need to look at the render engine, the material and the lighting as three separate components that need to work together to get us accurate and predictable results.
Here is a simplified example.
The render engine represents the physical laws that dictate how light behaves. In the real world these laws are static. We cannot change how physical laws work. Sure, our render engines have settings we can tweak. But at its core a render engine tries to mimic the static physical laws of light.
Same goes for the materials around us. As far as we, and lighting is concerned, materials are static. We cannot make an object switch between reflecting like metal or like a concrete material for instance. Materials only look different depending on the light we shine on them.
That leaves us with lighting. This is the only component we can change in the real world to make an object look different. At least in this simplified model. Sure, we could repaint something, but that wouldn't change a material, it would only put another material on top and have the light interact with that instead.
So, the question is, how do we recreate a real-world material in digital format that can be somewhat static once it is setup and still behave like the real-world counterpart in all lighting conditions?
This is the problem that a PBR material workflow attempts to solve.
So, with our render engine's built in physical accuracy together with a PBR workflow for our materials we can be sure that whatever lighting condition we throw at our setup, it will behave in a predictable way.
Another way to put it is this.
A ray traced render engine, such as Cycles in Blender is physically accurately interpreting your inputs. But if you give the renderer an input that is outside the scope of what is possible in the real world you will get results that aren't physically accurate anyway.
A PBR workflow's job is therefore to help us give the render engine input that actually exists so that we can get consistent outputs.
When we say PBR texture, we may refer to the material as a whole. But if we get down to specifics, a PBR texture is any single image texture that is included in a texture pack that makes up a PBR material.
The diffuse image texture is a PBR texture. So is the roughness texture and the normal map texture as well. Together these are three different PBR textures if we are referring to specific image texture files.
But we can also say that they are PBR texture types if we are referring to them in general without a specific material in mind.
If you are looking for PBR materials, you can find several libraries to browse in this article.
Related content: Top 10 material libraries for Blender artists
As mentioned before a PBR texture is often stored as a png or jpeg file. They also come in various sizes. You will often hear terms like 1k, 2k, 4k and even 8k textures. These refer to the size of the textures in pixels.
The size is often different from conventional sizes. For instance, a 4k TV has a resolution of 3840 by 2160. But a 4k texture is either 4000 by 4000 pixels or 4096 by 4096 pixels when we are talking about PBR textures. Likewise, a 2k texture is 2000 by 2000 or 2048 by 2048 pixels. The same goes for all the other sizes.
The textures are in almost all cases square simply because it is easier to work with. But there are no hard rules saying that a PBR texture must be square. In fact, it doesn't even need to have an image texture.
In Blender, we could create a node setup that uses procedural textures and math to create the final output for anyone of our PBR texture maps. Or even a combination of procedural textures and image textures.
The important thing to remember is that we need to have some kind of output that matches each of the inputs in our PBR shader.
Usually this is a set of texture maps designed for a specific material, but it doesn't have to be. There is no limit to how we can mix and match other than the hardware we use.
Related content: Memory optimization for rendering in Blender
In its most basic form, a PBR material in Blender is a Principled shader connected to a material output node in the shader editor. We can use sliders of color, metalic and roughness to create most basic materials. But to start to create some variety we need to introduce textures for some of these inputs.
Here are the most common inputs in the principled shader that we use textures as input for.
Note that there are more Inputs available on the Principled BDSF node, but in general the ones listed above should be a good starting point for creating most materials, and in general will be the ones most commonly found in a PBR material pack.
Also, you don't need all of these maps to create a PBR material, in most cases you could likely achieve decent results with just a Diffuse Map and Normal Map, even just a Diffuse Map would work, but having a map for each of material properties that apply to the material we're creating allows us to have more fine control over it and in general will give us better results.
Here are additional resources that discuss the different PBR textures in more detail.
Related content: The complete beginners guide to Blender nodes, Eevee, Cycles and PBR
Related content: Ambient occlusion in Blender: Everything you need to know
Related content: Physically based rendering and Blender materials
Related content: Physically based rendering, blender nodes, with brick texture example
To setup a PBR material:
So now that we have a good concept of what PBR materials are as well as the textures that are commonly used by them, we can move onto setting up a PBR material.
We will first need to create a material if we have not already. Select your object, go to the material tab indicated by a red sphere in the properties panel and click on "New" or select any material already in the list.
Once this is done, we can go to the shading workspace and bring in all the images we've imported for our PBR material. You can drag and drop them into the shader editor.
If you need to find a material to test with you can find plenty of libraries in this article.
Related content: Top 10 material libraries for Blender artists
For this example we will use the Diffuse/Albedo Map, the Roughness Map, and the Normal Map.
Connect the Diffuse/Albedo Map Color Output to the Principled BSDF Base Color Input
Set the roughness Color Space to Linear and connect the Color output to the Principled BSDF Roughness input.
For the Normal we will need to first add a Normal Map Node, this can be done by pressing Shift + A press search and type "Normal Map". The search will filter as you type. Select Normal Map and drop it into the node graph to the right of the Normal texture.
After we've done this set the Normal Color Space to Non-Color and connect the Color output to the Normal Map Color input and then connect the Normal Map Normal Output to the Principled BSDF normal input. This is how it should look.
Also, our normal map will need to be set up like this, otherwise it will not render correctly, if our PBR material comes with both a DirectX and OpenGL normal, we should use the OpenGL format as this is the format that Blender uses.
The difference between a DirectX normal map and OpenGL is that the green channel is flipped. So if you have a DirectX normal map you can add a separateRGB node that you plug the Normal texture into, then connect each of the channels to a combineRGB node that you then connect to the normal map node.
Between the separate and combine nodes drop an invert node on the G connection. The final setup looks like this.
With all that setup we should have our PBR material render to preview, if you haven't already go ahead and assign it to an object, then just go into the rendered preview mode and you should be able to see your PBR material. This is my final output using a cobble stone texture.
In general PBR materials can be very useful once we understand how they work, with the right setup we can achieve some very realistic textures and the options available to us allow us to create a wide variety of materials.
In general the PBR workflow and the Principled BSDF shader provided with Blender are both very versatile tools to have as a 3D artist.
Thanks for your time.