 Welcome to today's D5 render tutorial. In this lesson, you'll be learning about using PBR materials in D5, what they are, and how to use them. First, let's go over the basics of PBR materials. PBR stands for Physically-Based Rendering. It's a shading and rendering method that accurately describes how light interacts with surfaces, allowing you to simulate almost any real-world material in all lighting conditions. It has become a benchmark method for rendering and creating textures in the computer graphics industry. A set of PBR materials usually comes with many different maps. These include the base color, roughness, normal, ambient occlusion, etc. Metal materials also have metallic maps as well. These maps can be uploaded into D5 render to create realistic effects. Now let's explore two common workflows using PBRs, which are metal, roughness, and specular, glossiness. D5 render uses the former, which is also the mainstream workflow used by most real-time renderers. Here is an image showing the maps used in the two workflows respectively. Notice there isn't much difference. Both workflows have their pros and cons. The metal, roughness workflow uses base color, roughness, and metallic maps, while the specular, glossiness workflow uses diffuse, glossiness, and specular maps. The three maps on the right, ambient occlusion, normal, and height, are common maps. In other words, they are used in both workflows. And these are texture maps used in D5 render. Let's go further by examining this image. First, let's talk about the base color map. When we get a set of PBR materials, this map is usually named albedo or base color. Select a blank material, click on the base color slot, then find the albedo or base color map, and double click to load it. Basically, this map defines the overall color of the material. Next is the roughness map. As the name suggests, this map shows the roughness of the material surface, what we would call texture. The roughness map is a grayscale bitmap. The color value ranges from black to white, which corresponds from 0 to 100% of roughness. Pure white specifies that the material is completely rough, while pure black specifies that the material is completely smooth. Gray means it is somewhere in between. It should be quite easy for you to make a roughness map. First, you have to decide which part of the material is rough, matte, or smooth, so you can make a roughness map that meets your requirements with an image editor and load it into D5. Find the roughness parameter in the material inspector, click on the plus sign, and load the roughness map. You can control the level of roughness of the material by using the slider. Now we'll look at the metallic map. It's also a grayscale bitmap. The pure white part is metal and pure black is non-metal, and gray means the material is partially rusty, or could be a certain material such as a semiconductor. When making a metallic map, you should first consider which are the metal and which are the non-metal areas. For example, the yellow part of this map is metal and the dark part is rust. You can simply modify it with your image editor. The map is now loaded, and the metallic slider is to the far right, which makes the material take on a more metallic look. Here is the base color map and metallic map. The yellow, white part is metal, and the black, dark gray part is rust. You can see how it renders by adjusting the metallic slider. Pull it to the far left, and you'll see the material becomes a non-metallic ceramic material. If you push it to the far right, it becomes metal again. Just to be clear, when rendering, the metallic slider is an all-or-nothing adjustment tool. There are only two situations in most cases. One is to push it to the far right, which creates a metallic material, and the other is to pull it to the far left, which creates a non-metallic material. Then what about the middle part of the slider? The middle part creates a metal covered by rust, oil stains, or dust, as well as a rare semiconductor material. Next, let's briefly talk about the specular map. Please note the specular parameter in D5 is different from the one in the specular, glossiness workflow, in this image. The specular value in the metallic system is used to control the reflectance of non-metallic materials, and the specular slider covers the reflectance range of most non-metallic materials. You can observe this image as an example. It lists the reflectances of some common non-metallic materials. The vertical reflectances, also known as the F0 value, of most non-metallic materials range from 2 to 5%, going up to 8% for gemstones and jade. The specular slider goes from 0 to 1, corresponding to the range of F0 reflectivity of 0 to 8%, which means most specular maps of non-metallic materials are gray. Now let's talk about metallic materials. In fact, the specular map will not affect metal because the specular map of metal is not a grayscale image. As you can see, after I select a metal material and adjust the specular parameter, nothing changes. This image shows the relationship between the vertical reflectivity value of most non-metallic materials and the specular slider of D5 render. You can see that the position of 0% in this image is when the specular slider in D5 render is pulled all the way to the left. For most non-metallic materials, their specular values are generally in the middle, between 4 and 5%. When making gemstones or jades, you can push the specular slider to the far right at 8%. For example, this is a metal material. Sliding the specular slider doesn't change anything about the material. When we pull the metallic slider to the far left, it makes the material appear ceramic. Adjusting the specular slider again, we can see a significant change to the material, which means it's not metallic anymore. Next, let's talk about the common maps shared by both the two workflows, Ambient Occlusion, Normal and Height maps. First, the normal map has this blue-purple effect. It's used to simulate the lighting of bumps and dents on the model, adding more details to the surface without increasing the polygon count. Here is a set of PBR materials that each contain a normal map. Let's load them all into D5. With the normal slider to the far right, you can see that bumpy details on the surface are generated. Sliding it to the left, you'll see that the bumps look quite the opposite. When you set the slider to the middle, the normal map has no influence on the material. Height maps allow model details to be added by using a grayscale image. While normal maps change how lighting and shadows are calculated on the surface of the object without modifying the surface, Height maps change the structure of the model to give a more accurate representation of the bump details. They modify the underlying geometry instead of tricking the eye into believing the surface has more details. In D5, Height maps use parallax mapping to create realistic bump effects. Pushing the height slider to the maximum gives better results. Last but not least is ambient occlusion or AO maps. Ambient occlusion is used to calculate how exposed each point in a scene is to ambient light. It can solve the problems of light leakage or inaccurate shadows of an object. This map is often multiplied with the base color map to enhance the shadows in the corners and seams, enhancing the details of the object. The theory part is finished. Now let's experiment with the materials in this scene. Let's take this wooden table as an example. First, insert the base color map. Since it's more of a smooth texture, there's no need to add a normal map. I want to adjust the specular value to 0.3 and roughness to 0.3 as well. However, the surface seems too flat, so here is a roughness map with scratches. Insert it and adjust its UV. Now you can see the table definitely has more details. Next, let's work on the glass cups. Select the material for the cups, click the material template, and select transparent. Adjust the base color of the glass to white and make a few other adjustments. That's it. Now we have some realistic glass cups with beautiful reflections. For the metal material, select a custom template and push the metallic slider to the far right and then adjust the roughness. If it's bright metal, pull the roughness slider to the far left. If it's a matte metal, push it to the right a little. For a scratched effect, you can add a roughness map with scratches and adjust the UV of the map. The last thing here is cloth. Select this material and change the material template to cloth. Cloth materials tend to be really rough, so you should push the roughness slider to the right. Then you can adjust the fall-off slider to increase the whitening effect on the edge. That's all for today's lesson. You can do some research to drill down into how PBR materials work. Having a better grasp of them will help you a lot when adjusting materials. Apart from thousands of easy-to-use PBR materials, the D5 Asset Library has many other high-quality assets for you to choose from. We'll talk about it in the last lesson in this series. Stay tuned!