Creating Realistic PBR Materials In Unreal Engine | UE4 | Quick guide

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone welcome to Raggz welcome to  another interesting tutorial with me Krish   so in this video we're going to talk about  how to create a realistic PBR material in   real quick so first things first let me get into  it directly I'm gonna open Maya you can use your   blender or 3ds max any other software's so  all that I need is I just need this single   plane and I just want it really big something  like this or maybe a bit bigger and I want it   to be densely populated I want the mesh to be  a bit closer so that I can you know it's good   to use displacement maps so yeah so this is a  floor so I'm gonna export it export selection   and I'm gonna export it to my desktop let  me create a folder PBR ya PBR material yeah   so floor right so let me get back to my Unreal  Engine here and let me create a new folder PBR material right so I'm gonna import the floor  that we created so actually I'm not gonna use   this floor because it's not that densely populated  and it's not you know it's not smooth so in order   to do this in order for the displacement map  to work properly we need the mesh to be densely   populated let me show you real quick import  right click and import import to game PBR M so   go to my desktop and import my floor yes yes so  imported imported just imported right clear yep   okay right this is the default material lambert  1 which got assigned to the floor in maya so   I just don't want that I'm going to create a  new material so delete that yeah force delete   yeah so you can see this small star symbol  which means it's not saved yet so just click   Save all yep save selected right so let me drag  and drop it in here and let me scale it I just   wanna place it right next to it yeah something  like this let it be there now the reason why I   created in Maya the reason I created the mesh in Maya go to lit and change this to wireframe you   can see this is the default floor that was  created in unreal and it's it has very few   mesh so it has very less number of polygons  which is not suitable for using displacement   maps so I want a densely populated so I want a  one which has more number of polygons in it so   let me go ahead and select the original floor  and delete it go to wireframe and Lit yep move   it to the center just place it at the center  just change the location to 0 0and 0 yeah right F to zoom in yeah right there all  set now let me go ahead and create a new   material first right click and create a material  here so I'm going to name this as M underscore ground right so just double click on it and you  should see the material editor open yeah so this   is the material editor so this is not going to be  a deep dive session on how to use materials it's   just going to guide you in a real quick on how to  create a realistic PBR material real quick right   so here we need a couple of things let me take  my notepad yeah we need base color and we need   the metal value we need the specularity value  and we need roughness value and then we need a   normal map and then we need an I guess we need  a displacement map and then just in case if you   can get an ambient occlusion map it's good if not  also it's fine yeah so these are things that we   need here so we need to create all these things  there are two ways that we can create this one   is first we need to find a proper texture so here  so here I have one particular image just   you can just go ahead and google it you know and  get an image of whatever you know whatever your   preference is so I have just chosen this image I  just want to create a realistic you know material   based on this image go to photoshop and you can  just import this image into Photoshop right so   this is your base color so by default we have the  base color ready and the metal value by JISC wanna   use a solid a constant value and B going to use  a specularity value and roughness value also is a   constant so what we are going to do is we're just  going to create a normal map and a displacement   map right so what I can do is if you are using  any Photoshop version I guess any CC versions   you should be having this option under filter so  select the layer select the image go to filter go   to 3d and click generate normal bump normal map  so click on it and it's just gonna take a couple   of seconds right so here you have the normal map  generated like this you can just adjust the values   here if you want it to be a bit more sharp and  depth I'm just going to change the value to medium   250 and high to 80 so I can notice it's getting  really you know intense so I'll keep like this I'm   not gonna make it smoother I don't want it to be  very subtle because I'm going to adjust the value   of this in unreal so let it be harsh so click on  OK and ctrl shift s and save this s here you can   notice I've saved it as T underscore which means  texture and so I'm gonna save this one as a normal   map so N underscore because naming convention is  really important in unreal so n underscore which   is your normal map click on OK save and just save  it let me undo this and go to image adjustments   and desaturate it right now we are going to use a  displacement map go to filter then you're creating   displacement maps you don't want to have very high  detailed ones go to filter blur and Gaussian blur   so make the blur let's say 10 no maybe five yeah  five is good I just don't want the hard noise to   be there I just want everything to be you know  the ha it shouldn't be highly detailed so I just   click on okay and ctrl shift s and I'm just gonna  save this as the displacement map right click on   save click on okay so we have our normal map and  our displacement map ready now let me go to this   one material editor so let me just drag and make  it bit smaller now right click import I'm gonna   import my textures so displacement normal and  texture click on open and texture map when it   says n underscore it is imported as normal map  so just click on OK now what I'm gonna do is   drag and drop my material inside right so here  I have my texture material here I'm just going   to drag in connect this to the base color right  now I'm going to drag and drop my normal map here   so drag it and connect it to normal map and then  the final thing displacement map I'm not going to   work on displacement map right now I look at the  last right so when it comes to PBR materials these   three things are really important there is a metal  specular and a roughness map so I'm just going to   use constants here so right-click on it and I'm  just gonna click on rightlook ass constant so just select constant here and I'm just going to  insert the value into metallic right now the   value is mentioned as zero so in PBR materials  the value is either completely metal or it's   completely nonmetal so either it's zero or one  there is no point five or you know there is no   gray value so it's either zero or it's either  one so stone or you know the ground is actually   nonmetal so the value is zero so I'm just going  to copy and paste the same one control C and   control V and I'm just going to drag and drop  it to specularity so maybe I can increase the   specularity to point to something like that  yeah that is good let me make it a bit large   so that you can see it clearly yeah so you  can see the specular values here now again   I'm going to copy and paste it control C and  control V and this is going to go in roughness   so the roughness value is right now zero but  I want because the ground is usually really   rough you can notice it's not really rough it's  kind of shiny so I'm just going to increase the   roughness value to 0.8 yeah something like  this right so now let me have it like this there it'd be like this now I'm just  gonna drag this material and drop it   onto the floor now you don't see any  changes because we haven't saved the   material yet so apply so that  is going to apply the material yeah this is this is good now I don't see much  of changes in my normal map here I don't see   any you know much changes to the this thing  it just looks really flat because the normal   map isn't working that much so what I'm going  to do is I'm going to increase the intensity   of the normal map here I'm gonna increase the  intensity of the normal map here so what I'm   gonna do is right-click and I'm gonna use power  node so click on power take this here and I'm   going to multiply the values of this thing  the normal map with the constant so which   technically means I'm going to increase the  power of this Nam map so right click constant   and drag and drop it into this exponential  value and now I drag this RGB into the base   Channel and now I'm gonna take this power node  and plug into northern lab now by default I   don't see much of difference so let me go ahead  and bump the value of power of the constant to   1 yeah still nothing much bump the value - yeah  it's getting better I'll increase it - it's a 10 still I don't see the value boosting up  so what I'm going to do is I'm going to   multiply this value of normal map using  another constant so all right so like   this change the value to back to 1 and  I'm going to just copy and paste it here   and I'm here's gonna use a multiply node  yes multiply node and connect the constant   and the RGB value and then I'm gonna attach  the multiply node to the base channel here   yes now I'm going to multiply increase the  value of x of the base node to ten as well now let me click on apply' yes yeah now you can  see a few differences here but I'm not really   happy with the result here because normalmap  just you know it just creates an illusion off   it's actually you know they're surfaces you  know having all these ups and downs but what I   can actually do is this is where our displacement  map comes in to place so let me dragon place this   properly now let me drag and drop my displacement  map this is my displacement map drag it into the   material editor yep and let me make it big place  it aside yeah so this is my displacement map   so in order for the displacement map to work  they're going to use this node called channel   called tessellation so in order for right now this  material node is actually tessellation is disabled   so select the material node and scroll down and  you would see this option here no tessellation   somebody uses as flat tessellation so enable  flat tessellation here and you can notice we've   got this now what I'm going to do is I'm just  going to connect the displacement map to world   displacement here right we don't see much of  a difference that's absolutely fine because we   are actually just directly connecting it so I'm  gonna disconnect the displacement first and I'm   going to register the initial vertex position  so what this displacement map is going to do   is it's going to move the vertices up sent  on that is a reason why we have a highly you   know high number of polygons is highly densely  populated mushiya so that is a reason so first   let me right click and I'm going to use vertex  normal you just going to use this coordinate   1 which is vertex normal ws node so click on  it this is your this is like registering the   initial position of your vertex normals so  I'm just going to multiply vertex normal and   the texture here I'm going to add them together  so right click multiply so from the vertex yeah   multiply the vertex normal and the displacement  map here right so we have it ready now let me   plug this one into wall displacement map still I  don't see any much difference because we haven't   adjusted the tessellation multiplier so what  I'm going to do is I'm going to add a constant   value yes constant value and I'm going to plug  this one into tessellation multiplier so this   is going to be your desolation multiplier so  I'm going to increase this to let's say 250 so we don't see much difference yeah so what  I'm going to do is just place it aside let's   just quickly comment this select the normal  normal channel nodes and see and just name   this as normal and this is going to be texture  and these are metal roughness and specular   values yeah so this is our displacement  yeah just organize it properly so that   we don't get confused so still we don't see  the displacement map occurring here so what   I'm going to do is I'm going to multiply the  initial value itself so add a multiply node and let us be here I'm gonna add another constant  value here yes add up an another constant value   and just right just connect it to the B Channel  and connect the displacement map to the AAA   channel and then connect the multiply node to the  multiply node here yes now increase the value of   this constant to say then yeah I think we are  able to starting to see the differences now let   me increase the value to let's say 50 yes that's  really cool so we're starting to see the result   results so I'm gonna change the value to say 20  it's too much so reduce the value to 20 yeah that   looks good yeah it looks interesting now right  now there is one other important thing that I   want to change the value actually we have used  in tessellation is kind of too much you know X   250 is that too much the reason behind is it's  not actually understanding the original scale   of the object so this desolation factor occurs  according to the scale of the object so we need   to register to the material we need to make  the material understand you know the value   of the scale I mean the value of the scale of  the object yeah it was how big the object is   so I'm gonna right click and I'm going to type  in s object radius yeah so I'm gonna use this   coordinate node which is object radius select  this one and this is going to be multiplied   so I'm going to add another multiply node what  you just need to do is we just need to you know   make the this object radius registers like how  the vertex normal register the initial position   that is you know the all the not what externals  were flat so this actually registered it and   after that it just got multiplied according to the  displacement map now similarly we just registering   the object size there is object radius so  initially so I'm just gonna use multiply so this just read registers the object scale or  you know the object radius so multiply node and   select it and connect to the a channel and  connect the object radius to the B Channel and connect this one to the world displacement map  yeah now you see it's actually really really bad   because we have given the constant value as 250  so let me change this value to let's say 10 and   let's see what difference it makes it's still more  so change the value to 1 I guess it's still more   because I think the the displacement multiplier  is actually 20 so let me change the value to 1   yeah now we're getting the value there so change  it to 0.3 yeah point three looks good let me   change the value of this desolation factor also  to it's a point five so we have the displacement   value here now the reason why we actually made  the displacement map as a bit blurry it is   because if we have a lot of noise it's going to  affect the you know every single vertex here so   that is a reason now I think still I can reduce a  tessellation factor here I think can make it to a   point - I don't want it to be much very harsh  right so we have the displacement map ready so   click on apply and let's see what happens in the  ground here yeah right so you can notice it's not   flat it's all moving the vertex up and down into  actually displacing the whole mesh itself so I'm   gonna change the value I think it's really harsh  so change the value of the displacement multiplier   you can actually rename these things so I'm gonna  right click and convert this to a parameter and   I'm going to name this as displacement multiplier  and I'm gonna change right click and convert this   into a parameter too and I'm going to name this as  tessellation multiplier so yeah these are the two   values which we are actually going to adjust so  displacement multiplier change the value to 0.1   and since we have converted to a parameter give  the minimum value as 0 and maximum is one and   change the 10 salvation multiplier also minimum  value is zero and maximum value as one and I'm   going to change the scalar parameter to 0.1 click  apply let's see the effect yeah it's it's quite   less but still actually you can see there are  small small noises here and there and also the   image which I have selected is not that good so  that is reason why we see a little bit of you know   pixelation there but that's ok that's absolutely  fine you know just if you're seeing it from a   distance it's not going to be that noticeable so  I'm gonna go to photoshop again filter blur and   Gaussian blur make it bit more blurry maybe  value of 10 and click OK and just save it to   displacement map replace the displacement map  click on s and click on OK and I'm gonna re in   port yeah rien put yeah you can see the difference  now I think that's enough but I can just go ahead   and change the displacement desolation  multiplayer 2.03 and just click on apply the whole thing just got displaced I  guess the normal map is affecting a   little bit so let me change the power of  this normal map to 1 and click on apply yes and let me change this one also to one click on apply yes I guess that looks good now so I think  that's it for this session guys so you can   just go ahead and play around with these I  guess the only reason it will seeing a little   bit of pixels here is because of the texture  image that I've used that's absolutely fine no   issues you can just use a better resolution  image so save all save all these images and   everything so save selected and I'm going to  save this scene as sample yeah click on always initially if you just take a look at this this  looks a bit confusing but if you just go through   it one by one it just really really simple so  just in case if you have any other questions you   can just comment down below and we will be happy  to answer so so an initial base color and then   the metal value of a constant and specular and  roughness value of constant and then the normal   map that we have generated and then displacement  map comment it so the displacement map that we   create in Photoshop so let me take you through  the process real quick of the displacement map   alone initially we are registering the initial  positions of the vertex normals and then we are   actually multiplying it by a constant so that you  know the vertex gets displaced according to the   displacement map and then just for our make the  value more intense we just kept multiplying it   by different multiplying nodes and since we used a  bigger value as for the constants on tessellation   multiplier and displacement multiplier we use the  object radius so that we register the initial size   of the object so because of that if you know  you notice that we use the tessellation factor   of 250 first initially but right now we're using  only point zero three which again gives us the   same result so object radius is a key factor  here so these are the two important nodes that   we used in the displacement map and another  important thing is we actually enabled with   the tessellation under material node as flat  reservation we just change this option here now it's time for a quick tip guys so we have  successfully created the PBR material here the   thing is we can actually replace the textures  that is your texture your normal map and your   displacement map with a different texture so  and you just get the same result so you can   just make use of this one material and make a  copy of it and you know get the results really   quickly so actually you can do this using  the material instance but since we have not   created everything in parameters we're not  going to use that for now I'll talk about   material instancing in a different video but  for now I'm just going to copy and paste the   same material so what I'm going to do is just  right click or I guess just ctrl-c and ctrl-v   yeah just rename this one yes I'm going to  use a brick texture here so it's going to be material brick so I'm going to import   so I've got a couple of textures here so I've  got ambient occlusion brick a displacement brick   normal map and the texture itself so I'm just  going to import all these things in right now now where is my brick this is my brick material  double-click and it gets opened here now real   quick select this texture sample go to your  texture material expression texture based   so under texture just select this drop-down and  change this one to I guess it is a texture brick   ya T brick so click on it and go to my normal  map select it change this one to normal brick   and go to displacement map change this one  texture to where is DP DP break displacement   brick and in this case we have one more map  that is your ambient occlusion map so what I   can do is I'm just going to a whoa brick just  drag-and-drop it just gonna make use of that   also select it and just drag and drop this one  into ambient occlusion yeah so just move this   one outside a little bit that's it so click  on apply right now we have assigned the other   material that is our stone there is a ground  material now I'm just going to drag and drop   this one into this thing here now I don't  see much of difference in the displacement   so this is where we're going to use  that desolation multiplying stuff change the value to 0.2 and displacement  multiplier to 0.3 maybe point pie-ya now   you can see it just got displaced completely  so it's really cool guys so you just make a   one call one material and you can just make use  of it you can just keep adjusting these values   you can adjust the value of the normal Maps  you know it so it's just the values constant   values so click apply and save it so that's  it guys so that also just a quick tip and   you know you can just make one material and  just make a copy of it but you can actually   use material instances which we'll talk about  a tad in different or video so in case if you   have any questions and queries just comment  down below and I'll be happy to help you guys
Info
Channel: CG AURA
Views: 78,026
Rating: undefined out of 5
Keywords: Unreal Engine, Unreal, UE4, Unreal Engine tutorials, Unreal tutorials, PBR materials, Realistic PBR materials, materials in unreal, Materials in unreal engine, unreal engine 4, ue4 tutorials, photoreaslistic materials, photo realism in unreal engine, gaming, materials in ue4, materials, PBR, cg aura
Id: FXVnE1OyM6E
Channel Id: undefined
Length: 32min 32sec (1952 seconds)
Published: Sat Nov 09 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.