Photorealistic Materials in Unity!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

Fantastic video as usual, /u/Brackeys

👍︎︎ 6 👤︎︎ u/FoleyX90 📅︎︎ Mar 12 2018 🗫︎ replies
Captions
for the last couple of years pretty much everyone have been talking about PBR and for good reason PBR plays a huge part in modern graphics so in this video we'll take a look at what PBR is and how you can use it to make beautiful materials but first up this video is sponsored by Skillshare Skillshare is an online learning community and they have more than 19,000 quality classes on design photography Tech and more if for example you want to learn how to use unreal I recommend the crash course in 3d game design this awesome course is made by Elfa Chen and it will teach you how to quickly create a 3d game level using the Unreal Engine a premium skill share membership gives you unlimited access to all classes for less than $10 a month so to get started simply click the link in the description and the first 500 people will receive their first two months for only 99 cents also special thanks to encode we trust patrick mckinley diego frank tristan town dan gyein passio infinity PPR and yo Ryoma for their support on patron so what is PPR well everywhere we look light is bouncing around interacting with objects where light hits a surface complex processes determine what happens and while trying to simulate all those interactions on a physical level would be impossibly taxing on the computer having a grasp on the principles makes shading and renewing objects a lot easier and more beautiful in fact graphics rendering in games used to involve a lot of weird and almost random algorithms to try and cheat your way to a good looking result but with the introduction of physically based rendering or PBR we're now able to base these calculations on actual physical principles PBR is essentially using what we know about the physical behavior of light to render natural looking materials in unity we can use the standard shader to do exactly this the standard shader allows you to take advantage of our knowledge of how light interacts with materials in the real world to get really realistic results and because it's based on real-world physics calculations the standard shader will also keep the look of materials consistent under different lighting conditions so let's take a look at how light behaves in the real world when light hits an object some portion of the light will be reflected off the surface in computer graphics we often talk about specularity or specular reflection which is the amount of reflectivity a surface has when light gets reflected it leaves the surface in the opposing angle of the surface normal but with the exception of a perfect mirror all the light is not reflected directly off of the surface a portion of it will enter the material where it can either be absorbed or diffused diffuse reflection refers to light being tossed around inside an object until eventually leaving the surface in different directions this is what makes the material itself visible to our eyes now staying on the subject of diffuse reflection versus specular reflection we can see that the more specular a material is the less diffuse it should be if you think about this logically it makes sense when looking at a mirror it takes on the colors of the environment but the color of the mirror itself isn't really visible if we look at a brick we don't see much of the environment instead we see the brown orange color of the material itself this is due to one of the most important principles in PBR the concept of energy conservation this means that an object cannot reflect more light than it receives another example of this is when talking about the smoothness of a surface while the smoother surface creates a stronger highlight the area of the highlight also gets decreased now one of the things that are really interesting to look at are metals this is because the physical properties of metals are very different from just about any other material firstly they tend to be much more reflective than nonmetals this is something that can easily be recognized metals are shiny in fact they will usually reflect as much as 60 to 90% of incoming light well as nonmetals generally reflect zero to twenty percent another property of metals is that their reflections can appear tinted a good example of this is copper or gold and speaking of gold another golden term to know is Fornell fernell refers to the fact that the amount of light that gets reflected varies at different angles in the real world at the very edge of an object the amount of light reflected will be 100% the amount reflected at the center of the object is what we refer to as the base reflectivity with a PPR workflow Fornelli supplied automatically when rendering based on the reflectivity you input on the material the Finelli effect becomes less as the surface becomes less smooth but it applies to every single thing around us which in turn speaks to the fact that even the roughest materials have a reflection now another thing that applies to all objects is that all objects actually have small imperfections cracks and bumps in their surface they might be too small to see but they're definitely there this is referred to as the micro surface and it can play a big role in how light is reflected and later perceived the more uneven and rough the micro surface gets the more diverged and blurry the reflected light looks the roughness of our material is often referred to as glass or in the case of unity as smoothness so that's a quick overview of how these things work in the real world but how about in unity well as mentioned earlier unity has a built in standard shader that automatically sets up a lot of this for you the standard shader gathers all the calculations needed to create realistic looking materials using PBR a good thing about the standard shader is that even though it has a bunch of features it discards all unused properties when it's built which really helps optimize it the standard shader is also very versatile because you can choose between multiple workflows each workflow represents a different way of thinking about PBR but all of them can achieve the same realistic results the standard shaders default workflow is metallic this has nothing to do with the material necessarily having to look like metal instead it means that this approach to physically based rendering is based on defining how metallic or nonmetallic the surface of the material should be the specular workflow is also really common this lets you have direct control over the brightness and tint of specular highlights in a metallic workflow this gets calculated automatically so for the sake of simplicity let's focus on the metallic workflow and go through the shader properties to see how they affect the material some of the properties we can adjust our color metallic Ness and smoothness but for most assets we don't want these values to be uniform across the entire model instead we use something called texture Maps to change them for different points on the surface so what is a texture map a texture map is basically an image for each pixel on the image we can specify a color each color consists of a red green and value these are cold channels however each pixel actually has a fourth channel the Alpha Channel normally this is used to define transparency but as you'll see further down the line we can use it for all kinds of things all right but that in place the first thing that we have to select is a rendering mode this allows you to choose whether the object uses transparency and if so which type of blending mode to use the default setting is opaque which means no transparency to make your object transparent select either cut out transparent or fade which one to choose depends on the look you're going for the difference between them are on the screen now you can choose the level of transparency on different parts of the object using the Alpha channel of the albedo map and speaking of albedo this is the first property that we can adjust on the shader this defines the color of diffused light meaning the raw color of the material itself this property works as a base for your material as with all the properties you can either choose to use a single color or you can specify a texture map in that case changing the color will simply tint the texture the metallic property defines the metallic nests of the material as we talked about earlier when the level of metallic nests increases the albedo will become more and more obscured by the reflections of the environment the smoothness property lets you adjust how smooth or rough the micro surface should be as mentioned earlier if the micro surface is rough it will scatter light more evenly smooth surfaces tend to look glossy while rough surfaces look matte if you assign a texture to the metallic parameter both the metallic and smoothness sliders disappear this is because a metallic texture map controls both it controls metallic nester the red Channel and smoothness through the Alpha Channel next we can use a normal map to add surface detail to our model without adding extra geometry this is great for stuff like bumps crevices and scratches because the changes how light reflects off the surface to simulate exactly this kind of detail hide maps are a similar concept to normal Maps but the rendering technique is more complex and therefore more performance intensive hard maps are generally used together with a normal map for showing larger changes in surface level the occlusion map is a way to add ambient occlusion using a black and white texture this is a cheap way of creating detailed shadowing in the play of your model where light might have a hard time escaping finally you can make your object emit light by using the emission property here you can also specify an emission map if you only want to apply a mission to part of your object to learn more about how to use emissive materials in your game check out our video on simple lighting in unity and that pretty much concludes this video from here it's up to you to get creative and start using these tools in your creative workflow I suggest having a look at this handy chart before you get started now I'm sure that we'll see a lot of improvements to the standard shader with the introduction of the new scriptable rendering pipeline so definitely stay tuned for that on that thanks for watching and I will see you in the next video thanks of the awesome patreon supporters who donated in February and a special thanks to encode we trust Patrick McKinley Diego Frank Tristan town tank guy and Buffy o infinity PPR yaaaaay Omer and soft tune sighs mommy Durkheim's Kirk face on Murphy beard or die DoubleTap 45 James P J delay Superman the great John ProGuard Dennis Sullivan Jason Lotito Alex wicket ski beyond photo ops wetlands villain of Jin Sasha hafsteinn Sunni Arabs and Gregory Pierce James Rogers Robert bond derman Rob fan and Erasmus you guys Rock
Info
Channel: Brackeys
Views: 710,615
Rating: undefined out of 5
Keywords: brackeys, unity, unity3d, asset, assets, model, texture, models, textures, material, materials, how, to, howto, learn, course, series, tutorial, tutorials, fix, tip, game, development, develop, games, prb, physically, based, rendering, standard, shader, realistic, photorealistic, photo, real, light, lighting, albedo, metallic, specular, diffuse, normal, height, map, channels
Id: _LaVvGlkBDs
Channel Id: undefined
Length: 10min 3sec (603 seconds)
Published: Sun Mar 11 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.