Unreal Engine 5.2 - Intro To Strata/Substrate Materials Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video we'll take a look at what things you need to know about the new strata materials in unreal 5.2 and up strata will allow you to make more complex and realistically layered materials in unreal in this video we'll take a look at the overview of shading with strata and how to approach making a few materials in strata like this silk as well as some metal glass and coated plastic this is an introductory video to strata materials and unreal if you're using Unreal 5.1 some strata notes may look a bit different since they've been updated in 5.2 Preview 2 which is the version of unreal being used in this video let's begin and take a look at how you can enable the strata shading feature to enable strata in unreal 5.2 and up you'll be able to go to edit project settings and then search for strata there will be three options here there'll be substrate materials experimental which is a Stratus system or strata shading system which you can enable and then there'll be substrate opaque material refer fraction this is a feature where if you have a coded layer that has roughness it'll actually blur the layers below it this is more physically accurate and realistic but it will affect performance and then finally there's a substrate Advanced visualization shaders which is a debugging mode for strata materials only enable this if you're going to use that debugging mode otherwise it also affects performance so it may be something you want to turn off in most cases once you've enabled the options that you need here you'll be able to close this and you may have to restart unreal for those changes to take place so why use strata well strata shading and unreal take some more modular approach where you can start to layer and blend your materials more accurately and blend different material pipes together it's very similar to what offline renders do like v-ray Arnold or render man except strata and unreal is targeted to doing this in real time at a much quicker Pace the main thing about strata is it will allow for you to have more flexibility and control over your materials so you can build more complex and realistic materials there's some important optimization features about strata we will take a look at as well let's first take a look at how strata materials are structured so once you've enabled strata if you create a brand new material and I'm just going to right click and create a material and call it m underscore strata and you open it up you're going to see something a little bit different than what you might be used to you're going to see something like this and this so quite a bit different from what you had before enabling strata and you'll notice that there's a few things that are no longer here that you used to have control for like metallic and other things now we're going to talk about what each one of these do and how you can kind of work with the strata shading system if you're used to the metalness workflow or the PBR workflow that will change a little bit you still can shade that way nothing's really drastically changed but the setup might be a little bit different because as you can see here we no longer have the metalness control and we'll talk about that in a moment but let's first go over kind of what you do get with the substrate slab bsdf bsdf stands for bi-directional scattering distribution function and you have a lot of controls here of how these materials scatter light so the very first thing that we're going to take a look at is the diffuse or Albedo and this is where you can connect up your color or base color of your surface and then you have this F0 and f90 connection here and this is pretty much the reflection at the facing angle or the direct angle of the surface so F 0 is referring to the very center and kind of the point we're looking at directly straight face on and then f90 is determining the reflection at the grazing angle at the side angle of this object so that's what those two controls give you the control of the reflection at the facing angle F0 and the control and reflection at the grazing angle f90 and then you also have your roughness your anisotropy controls roughness is the surface smooth or rough is it glossy or is it rough if it's zero it's very glossy if it's one it's very rough and then anisotropy is is the Highlight stretched in a direction does that material have some sort of surface that makes the Highlight become stretched or elongated horizontally or vertically so that's what anisotropy will control and then finally we have our normals which we've already been used to in the past just for your normal maps to fake the normals of the the surface and then shading tangent same thing we had that before and then we have our SSS MP mfp and this is the subsurface scattering or subsurface mean free path and essentially what this is going to do is it's going to be the density of the material and affect the absorption and scattering of a light on this material so it's defined in centimeters but there's a bunch of things you can do to control that in different ways and that's going to be something we'll talk about a bit and that we'll have to use and then there's also a scale control for it and then an anisotropy control for it now what does the SSS phase anisotropy control do well pretty much you could think of it as if it's positive values it takes the light and is forward scattering and if it's negative values it's backward scattering and if it's zero it's kind of scattering okay in both directions evenly so that's kind of what the SSS phase anisotropy will do and then we have our emissive color if you want things to Glow or give off light or just be emissive and then we have a second second roughness control and a second roughness weight so what this is is you have a normal highlight determined by your roughness up here this will be the control of a secondary highlight and that could be useful for if you're doing skin or certain materials and you don't have to have that turned on the second roughness weight is a control that you can add where if it's set to zero it only uses one highlight from your roughness up here and if it is set to one it's only going to use your secondary highlight which is different defined here and then it fits that to like 0.5 that's going to use half of this highlight half of that highlight so that can give you more control and kind of allow you to dial in two different types of glossiness or roughnesses for your falloff of your highlights and allow you to make more complex surfaces but you don't have to enable that it's all based on whether you have that second roughness weight uh turned on or turned off or a mix between the two and then finally we have our fuzz roughness so this is like on top of the surface you have a control now for a little bit of fuzz and it kind of emulates fuzz on the surface they have fuzz amount fuzz roughness is that fuzz kind of more rough or more glossy and then the color of that fuzz and this is all within this material called substrate slab bsdf now what is a slab think of it as like a layer of matter a layer of something if you have paint that's a slab if you have metal that's a slab if you want to blend those two together you can in strata so slab is kind of like a material pipe or slab of something a slab of a material and then on top of that slab you have this fuzz that's slightly added and they refer to that as like the interface of the the slab but pretty much that gives you your material materials are known as slabs now so if you right click and you search slap you'll find your substrate slab and you create another one of these and that's where you'll be able to Define what that that material is so that hopefully gives you a bit of uh an overview of what all these little different connections do now one thing to keep in mind is terminology is a little bit different now so reflection at the facing angles F0 reflection at the grazing angles f90 what happened to metallic what happened to all that there are still notes that you will see that that make use of the metallic option and they'll have outputs I'm just going to use a node for for example here just to go over kind of how the terminology will vary and how you can kind of link that together there's a node called SMF so strata material function underscore metal and it gives you some inputs that you might be used to base color roughness you've got haziness normal stuff that you expect now what's Edge color so if you ever see the word Edge color essentially that's the same as f90 it's the color or the reflection at the edge the grazing angle so if you see Edge color that's interchangeable with f90 both those things pretty much mean the same thing and if you see specular or facing angle that's kind of the same as F0 just wanted to make sure that's fairly clear now if you did want to use a material that makes use of the metallic workflow where you have metalness or a metal in this map and if you're used to working that way you can also create a node here called metalness and you'll see here under substrate helpers there's substrate metalness to diffuse color F0 and what this node will do is allow you to use the metalness workflow you define is something metallic and then you define if you want to change it specular or just leave it by default to its default brightness and then its base color and that way you can kind of work in the metalness workflow and then just connect this stuff up diffuse Albedo to fuse Albedo and F0 to F0 and that's really it and it will just work so if I want to make this chrome I could do diffuse Albedo connect F0 to F0 connect metallic I'll put a constant it is going to be a metallic so one the metal and then base color I can put my constant 3 vector and make it just bright white maybe it's not perfectly what we want it to be and then you define your roughness so roughness for this let's put a constant in zero being super glossy not rough at all and there we go we got ourselves like a chrome or like a mirror like material in strata using this metallic kind of workflow so that's kind of how you can start to build things up there's many different ways you can do this and we're going to explore how you can create something like gold in a couple different approaches just so it makes sense of how you'd approach things that you might already be used to doing not in the strata shading but with the traditional unreal shading this way it will help you kind of grasp how you'll be able to create materials in strata so since we already have this chrome that we just made already open how can we turn this into gold so all we'd really have to do is tint our color here that we're using and that would you know since we're using metallic mode it's going to use base color as your reflection color it'll kind of be able to produce gold if we modify these color values so for something like a low carat gold I'll maybe do something like 0.97 for red uh 0.72 for green and 0.4 for blue and that's technically taken from kind of real world sampled values of a have a gold and a lower carat gold like 14K gold or something but that pretty much gives us uh something like a gold material and maybe we add a little bit of roughness just make it a little bit blurry and we pretty much have a a light carat gold there so that kind of gives us our gold material and if we want to do this now without using this metallic workflow so right now we're kind of using the whole PBR metalness uh kind of approach or workflow if we didn't want to use this node here to do that how would we create gold using the specular workflow which strata also allows you to do so if you want to create this with the specular workflow I'm going to remove this node is pretty much the same thing the only difference is you have no more metalness control and in the specular workflow you have diffuse separated your diffuse color is separated from your reflection or specular color so you'll connect the fuse up but it will be ideally for a metal it's going to have to be black you don't really want any diffuse for Metals when using specular workflow and our reflection at the facing angle by default for dielectric materials or non-metallic materials you're facing angle reflects a much lower percentage than the grazing angle the grazing angle will always reflect a hundred percent so you can see here that it defaults to 1.0 100 reflection at the grazing angle and the facing angle by default anything that's kind of dielectric non-metallic most things will reflect four to seven percent at their facing angle and you can see the default here defaults to plastic which is 0.04 or 4 reflection at the facing Angle now if we're making this a metal Metals reflect much more even at the facing angle and the grazing angle practically everything about Metals is all based on reflection and a little bit of a tint because it absorbs certain wavelengths of light more than others so if we want to make this gold all we need to do is pop in a color to facing angle reflection and set it to be our gold color so 0.97.72 for green at 0.4 for blue and that will bring up the facing angle to be a much higher reflectivity and there we go we have our gold in the specular workflow not using metalness so it doesn't matter which way you produce materials using the metalness workflow using the specular workflow they're both doing the same thing one's not better than the other except with the sense of saying if you used a metallic workflow since there's no use for having diffuse color separated from specular color it can technically save some material slots or some textures that you might have to load so in a sense metallic workflow will require less things to connect up but otherwise it doesn't matter which one of these methods you choose just two different ways to produce the exact same thing that would be a shame to start using this strata shading system and not make use of one of the features that we have here called fuzz so let's take a look at how we can make some silk so I'm just going to delete these connections away and we're going to take a look at how we can make some silk so if you want to create a silk material which is a fabric that's kind of hard to make because it's kind of like a metal like when you look at silk it has a very shiny reflection it's smooth or very kind of glossy-ish but it also kind of tints the reflection if you look at silk and the reason why this happens is because silk has a special structure on the way that the strands are like Silk material has this kind of prism-like structure that that gives you a bit of a iridescent or tinted reflection so how can we produce silk in strata or in the strata shading system Well what we'll do is think about what kind of color silk we want maybe we want red silk I'll go in here and create a red colored material I'm not going to make it too bright I'll choose something like a dark dark red something like that it should be fine and I'll use that for a diffuse color next thing we'll do is roughness you know if we look at silk is it rough is it smooth it's fairly smooth but it does have surface breakup so it's not going to be like zero roughness maybe something like 0.5.8.7 around there it's kind of dial in some values be 0.8 kind of okay now right now if we take a look at this looks a little bit strange we could use maybe some reflection to it it feels a bit washed out you know if this is like 0.2 for roughness okay feels like a kind of plastic ball but if we put this at point eight it starts to really get washed out and as I mentioned silk does have a structure where since the fabric is kind of this prism-like structure it will kind of give you highlights that are a little bit tinted or have this kind of Unique Look to it so a way we can cheat that is let's take our facing angle zero and connect it up to our color here that's going to tint the facing angle highlights to kind of emulate what silk does a little bit of a cheat but should be fine and then we're going to add some Addison trappy so that the highlights are stretched so I'm going to go in here and maybe dial in something like negative point seven and that should give us vertical stretch in our highlight there we go maybe negative point seven five even more stretched okay and then finally let's make use of this roughness so what about the fuzz that's on here I'm going to create some parameters here fuzz roughness Buzz them out fuzz amount let's do 0.9 a lot of fuzz 0.9.8 8.9 is too much get kind of these darker edges so let's do 0.8 and then fuzz roughness probably not very rough so let's do 0.2 it's kind of smooth okay now we get like a interesting kind of fall off on the edges and then fuzz color I'm going to add a constant so some sort of color I could use the same color I had here for the diffuse but I think having a little bit brighter more saturated color um we'll give it a little bit more of a pop and give us those really nice highlight so I'm going to choose like a pretty saturated and bright red for the fuzz color and there we go we kind of have like a silk like material now pretty easily done and if we put this on one of our objects it should hold up pretty well and we can expose all these to parameters so we can just change the color really easily but this is kind of how easy it would be to create some silk like material in strata so let's put this to work and give it a try I'm going to save this material and just minimize this window once it saves here's our little box uh with some cloth draped on top of it let's apply that Silk material to this cloth and there we go that's kind of the the silk we were able to create super easily and it looks pretty good it has this very nice shiny highlight it feels like Silk you could probably Dil it in dial it in even a bit better or make some adjustments to even get it to look better than what we have here but this is a pretty good starting point so now we're able to produce silk and strata very easily now what about refractive materials or materials that you can see through that light can pass through like glass how can we make glass in strata so I'm going to open this back up and we're going to make some glass so I'm going to delete all this no more silk and we're going to look at how we can create some glass so very first thing about glass with strata is we have to make some changes here if we click on strata or right here we'll see that there's an option for a fraction and it's disabled so how can we enable that well to enable that we're going to have to go in here to our details and enable refraction so what I'm going to do the easiest way to do this is we can just search or go to the drop down here called refraction and right now a fraction method is set to none so I'm going to change that to index of refraction an index of a fraction will be kind of the most realistic way of calculating refraction or how light gets passed through the surface and how it gets bent when it passes through the surface so you can look up a Wikipedia page or any index of a fraction from a textbook for how different transparent or refractive materials refract light differently so we're going to set this to index of refraction but it'll still show as disabled here like we can see it says index of refraction but it's grayed out and that's because we also have to change our material type so we're going to go to material here and right now you'll see our blend mode is set to opaque we're going to change that to translucent colored transmittance and that will allow you to do kind of tinted refraction it will pretty much calculate diffuse and and translucency so it's like a fully featured um refraction type material whereas translucent gray transmittance and color Trend mittens only do certain things I'll have more information of the about that in the the PDF for this video but pretty much for this glass I'm just going to choose translucent colored transmittance and that's going to give us kind of the the most detailed material for translucency and after doing that I'll be able to have access to this refraction so refraction for something like glass depending on the type of glass is probably anywhere from 1.4 to 1.6 or something I'm just going to do 1.5 7 or something that should be fine 1.48 I don't know like for class it's within that range depending on what what type of glass it is now we'll notice here this doesn't really look like anything we'd expect right now how can we make this properly look like glass well once I've dialed in that index refraction you know maybe I'll do 1.4 a little bit less refraction so that'll that'll determine how it bends light or how this glass will magnify or distort the image behind it and then for glass diffuse this is going to be pretty much black I don't think we want any tint tint to it in this case roughness we're going to set to all right zero but I'm going to do 0.1 for just a little bit of roughness on this glass and I'll look over why it's kind of going to be a neat thing that we'll be able to do with strata so I'm going to set roughness to 0.1 and then why doesn't this look like glass it just looks like a dark Cube that's because we have to set the SSS mean free path so for something like glass it pretty much is going to be a very large value the SSS mfp or mean free path will determine the absorption scattering of the material and for glass is going to be a very large number since light can easily pass through it without much absorption or scattering so what we're just going to do we could technically plug in just a high number like one or something would be fine but instead what I'm going to do is use a node called substrate transmittance to mean free path and that will allow me to take a transmittance color so if I want to I could tint the glass as well and I'm just going to connect this to White for now since we just want see-through glass with no tinting of any any sort and now we kind of get this glass that we can see through and it'll probably look a bit better to troubleshoot in our scene with an actual proper geometry but here we go we got some glass and that's pretty much it so if I save this and we apply it to like a thin Cube we'll get some glass so now this material is saved I'll minimize it go into my scene I'll have like a cube here that's fairly thin I'll make that a bit thinner uh there there we go that's good and I'll put that glass material we made onto it and there we go we can see through it distorts the image behind based on that index of refraction and there's our glass now the cool thing about this is if you enabled that feature that I talked about earlier under edit project settings when you search strata if you enabled substrate opaque material rough refraction it will allow kind of rough refraction effects um so it'll kind of do this effect if you layer materials but this is the cool thing about strata it's a much more complex shading system and if you have a material like this and I just expose maybe our roughness as a parameter and just call this roughness and I'm going to make this a instance material so I can easily change that you probably want to expose more things I'm just going to create a material instance apply that on here and let's take a look at that adjustable control so I got my roughness control here check out what happens I make it more rough it becomes like blurred glass and it actually blurs the image behind it and this is really cool because without strata this is always an effect that you kind of had to cheat a little bit whereas now you get proper or somewhat proper blurry refractions if you're see-through refractive surface has roughness on it it's pretty cool a great thing to create blurry glass and and more accurate materials that wasn't as easily done before so that's that's a really neat thing that we're able to do now and let's go back and take a look at one more thing I'm just gonna get rid of this playing here for now and just create a sphere and if we put our glass on this sphere we get our blurry refractions and all that but we don't get a specular highlight I don't get a reflection of the sun on this surface and if we go into our material we're just going to open up and we look here okay our roughness is 0.1 but we don't get a specular highlight and why is that by default you're not going to get that even though it should be there you're gonna have to change the material a little bit so I click on an empty space here under details I'm going to scroll down and you'll be able to find a section here under translucency called lighting mode and by default it's on volumetric non-directional which is the cheapest method but it doesn't give you all the features most expensive method is surface forward shading where if I change to that it's a heavier material but what we'll get now is proper Reflections and highlights calculated so now we get that specular highlight so if I were to save that and we have that surface forward shading we essentially get refractive materials materials you can see through and you also get the Highlights calculated or specular highlights calculated as well so that's something important for if you're needing that if you're needing surfaces that are refractive or transparent but also have Reflections and proper highlights so what we're going to do now is create a bit of a film material like iridescent film so I'm going to open up this material that we have right now our fraction one and we're going to turn off fraction and clean this up a bit and make a material that has a thin coated film with a bit of iridescent so let's delete out all this these nodes here and we're going to go and turn off our refraction so under refraction method just set that to none and then what we're going to do is we also have to change our material type back to being opaque so I'll just click on nothing here and change it to opaque so it's not a refractive material and what we're going to do is search for for what we're going to do is we're going to make a thin film and then blend it with another material like plastic so I can go in here and search for substrate operators and we'll be able to find the types of blend mode so we have substrate add we just add to materials together coverage weight horizontal blend and vertical layer blend so you have all them here and add which is plus two materials directly together not physically correct but pretty much just adding two things together so that can cause a bit of problems where you'll end up with material set kind of give off more light than they receive so it's going to have to be a little bit careful with when using then we have a substrate coverage uh weight where you can have this a go to whatever material you have and then wait go to how much coverage or how strong that material is and connect that up in a blend and then we also have our substrate operators horizontal blend which is Blends two materials together background foreground and then how you're mixing them together so it perfectly Blends those two materials directly just mixing them together and then there's also one other one substrate vertical uh layer which will simply just put one material on top of another so bottom could be plastic and then top could be something else named top thickness so just pretty much puts one material on top of the other and then you define how thick that top material layer is so those are kind of the blend boats that you can use with strata now if we want to create something that has like a thin film what we can do is do that very easily by using a node so I'm going to go here and search for thin film and we have a substrate thin film node and that pretty much gives us a node where we can output our specular color to F0 Edge specular colored f90 and then you have things that you can specify uh like our normal and F0 f90 thickness and ior now thickness is the thickness of the film and ior's index refraction of the film for thickness I'm just going to put something like 0.14 and one four one five will give us kind of similar kind of look but if you change that to different numbers you'll get different looks of iridescence so you can see how this looks at 0.15 maybe we'll change it to 0.5 and you see a different kind of look so 0.15 looks pretty good so I'll do that and ior will also have a similar effect what will change kind of the look of it as well so at two it gives us that kind of fall off at 1.5 or 1.4 so it'll give us this kind of fall off so this kind of defines how our thin film will look now now we have our thin film what if we want to blend this on top of some plastic or something so that's kind of the next thing that we're going to want to maybe do so what we're going to end up doing is going in here and adding another material so diffuse for this one it could just be black we don't really care about having a diffuse so it's just pretty much the thin film coating roughness will make it fairly glossy uh maybe 0.1 so it's not it's a little bit blurry that way and that pretty much gives us our thin film layer so now what if we want to make plastic or another layer below this so we'll move this up here we're going to create another slab so we'll go in here and create another substrate slab and we're going to blend this with the other one but first we'll have to make this one as plastic so what we can do is Define the color so I'm just going to do a constant three Vector make it something like a red kind of plastic so let's dial some some numbers in here to get a pretty bright red and then what we're going to do is connect this to our front material just so we can preview it and then we'll take the roughness it'll be more rough so maybe something like a value of 0.5 so we have a bit more of a plasticky material that's not too sharp or too smooth and now we want to do is blend this with our coating so we're going to create a way of blending these two together so we're going to go and create that vertical layer blend or vertical layer substrate and plastic is going to be our bottom top is going to be the thin film we'll connect that up to our front material now and I'll just reorganize this a bit and now we're going to be able to do is have that one layer on top of the other one but if we look at this we only see our film we don't see the plastic below and this is because we need to change one thing on our thin film material we need to define the SSS mean free path so this is going to be pretty much the thickness of this or how much light it kind of scatters or absorbs is going to be like the scattering of this so we're just going to use substrate transmittance to mean free path just like we've done before and we're going to take this transmittance color plug in a constant three Vector we're not going to make it perfectly see-through or white we're going to go for a little bit darker of a value so like a little bit darker gray and that will just make this layer A Little Bit Stronger but still will be able to see through it mostly and that pretty much will give us a decent blend between it so now we have that iridescent film on top of our plastic and it's blending nicely and it's a pretty complex material as properly layered so this is starting to look pretty cool so if we save this and take a look at it in our actual scene just to see what this looks like that's our material so now we have this iridescent coating on top of this plastic material or as plastic red plastic kind of material so pretty cool now this is pretty expensive of material and you're blending two different materials like this you can see the base Shader passes 3278 instructions that's quite a bit that's because it's properly blending these two different types of materials now there is a way to optimize this a bit we can go into these materials and how they blend the substrate vertical layer and turn on use parameter blending that will kind of collapse them to one material and just have differences based on roughness and diffuse and things like that but not keep them as separated two different materials but I'll try to combine them and optimize it so it will change the look it will damage the look a little bit but it will optimize it quite a bit while trying to keep the look as similar as possible and this will be improved over time or that's kind of what epic games is saying so it might not be working the best right now but it might improve over time so if we check that on anything from this node downwards towards the left will be optimized and kind of collapse to a material with just different values for roughness and all those parameters so this is what it looks like currently at 3 000 instructions and if we turn on parameter blending let's see what happens okay the look looks a little bit different but now it's only 798 instructions so it hurts to look a bit but it's not too bad still keeps the overall feel but again 798 instructions pretty much one third of the original amount of complexity and this is a great way to kind of optimize things especially when you have much more complex materials this will be a way of kind of getting it to a more simplified and a more faster running result so that's that's kind of what parameter blending will do and it does not do a perfect job of optimizing does change the look but again makes it much more simple in terms of instruction count so that's kind of how that can be used so now we're able to blend these two materials together we're able to optimize it kind of gives us a good start for what we're able to do in Strata with these materials and blending two different materials together so that kind of brings us to um a pretty good way of being able to also optimize this stuff by using that parameter blending so anything from that note down when you check that parameter blending line will be optimized anything after it will not so it kind of works from that node downwards so that hopefully gives you a good introduction to shading the strata there's a lot more complex things we can do but this is kind of just enough to get you started and kind of go over some of the things that you should know before you really dive into shading with strata if you like this video If you learned something new make sure to like subscribe and press the Bell notification to be notified of future videos and if you want to see a little bit more info about this topic if you're part of patreon you'll get access to the PDF here which will kind of cover what we did in this video but also provide a little bit more information on some of these topics so definitely check that out and the link to patreon is down in the description below otherwise please let me know in the comments of what other content you would like to see for a few your videos
Info
Channel: renderBucket
Views: 8,774
Rating: undefined out of 5
Keywords: Strata Shading, Substrate Shading, Unreal 5.2, Unreal Tutorials, Strata Tutorials, Unreal Engine Materials, Unreal Engine Material Tricks, Unreal Engine Material Creation, Strata Shading System, Unreal 5.2 Strata, Unreal Strata Tutorials, Substrate Tutorial, PBR, Unreal Strata Shading, UE Material Workflow, Unreal Blending Materials, Unreal Engine Slab, Strata Slab, BSDF, Silk Material, Shading In Unreal, Next Gen Shading, Material X, Strata Materials, Unreal Tech Demo, UE5
Id: rIktWZ-lpWw
Channel Id: undefined
Length: 41min 29sec (2489 seconds)
Published: Wed Apr 19 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.