PBR Workflow in HD Render Pipeline Unity

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Hello and welcome to Unity Guruz my name is Mahen and in this video we will learn about PBR. PBR is the most popular term nowadays you can see PBR workflow in almost every rendering pipeline you probably have many questions regarding the PBR in your mind such as what is PBR ? why should we use it ? Is it necessary to use PBR workflow ? How it will affect my 3d renderings and finally how do I use it without paying a few hundred bucks for additional software ? But don't worry I will give answer to all of your questions in this video so without wasting a time let's get started if you look into the Book of the Dead demo project you will find that every material in this project looks so very photorealistic there are two main reason for that first they have used photogrammetry techniques to generate the different types of texture which is a very complex process. In this process basically we take multiple overlapping picture of a real-world object and later we scan and refine them in particular image processing software and generate both 3d mesh and textures of the object I will cover this topic in some other videos but for now we need to focus on the second point which is that how did they use all the textures in unity to get PBR or photorealistic material. So before dive into unities PBR workflow let's quickly understand what PBR is ? PBR means physically based rendering in simple words it's a photorealistic rendering if you already know about the PBR you can definitely skip to the Unity PBR workflow part I don't want to go in details or use any technical terms to confuse you that's why I will explain in a practical way. In our real word there are multiple types of objects some of them are shiny like gold and chrome and some are not shiny like rubber and wood some of them are smooth like plastic and some are rough like concrete so to simulate these real word properties in our cg material we use a special kind of workflow known as PBR or physically based rendering. So what do we do in this workflow first we need a material which has all these properties and thankfully unity has fulfilled this requirement by providing us PBR shader for both HDRP and legacy render pipeline. In the legacy pipeline there is a standard shader and in the high-definition pipeline there is a LIT shader which we can use to make PBR materials. For the demo let's take a look at the HDRP's lit shader. In this empty unity project I have already implemented High Definition render pipeline by going package manager and installing from here. Please watch my last video to know more about this High Definition render pipeline. Next I quickly make a lit material by right-click create material and assigned to this cube object you can change these parameters to make it reflective or non reflective or choose any color you want. But as you know no object in this world have a flat color. They have a collection of color for example look at this picture. What color of it ? Yellow? Yes it has yellow but it also has some other colors like brown light yellow dark green and orange. In this case the textures come into the play. If you look carefully a texture is basically a collection of values and we need this collection of values for every property of our material. Which means we must need to use texture not only for diffuse but also for metallic, smoothness, normal and other properties. sounds complicated ? Don't worry I will explain this in a minute. Now our next question is how many types of textures we need for a PBR material. Well for a basic PBR material you at least need the following texture map. First is diffuse map with alpha if you want to show transparency in your object. Second is metallic map. Third is smoothness. Fourth ambient occlusion. Fifth is normal map. There are some other maps for more complex details such as height map bent normal map detailed map emission map and other special feature map. Alright enough talking let's make a PBR material in unity. So I have these different types of texture map for a strong wall surface to make a PBR stone material. Let's take a look at these textures. This is diffused map which is basic color information of the surface without lighting or any shininess. Second one is the normal map which is again a collection of values to bent the light direction across the surface in simple words it is used to achieve a fake bumpiness into the surface. Third is height map which is used to enhance the bumpiness of surface and the last is Mask map which is a mixed map of multiple textures. I will explain this map in a minute. Now you must be thinking how did I made all these textures ? Well it's a big topic so I will cover this whole texture generating process in the next video. Now with all the textures ready let's combine them to make a PBR material. Let's copy this texture in our asset folder and go back to unity. Next assign the appropriate texture in the texture slot. First in the base select the diffuse next in the mask map slot let me extend the inspector so that you can see that there is some information about this texture map what does this mean ? Let me explain it. This mask map texture requires four different types of texture in its four channel red green blue and alpha. Red channel is for metallic map as the name suggests is used to make object or particular parts of object looks like metallic or nonmetallic. Green channel is for our favorite Ambient Occlusion map which provide depth in our textures. Blue channel is detailed map mask which is used for more complex detail for now we don't use it so just keep it black. Alpha channel is for smoothness map again as the name suggests is used to show if a surface or particular part of surface is rough like rock or a smooth like plastic. If you look into this mask map which I showed you earlier you will find that it has all the required texture map in different RGB and alpha Channel. You can use Photoshop, GIMP or any other image editing software to pack this texture map into one single image or you can use this unity texture Packer tool if you don't want to use any third-party software. Again I will explain this process in more detail in next video. After adding the mask map you will notice that this smoothness parameter now has this range slider and it also has this additional ambient occlusion value slider. Now instead of a single value you can set a range of value for both smoothness and ambient occlusion Complex ! Yes it is. But it will also improve the performance of the material because it's now uses single texture map instead of for different types of texture but I hope that unity will make it more simple in feature updates. Next assign the normal map in the normal slot make sure that the normal map is set as normal texture in the import setting panel. You can also adjust the intensity of normal from this slider. next to add height map first change the displacement mode to pixel displacement and now you can see an additional empty slot where you can hook your height map. feel free to adjust these values to get desired effect and there we go!! your first PBR material is ready to use in your project. The good thing about this material is that these looks same in every light condition. Let's also make this PBR material in unities legacy pipeline. In this another unity project let's make a standard material by right-click create new material and assign all the texture in proper texture slot. You will notice that in this pipeline all the texture maps are used separately except this metal plus smoothness map. As you can see that this metallic map requires a smoothness map in the Alpha Channel that's why I have copied this smoothness map in the Alpha channel of this metallic map. Let's also assign other texture map normal map height map and occupation map and adjust the parameter and there you go. Our Stone wall PBR material in Unity's legacy pipeline. I know it's not looking as good as in HD RP obviously the HDRP is more powerful than legacy pipeline. So that's it for this video in the next video I will show you how to make this additional texture map from any photograph and make PPR material from them. Please support me by hitting subscribe and like button so that I can keep making these videos for you. Till then thank you so much for watching I hope you guys enjoyed it bye bye
Info
Channel: UGuruz
Views: 35,750
Rating: undefined out of 5
Keywords: pbr in unity, unity pbr tutorial, pbr workflow, unity pbr materials, pbr unity shader, unity lit shader, hdrp lit shader, unity pbr rendering, pbr explained, pbr materials in unity, pbr texturing, pbr textures unity, unity high quality graphics, high definition render pipeline unity tutorial, unity 2018.3, pbr, unity 2019, high definition render pipeline, hdrp unity 2018, realistic texturing in unity, photorealistic materials in unity, unityguruz, lit shader, uguruz
Id: zd7E2i8zgCE
Channel Id: undefined
Length: 7min 55sec (475 seconds)
Published: Tue Jan 08 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.