Blender 2.93 The Principled Shader and Light Behavior

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello i'm blandini and this is the second tutorial in a series about materials this tutorial provides an in-depth look at blender's principle shader in terms of the behavior of light understanding how light interacts with different materials helped me get the most out of the principled shader and hopefully you'll find it helpful too so let's get started when light hits the surface of a material it will behave in one of three primary ways absorption occurs when a material converts light energy into a different form often heat reflection occurs when light bounces off the material a transmission occurs when light passes through the material refraction a type of transmission occurs when light passes through the material and bends absorption reflection transmission and refraction are the primary behaviors of light when it interacts with matter so it makes sense that these are represented in the principled shader all materials absorb reflect and transmit light the material's molecular structure determines the amount of absorption reflection and transmission that occurs the principle shader determines how light scatters when it interacts with your material which means we can discuss its functionality in terms of light behaviors beginning with absorption absorption is the process of light energy being converted to a different form of energy absorbed light is never seen again and it is this behavior that is responsible for the colors we see visible white light is comprised of colors red orange yellow green blue indigo and violet with each color of light having its own frequency when a material matches the frequency of a color it absorbs it colors that are not absorbed are reflected back resulting in the color that we see if an object reflects all of the visible spectrum it appears white if an object absorbs the entire spectrum it appears black we can set the color several ways using a six digit hex code value using hsv values which operate on a scale of zero to one where hue is the color along the visible spectrum saturation is intensity of the color and value is the brightness of the color we can also use rgb values which allow us to specify the degree of red green and blue also using a scale of zero to one we can also use a color picker eyedropper to select color from anywhere in blender even an open image understanding absorption has little impact on color picking but it really comes into play with subsurface scattering nearly all non-metals exhibit some degree of subsurface scattering we commonly associate it with organic materials like creature skin plants and fruits milk wax honey and jellies but subsurface scattering is also present in inorganic non-metals like marble jade paper and many plastics essentially subsurface scattering is the process that makes an object appear translucent where light passes some distance into the object but we can't see through it it's a subtle effect but it can have a dramatic impact on the realism of your renders subsurface scattering in blender's principled shader depends on the subsurface slider subsurface color and the subsurface radius the subsurface scattering slider mixes between surface light scattering when light interacts with the object's surface and base color and subsurface light scattering when light passes through the surface of an object and interacts with the subsurface color imagine that beneath the surface of a material is a subsurface made of particles light passes through the surface into the subsurface some light rays will interact with the subsurface particles and through absorption they adopt the color of the subsurface material these rays may continue to bounce around within the subsurface before either diminishing entirely or exiting the material and returning to the viewer's eyes when we adjust the subsurface slider we are mixing these surface and subsurface properties together a value of zero represents all light reflecting off the object's surface and a value of one represents all light passing through the surface and interacting with the subsurface adopting its color and returning it to our eyes for most real world cases subsurface scattering will be between .01 and 0.1 representing a small amount of light passing through the surface but if we set it to 0.5 we'll see the effect more clearly at this setting we can clearly see some of the traits of subsurface scattering the edges of our model appear brighter and the overall surface of the mesh looks softer but having radically different colors for these values is pretty uncommon in real world materials when we cut into a piece of marble beneath the surface we just see more marble the surface and subsurface are the same color this is usually the case in real world objects so a good place to start when working with subsurface scattering is to set your base color and your subsurface color to the same or similar value this cube has subsurface and surface colors set to white to minimize light sources i set the world lighting to zero with no subsurface we see the regular cube the faces facing the light are illuminated and the faces not facing the light are in shadow as we increase subsurface scattering we allow more light to pass into the subsurface where it illuminates areas that would otherwise be in shadow the overall surface appears softer the edges are brighter and a reddish orange color now stretches into the area in shadow this coloring is a result of the subsurface radius light that passes through the surface travels a certain distance before it is absorbed before it is absorbed the light retains its color remember that white light is comprised of all colors and these colors can be derived from red green and blue the subsurface radius specifies how far each color of light red green or blue travels beneath the surface before it is absorbed by subsurface particles the colors of the visible light spectrum are distinguished among other qualities by wavelength blue and violet have the lowest wavelengths while red and orange have the highest wavelengths colors with shorter wavelengths are scattered more and absorbed sooner than colors with higher wavelengths this means blue and violet are more likely to be visible closer to the surface on thin areas where it has scattered more but has yet to be absorbed red light travels deeper into the subsurface retaining its color longer before it is absorbed let's take a look at this in blender if we increase each subsurface radius value to 1 we see the full distance white light travels beneath the surface with these settings for this demo a 1000 watt light is close to the object and subsurface is set to 0.5 if we zero out blue and green and set red to one red light travels the full distance if we set red to 0.5 the distance is cut in half here red and green are zero and blue is set to 0.1 roughly 10 percent of the light beams distance adding in green gives us the combination of blue and green or cyan for the 10 percent and then only green for 10 to 20 percent with the default settings red blue and green travel 10 of the light beams distance into the subsurface making white light when blue falls out of the equation the remaining red and green light make yellow and when green falls out red travels the remaining distance this is why we see the coloring we see when we enable subsurface scattering even though subsurface radius is a vector input we can still use an rgb color input node to control this i'll set the rgb node's color values to the radius default values and connect it to the subsurface radius socket the light scattering is more noticeable with a more complex model so i'll add a monkey head to the stage with the same material the colors with the smallest radius value blue is most noticeable on thin areas facing the light since blue light scatters closest to the surface we can see this effect around the thin parts of the monkey's eye sockets the colors with the highest value red are most noticeable in thin areas facing away from the light these light rays pass through the thin parts of the mesh entirely without being absorbed this is why thin areas of our own skin appear to glow reddish orange when illuminated from behind just like this monkey's ears these default radius values accurately capture the ratio of light dispersion by color through a material subsurface but different materials have different variations on this take a look at this chart i'm not sure of its origin but its content comes from a pixar paper i've put links to both in the description notice that the radius values are all different but they observe the same trend red scatters the furthest into the material before interacting with subsurface particles blue scatters the shortest distance and green usually falls between red and blue we can import this chart into blender's image editor and use the color picker to set these values since subsurface and surface are often the same we can connect an rgb input to both since the radius is a vector input with colors for each channel we can use the rgb input for the radius and set the subsurface mixer to the value shown on the chart [Music] this chart is a great resource for developing subsurface materials and these pointers will hopefully provide a good starting place for any subsurface material nearly all non-metals exhibit some degree of subsurface scattering surface and subsurface colors are almost always the same in real wood cases subsurface ranges between .01 and 0.1 and also in real world cases subsurface radius colors conform to the absorption qualities of visible light this means red the color less likely to be absorbed will be the highest value followed by green and then blue alright that was probably more than you ever wanted to know about subsurface scattering but there's one more thing to discuss distribution options depending on your model the appearance of subsurface scattering might be greatly affected by the calculations that determine how light scatters these options affect the number of light bounces modeled when light scatters above or in this case beneath the surface as of blender 2.9 3.4 we have two subsurface distribution options the default distribution option is christensen burley its scattering is less accurate than a random walk but the results are sufficient for most cases and the render time is less in some cases the image may appear darker than expected and somewhat muted or dull with fewer details at fine levels the second option is random walk which is a more accurate cycles only option that produces better results at the cost of increased render time and increased noise in the image the improved modeling of subsurface light balances results in more light bouncing around below the surface more light will retain more details we also get more accurate modeling of light bounces on thinner surfaces where the blue and green light rays are more dominant these vendors demonstrate the time quality trade-off of subsurface scattering and its distributions all other settings were kept constant the next group of sliders affect reflection there are three primary types of reflection that occur when light hits a surface diffuse where light scatters fairly evenly and no reflections are carried on the surface metallic where light reflects uniformly and maintains reflected images on the surface specular a mix of diffused and uniform reflections capable of reflecting images on its surface all reflections follow the law of reflection which states that an incidence ray hits a surface at an angle and reflects around an imaginary line perpendicular to the surface called the surface normal the reflection ray forms an angle with the surface normal called the angle of reflection that is equal to the angle of incidence formed by the incidence ray all materials fit into two categories metals and non-metals are dielectrics these categories exist because metals and dielectrics have specific behaviors and properties especially when it comes to light we use the metallic slider for metals and the specular slider for non-metals there are very few real-world cases of materials that exhibit both properties so when working with metals the slider should be set to one and the specular should be set to zero when working with dielectrics metallic should be set to zero and specular should be set to 0.5 depending on your model there may be little difference between the specular values of 0.5 and 1 but 0.5 matches real world specularity and exceeding that might result in artificial looking materials given what i just said there are a few exceptions that i found one is satin metallic paints where bits of metal are mixed into non-metallic paint it's very common on cars you'll be able to see it a bit when i bump up the specular here another scenario is white metallic paint which is white not silver as shown here just two examples of an otherwise pretty rare material effect and i think the general rule still applies specular or metallic in most of your materials here are the full renders of each case for comparison in general metallic and specular don't mix because metals and non-metals employ different light behaviors to produce a reflection metals high reflectivity results from the process of absorption light is absorbed by the metals free electrons that vibrate to a higher level but quickly fall back down to a lower level as they return to the lower level they discharge a photon or light particle which is the reflection ray this is an incredibly fast process that results in a small amount of the light being absorbed while most of the light around 95 is reflected back light rays that bounce off an object onto a metal surface are reflected in a uniform fashion to the viewer resulting in a mirror light reflection since metallic reflection is a byproduct of absorption the reflected light is tinted in the color of the metal silver metals absorb and reflect light relatively equally and reflections don't appear tinted but colored metals like gold or copper absorb blue and violet light resulting in reflections that are tinted by the colors reflected back to us the reflectivity of dielectrics comes from refraction light passes through the surface of the material a short distance bends beneath the surface possibly interacting with particles until light bounces out of the object and is reflected back to us with dielectrics areas aligned with the light source and viewer will reflect the full light source resulting in specular highlights in this scene we have an object with specular reflection the camera acts as our eye line it is set up to track this empty object that will sit on the specular reflection the camera and light are at a similar distance from the object and a similar height if we view from the top and measure these angles we will see the angle of reflection is equal to the angle of incidence this behavior is true for every specular reflection on the object any place on the object not meeting this criteria reflects light in a diffused pattern if you have ever applied specular tint you may have noticed that your model seemed less reflective when dielectrics reflect light the specular highlights always appear white are significantly lighter than the rest of the model specular tint gives you an opportunity to force the specular highlight to adopt more of the base color essentially making the specular highlights less bright this doesn't occur in nature so if your aim is photorealism leave specular tint set to zero for both metallic and specular reflection the intensity of the reflection results from the smoothness or roughness of the surface here these arrows represent light rays uniformly reflecting off of this smooth surface by adding displacement to this surface we can mimic the effect of micro facets microscopic imperfections along the surface that cause reflection rays to scatter this scattering reduces the intensity and sharpness of images reflected on the object's surface a value of zero represents a completely smooth surface while one scatters light so much that the object appears diffuse next we'll cover these reflection parameters that are for special cases when you think of anisotropic think of stretching a reflection of light in a particular direction anisotropy means certain properties of a material behave differently based on direction one example of this is wood which is stronger with the grain than across it in a principal shader the property that changes with direction is the intensity of the reflection anisotropic reflections appear to stretch across the object linearly or radially around a center point this effect is only visible in render view in cycles being a reflection effect its appearance changes based on the lighting so if your lighting isn't bright enough or in the right spot you might not see this effect anisotropic reflections are most common on metallic products with a brushed metal effect that results in fine lines on the surface traveling in the direction of the brushing when light hits brush metal the reflection is stretched perpendicular to the groove direction when the groove patterns are circular across a flat surface the light stretches perpendicular to the brushing rings forming a radial pattern around a center point let's explore this feature using the default cube i'll set the material to full metallic and full anisotropy notice how the light seems to stretch out from a center point in a radial fashion blenders and isotropic reflections use a tangent input to determine what surfaces should exhibit the anisotropic effect essentially the axis the radial effect rotates around is the tangent by default the tangent is the z-axis and the type of reflection is radial with the default settings an object's tangent is defined by the object's local orientation an object's local orientation can be different from the global orientation when we rotate this its local z-axis which passes through the top and bottom of the object is now aligned with the global y-axis despite the object's orientation in the scene its local orientation stays with the object as does the anisotropic effect because of this applying rotation can give us unexpected results when it resets the object's local orientation to align with the global orientation this can easily be fixed however by telling blender to generate the radial reflection around a different axis by using the tangent input in the node editor shift a to add a tangent node to the material and connected to the tangent input on the principled shader the default setting of the tangent node matches the default anisotropic settings so connecting it as is won't result in a change but we can select x or y to center the radial effect around either axis in addition to changing the tangent we can rotate the effect around the tangent axis using anisotropic rotation this value rotates the reflections with zero being no rotation and one creating a full circle around the tangent axis so far we've used objects whose origin aligns perfectly with that of its bounding box an imaginary cube that fully surrounds your object we can see the bounding box by going to object properties viewport display and checking bounds while tangent tells blender what surface to apply the effect to the bounding box's center determines where the anaesotropic's effect is centered the bounding box's center moves if the shape it surrounds changes for example if we extend a part of this object to make a handle the bounding box's center moves and so does the center of our anisotropic effect to correct this we can use the texture coordinate node to define the precise location of the anisotropy center if we choose object and connect it to the tangent input the effect centers on the object's origin point along the default axis the z-axis if we want the effect on the top of this surface we need to align the local axis with the global axis by applying rotation this works as long as the origin is located where you want the effect to be but what if the origin point is not where we want the effect to originate we can use any other object to mark the center so let's add an empty on the texture coordinate node select the empty as our object the radial anisotropy effect is now centered on that selected empty place the empty wherever you want to see the effect on your object we need to parent the empty to the object to keep the effect in place but before we do that we need to apply any scaling now we can use ctrl p and select object keep transform to parent the empty to the object when we move the object the reflection moves with it this option gives us precise control over the placement of an isotropic radial lighting effects but what if the effect isn't radial on many real world objects the anisotropy reflect is linear not radial we can create this effect using the uv map option to better demonstrate this i'm going to make this look more like a pot first i'll inset and extrude the top face add some edge loops adjust the position of the empty so it rests on the object's surface and then add a subsurface modifier i'm renaming this material to radial then i'm going to select the sides of the pot that will have a linear anisotropic effect and assign them to a different material when uv map is the tangent input blender treats the u-axis of the uv map as the direction the light should be stretched in imagine a light ray stretching horizontally across your uv map of your object with that in mind we can align the faces that need the vertical stretching effect to the u-axis of our uv map let's take a closer look at this using a simple grid object tab into edit mode to see its default uv map set metallic anisotropy to 1 and we'll see the default radio effect around the z-axis if i change radial to uv map the light stretches across the grid horizontally which corresponds with the u-axis of the uv map where the reflection appears along the v-axis is a function of the light source location the uv map is only telling blender how to orient the linear stretching of the reflection if we want to change the direction of the stretching we can rotate the uv map keeping in mind that the light will always stretch across the u-axis we can also select specific faces and change the reflection on them select a few rows of the grid and in the uv editor rotate those faces 90 degrees the reflection on the selected faces also rotates 90 degrees but the original reflection remains on the untouched faces using a uv map gives us extreme control over anisotropic reflections we can adjust the faces we want any way we want if i take a selection of faces and rotate them randomly we can randomize the anisotropic reflection creating patterns like this that's great for a simple plane but how does this work with a more complex object like our pop let's connect the tangent node and set it to uv map with the default mapping the reflection stretches horizontally around the pot but we want the reflection to stretch vertically i'll add seams and unwrap the object again [Music] the inner and outer sides of the pot are now aligned with the v axis the reflection runs along the u axis matching the orientation of these faces which creates a vertical reflection along the sides of the pop note that anisotropy only creates the reflection effect if we want the visible grooves we'd have to create them as a textured normal by adding a noise texture to a bump node and connecting that to the material's normal input that's an awful lot of information just to make slightly more realistic pots and pans but this effect is found in a lot of materials from satin christmas ornaments to records and cds like we talked about brushed stainless steel objects and appliances jewelry and even certain gems or minerals like graphite the next effect is sheen which adds a soft subtle reflection to a surface by increasing reflections at low grazing angles grazing angles are the angles formed between the incidence rays and the reflective surface when there are many light rays some of them will intersect with the surface of your object at a lower angle when the viewer is aligned with these light rays the surface of the object will appear brighter this plane has sheen applied to one side but no sheen on the other looking from high above the grazing angle is higher and the effect is barely noticeable but if we lower our view to align with the lower grazing angles the effect is much more obvious this effect is most commonly used to mimic soft reflections on cloth materials like velvet or satin or the fuzz on fruits or plant leaves and paints with the satin or sheen finish if we add noise displacement to the plane we can better see the softer appearance the sheen effect creates sheen tint like specular tent forces the sheen effect to adopt more of the base color with no tent the sheen reflects the color of the light source but in real world cases sheen reflections are subtle adopting more of the material's base color this is why the default setting for sheen tint is 0.5 the last special case reflection is clear coat clear coat adds a clear specular reflection layer that sits on top of the existing material this is akin to applying a lacquer or protective varnish to an object and is common on finished wood surfaces some plastics and finished vehicle paint this clear reflective layer also has its own roughness which is only available in cycles with ggx distribution enabled clear coat roughness has the same effect as the shader's main roughness it scatters light within the clear coat layer which blurs and diminishes the clear coat's reflections the next three sliders are about transmission when light passes through a material surface unobstructed any material that you can see through to some degree will have transmission enabled since materials are either glass or not transmission should either be 0 or 1 where 0 is a fully opaque object and 1 is a material we can see through completely using a value between 0 and 1 will result in a mixture between diffuse and glass ior stands for index of refraction refraction occurs when light passes through an object whose properties change the speed at which light travels this change in speed results from a change in the densities of the mediums when light passes from air into water the increased density of the water slows the light down causing it to bend the greater the difference in the density of the mediums the more light refracts when passing between them all materials have an index of refraction the ior for metallic and specular materials is accounted for in their sliders but transparent materials have a wide range of refractive possibilities so we have to specify the value an ior of one represents the speed of light in a vacuum as values move away from this number in either direction the materials appear more solid there are several ior resources available online i'll provide a couple links in the description here are some common transmission ior values rendered when light hits a glass object some of the light reflects back to us enabling us to see the glass object the rest of the light passes through the glass and reflects off objects behind the glass enabling us to see them roughness affects the light reflecting from the surface of the glass while transmission roughness affects the light that passes through the glass this option is only available in cycles and must have the ggx surface distribution model enabled so let's talk about the surface distribution options blender gives us two options for modeling light bounces among surface microfacets gtx models the first light bounce but subsequent bounces are ignored the ignored light rays would have illuminated the interior of the glass but without them it appears darker the rougher the glass the more noticeable the reduction in light becomes fewer light bounces are less accurate but results in a faster render and often the difference isn't noticeable ggx is required if your surface has transmission roughness multi scanner ggx results in more light bounces among the microfacets when the multiple bounces are accounted for there is less light eliminated and the resulting material appears brighter results are more accurate but this takes longer to render this image was rendered with each distribution option the difference is most noticeable when roughness is applied to transmission materials so surface roughness values are used since transmission roughness does not render with multi-scatter ggx enabled these emission settings turn your object into a light emitter a value of one results in the emitted light matching the chosen emission color as the emission value increases the light gets brighter moving the emitting color towards white alpha is a color component that controls the material's opacity without any regard for refraction the default value of one is fully opaque a value of zero is full transparency rendering your object completely invisible remember that normals are vectors perpendicular to a surface that light reflects or refracts around we often change the appearance of the model by changing the geometry but we can also change the appearance by changing the normals here i have a basic flattened cube we can tab into edit mode and see the cube's uv map i have two texture maps an albedo map which is a basic color map and a corresponding normal map when i connect the color map we see it on the model but it appears flat with uniform reflections when we connect the normal map it creates the illusion of deformations by changing how light interacts with our model the fine details are faked by changing the normals which affect how light reflects around the model's surface the actual surface hasn't changed we can also use bump maps to leverage basic black and white images like blender's built-in texture nodes the texture should be connected to the height input where the grayscale values are converted into height information areas that are white will appear highest or furthest away from the model surface and areas that are black will be lowest or closest to the surface distance represents the distance of the entire effect from the model surface and strength is the overall intensity of the effect since normal maps don't change the mesh they are commonly used for fine details the reflective clear coat can have its own normal map apart from the main textures normal map clear cloak materials can have their own textures think of a wooden table with a resin coating the woods texture comes from the material's normal input and the resonance texture comes from the clear coat normal and that's it all about the principled shader if you've made it this far thanks for hanging in there i learned so much making this tutorial and i put a lot of effort into passing that info onto you if you found it helpful or interesting hit that like button and be sure to subscribe this helps me figure out what kinds of tutorials to continue to make be sure to drop any questions or comments below and keep blending [Music] you
Info
Channel: Blendini
Views: 158
Rating: undefined out of 5
Keywords:
Id: _5dWa3z7bGw
Channel Id: undefined
Length: 32min 24sec (1944 seconds)
Published: Sun Oct 17 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.