Unreal Engine 5 Beginner Tutorial Part 6: Intro to Materials & Textures

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
by the end of this video you will learn everything you need to know about materials like creating a material from scratch we'll even teach you all of their properties and then having access to them in real time in the viewport so that you can change their Properties Plus we'll even teach you how to bring materials from online websites create a material and then we'll even tell you about problems such as tiling that will probably happen when you bring in materials and we'll teach you how to fix it so stay tuned welcome back everybody you guys made it we are now at the chapters for the materials and textures and we are going to learn all the basics that's right and who's going to teach it you hell yeah am I getting paid yes you do by who by me and polyam the sponsor of this video that was good right that was PR good okay shout out to Paul the cam for sponsoring this video by the way this entire course if you will so I just wanted to start by saying congratulations if you made it this far materials are going to be such an an an important part of your 3D projects your 3D files your cinematics your Creations because just like in the real world everything as materials right your table is probably made of wood your wall is made of plaster right these are all different materials and what is the exact definition of materials so materials Define the optical properties of an object for example if it's made of wood metals or anything else so it's color how dull or shiny it is these are all the material properties exactly and textures according to Google is the patterns that goes on top of the material yeah that they break up the uniform appearance so in 3D files right here in onreal engine the material is what we apply right to different objects and within the material we have textures these textures usually come in as PNG files so we have a color texture a metallic texture if you're familiar with 3D software you will know what these are if you don't know we're going to show you all of that in this video so do not worry now we're going to be talking about the basic setup of materials here in on Dual engine so let's get started first things first we actually want to go ahead and go to maybe these TIE fighter blocks right here and we're going to use them just for the setup of some of our materials so that we can describe to you what materials are in order to create a material we have to basically save that material in our content drawer we have to create it there so we're going to open up our content drawer by hitting control space and we're going to create a new folder called materials so right click on your content folder new folder call it materials and boom just like that we've created a new folder inside this folder all we have to do is go ahead and right click and then look for materials right here right there's so many things you can add and you can basically check out all of these on your own you can look what they are online on Google we haven't used half of them more than half of them you're probably going to be using material not probably you're going to be using material in every single project so always know where it's located you also have the option to add it from here right so material boom and we are going to go ahead and name our material far can we give it a name box material maybe box material now in onal engine 5 usually if you watch any of the tutorials or if you've ever used it everybody likes to call their first materials the master material because in onal engine we have parent materials slash Master materials and you have children materials so child materials which are called material instances and these are Lifesavers they're amazing we're going to tell you exactly how you can use them to your advantage but for now we're just going to call it box material for Simplicity now how do we go ahead and apply one of these to uh one of these boxes drag and drop there you go so drag the material drop it on top of boxes and we've got the box material right it's gray it's ugly let's go ahead and change it boom control space double click oh my God what is this we got a new window to talk about let's go ahead and maximize this window so we can tell you exactly what this window is all about anytime you open up a material you're going to be shown this window right here and on the left side what you're looking at here in this window is your 3D viewport right this is where you get to visualize what your material looks like as you make changes to it on the right side right here which is your material graph now just like any other 3D software you'll be able to connect different nodes bring in new textures and make up any material that you like right here you can have thousands of nodes if you're a material Maniac we're just going to be doing a few noes the ones that you're going to need all the time and if you've never used nodes before we're going to teach you how to do that too so don't worry when you want to uh move around the 3D viewport right here you have to use different controls so here it's left Mouse click to rotate around this spherical object and zoom in and zoom out using your scroll button just to see what your material looks like and it updates the moment you go ahead and create changes right here now on the bottom left side we have a details panel and this is very similar to the details panel right here so if you go ahead and select anything in the material graph you will actually see the new details panel pop up that you'll be able to use to make changes to an exact node on its own so the first node that we always are going to end up with is going to be our output node right this is the material the overall material node that everything comes to right all of the nodes that we create will come towards this node to Define what our material looks like so fire we got a bunch of names here and these names are the same pretty much the same in other 3D software so if you're coming from Cinema 40 blender Maya 3ds Max you will know what these are but if you don't know let's have a quick recap of what every single one of them means starting with base color so what is base color the color that your material will have the RGB color right so RGB color can be confusing if you've never studied photography and all but RGB is basically red green blue these are three planes that combined together can make up a color right and we are going to be basically using those planes the RGB values to create a color and to enable a new node to create a new node we can go ahead and use right click to basically search for anything that we want if you don't know what you're looking for you can use these drop downs to find out exactly the note that you want and there are thousands of them are we going to use any of them no way we haven't used 95% of these there's just way too many you're going to be using only a few of them all the time so that's what we're going to cover today so if you want to bring any of them you just click on it and it appears in your window and then you can move it around your scene we're not going to need this so we're going to delete it and one more thing before we actually bring in any note if you want to move around this tab right here you use right click and that's going to grab the screen and you're just moving around and then scroll to zoom out and scroll to zoom in yeah so we want to bring in an RGB note the shortcut for that memorize this is three left click so look at this right here three left click boom just like that yeah easy three left click you can do it many times just to memorize it right and what we're looking at right now is basically an RGB node and RGB will have three values right 0 0 0 at this moment which means it's absolutely black and we have four nodes that can be popping out of this exact note which is our overall note which combines the RGB that's what we want for our color and then you have the red on its own the green on its own and the blue on its own for our use case we're going to need the overall cuz we want to use the color and farod what do we do now connect the overall to base color connect it by left clicking drag it drop it on base color you'll see the check mark Let It Go and just like that we have it on so right now it's black so there's absolutely no difference fot can we change it to another color let's change it to Red how do we do that click on the black box over there we're going to double click on this right here and we're present it with this color wheel we can go ahead and change it to any color that we want there are just way too many things that you can play around with to pretty much Define the specific color that you want you can even use the ey dropper tool or you can go ahead and bring in an hex value from Google maybe you have a specific image you're looking at and you're trying to create a specific color you can use that exact hex color code so let's just go for what color did you Sayed color red color okay cool we got a red color something like that and then we're going to hit okay so we can see that the material has changed and if you go ahead and drag the tab right here however we do not see the change happening here why is that apply it bro apply it we got to apply it right so every single time we make changes here we have to go ahead and hit apply at the top left to make sure it applies to our scene so hit apply a voila we did it done congratulations guys we made our first material so this is basically how you change the color right very simple so let's keep this tab right here so that we can see the changes happen in real time I'm going to drag this guy right here so you see our Mouse clicks now the next thing we're going to change is the metallic value the metallic value now the metallic value and the specular value and the roughness value and we're going to describe what they are all use a single value they're not your RGB they don't need three different values they're just one so what's the shortcut for that uh one one yes and left click so one left click that's your shortcut to basically bring in a value a single value a single number and we are going to hook this into our metallic right the same way we did the base color now before we go ahead and apply farad what does metallic do so it will show you how metallic your material is whether it's fully metallic or it's not or something in the middle something in the middle will be between zero and one that's the value right so if it's at zero and if we hit apply nothing will happen really because our material was not really metallic prior to this but if we go and change this value to one we can change it from here or from the details panel right here so change it to one hit apply you already see the difference before we hit apply right here let's go ahead and hit apply and see it boom just like that our material is now a little bit more metallic right you see how it reflects light it's very different the next thing we're going to change is specular so how do we change the value same you contrl D duplicate our value node and then connect it to specular contrl D to duplicate or use one left click right and then we can go ahead and insert it into our specular so what is specular how shiny our material is how smooth our material is so we actually have the definition right here as well do not use Microsoft Edge we're only using it because our Chrome is filled up but basically a specular is basically the highlights of your mesh right how smooth it is and that is going to change the way it's going to show highlights on the material so right now I'm not sure how much this is going to be visible because our material is really plain remember we don't have textures on it so it's not going to be really clear but it's still going to be enough let's go and change our metallic to zero this might be easier to see and our specular sorry it's okay and our specular to zero as well and see what our material looks like so this is it with zero value so zero metallic zero specular you can even see this ball right here and see what happens when we change it to one specular of one do you see the difference in the highlights see Zero no highlights one highlights hit apply see the difference yep you can actually see the difference it probably would have been easier to see it on a sphere in the scene but that's okay okay you get the point now the next thing we're going to change is your roughness duplicate again do it again duplicate again and we're going to hook this up to our roughness a roughness of one which means our value our our material is going to be super rough super dull so hit apply probably going to take away from the shininess right now far this is going to be my favorite part let's make it zero let's make it zero see what happens boom now we got this glossy material that is reflecting light and so we can see are seen inside this Cube on top of the cube if you will it's like a mirror it's like a mirror exactly now if you see if you look closely by the way you'll notice that our Reflections look kind of horrible and that's because of some of our render settings and we're going to talk about the render settings later on to make it look like perfect and make the reflections great using rate tracing that's what we talked about in the very beginning of our chapter one we're going to talk about that later when we get to the settings so don't worry it's going to look really good later on now the roughness specular metallic base color we've already shown you so the next thing we're going to change is our emissive color this is basically saying are we emitting any light from our material one of my favorite nodes so we are going to be using first of all a three node that's going to be our RGB to decide what color the light is and then later we're going to teach you how to actually increase the intensity to make it emit even more light cuz materials can emit light and then they can be dynamic in your scene very cool so let's go ahead and bring in what a three an RGB a three node so three left click just like the top we're going to take this drag it to our msf color and right now it's on black so it's not going to do anything hit apply it's not going to emit any light if you go ahead and double click this change it to White that's red change it to Red no it's already red I don't want to do that I want to see the difference okay so I'm going to change it to White and hit okay and see the difference okay hit okay boom apply t look at that it's already emitted light and it's not a lot you'll see you see if i contrl z look at this contrl Z and I'm just going to okay if you want to disable a note it's control click on the line that is connecting the note so control click this note right here so make sure it's highlighted control click and then let go right that's how you disable a note break a connection and then see this light bouncing off this Cube It's going to go away hit apply boom off so it was actually emitting light now do we want to go ahead and talk about how we can control the intensity of the light here we can do it okay perfect so if you want to go ahead and connect this again okay let's go and since I I wanted red let's see what that looks like hit apply so right now there's a bit of red the color changed because it's now red as a base color and also an emissive light on top of it so it changed to sort of like a pinkish red if you want to go ahead and increase the intensity we're going to be using a multiply node a multiply node that's going to allow us to hook in a value to control how intense the light is so this is going to come in real handy in a lot of situations so memorize this so how do we bring in a multiply node right click search multiply or do you have a shortcut for do have a shortcut so let's do it let's do it your way you're absolutely right it's m but let's do it your way so let's go to multiply and hit okay so that's a multiply node or you can do that shorter M left click for multiply okay very cool so up until now you've learned three right three left click one left click and M left click so everything we just learned can be done really quick quickly trust me that's 50% of the nodes that you will lose really really and once we have the multiply node okay we're going to bring in also a value node which is one one okay to control the intensity so now we want to just combine the emissive color plus this value together so we're going to hook this now into our a so one of these values and then we're going to hook this into the B and now they're combined they're multiplied together and now instead of this connection we don't need to break it we just need to replace it it will automatically place it instead of the old connection so take this multiply note put it into emissive color and right now it's there so the value is right now zero so hit apply see what happens no emissive change it to one it's going to be just like before change it to three change it to three it's going to emit even more light look at it boom boom wow it's going to emit even more light change it to 55 it's going to turn white because you much yeah too much light that's exactly what happens change it to 55 boom look at that and then we have these blotchy lights all over because right now we haven't changed our render settings and that's why we're getting this weird lighting artifact we're going to fix all of that later on but just showing you that we're actually emitting a lot of light if this was by the way path Racing for all of you 3D nerds this would look perfect because we're using Lumen it's not Lumin and path racing we're going to describe later on in the rendering chapters don't worry okay change this back to one apply and save so fire what do we have next material instances let's see how we can use them okay perfect so right now we have a parent material right this is the original material that we created let's say okay we created this one material and we're a pro we have thousands of nodes or not even thousands we have like 10 more nodes here and we don't want to go ahead and create a new material for every single different color that we want we want to use all of the properties of that same material maybe the normal map the specular the roughness is the same but we just want to change the color right we don't want to go go ahead and duplicate the material five times and then go and change we just want to create a child material from the parent material and make changes to the child materials and the reason for that is also because we'll have quicker access to the child material parameters inside the engine right here without having to go back to the material graph right and you'll understand exactly why that's going to be useful in a moment so we have this box material I'm going to change a name to box master or short will be mm so master material uncore box right this is going to be Master material box and we're going to apply this make sure it's applied and then we're going to create a child can you turn off the emissive for this mm box sure I'm going to turn off the emissive just make it zero I actually I'm just going to break this connection for now okay control click break the connection okay cool hit apply and save so right now I have this value and one of the things that's really annoying is that every time I want to make changes I have to go back to the material graph and I hit apply we're going to change that using material instances so this is MM box we're going to create a child material or material instance by right clicking on it and creating material instance okay it's already created an mm box instance with the name and we can just hit okay we're okay with that so let's replace the instance material now on top of the cube change it so drag and drop so that it's using that material so that it's not going back to the parent now if we open up the material instance we're not going to be seeing a material graph we're going to see what the material looks like and just a bunch of options here telling us how to find the parent material so it's just leading us to mm box if we look for it using this button which we already learned at an earlier chapter we'll find a parent material so what's the use case of it right now if you want to change the color or other parameters we can go to material master and then set them to a parameter and then come and change it here absolutely and that's the best freaking part about unal engine materials so let's go back to the parent material and we have to make some changes this is just like coding if you're a developer you probably know how this works in writing a code we can go ahe and change all of these to parameters simply by right clicking on a node right not all nodes will allow you to do this it really depends on what kind of node it is but all of this actually work with parameters so right click convert to parameter if you convert it to a parameter it's asking us for a name now because we need to look at the name in the instance and actually be able to Define what this color is used for so this is our base color right base base color cool and then these guys they need to be changing uh they need to change to a parameter as well so right click convert to parameter this is metallic this right click this is specular specular and this one is roughness okay let's not talk about let's not talk about emissive yet let's just keep it simple simple hit apply and save nothing's changed but if we go back to our material instances now you see all the values now we see all the values and check this bad boy out so we're going to save make sure everything's safe save at the bottom right so in case we crash we are going to check these guys just to say okay we want to start using these right now we have converted to parameters so the moment we did that they appeared here we're going to check our metallic check our roughness which means we want to start changing these values and then check our base color open it up guess what now we can update all of these values in real time and see the difference without having to apply anything so let's go ahead and change the metallic value o or maybe the roughness wow or maybe the specular right which is not going to make that much of a difference right now in this in this in this Cube it it was a sphere will'll see it or Farah what about the color less than is to Blue boom right done now why is this useful check this out so I now want to make this also a cube of similar properties with a different color I'm going to go ahead take my master material create another instance right call this m mm box instance but I'm going to call this yellow yellow I want this to be my yellow and then you can see at the bottom left it says material instance right these are my instances this is my material I'm going to drag and drop this guy here right I'm going to make sure I change this instance to Blue so I know this is my blue color blue right sorry that's blue te blue blue BL so this is my yellow drag and drop just want to make sure it's correct and this is my blue so now without going to my master material I can open up my yellow right check these guys again and then I can now set these values independent of the first one I can change this to Yellow is that yellow that is yellow yellow and I can make it more metallic make it more rough and just like that I didn't have to go and create a whole new material go and keep updating the material graph here I have all of those accessible within the material instance and that is why material instances are so freaking powerful now one last thing I just want to cover since we did play with the the emissive we can go ahead and hook this up now into emissive and the changes will all go through all the instances right because they're all children of this parent material let's go ahead and convert this to a parameter call it a color right and then we're going to change this also to a parameter call it emissive intensity strength or intensity both of them work and then hit apply and save both of them will and now both of them shine bright yes have an emissive because it's default at one let's change a default to zero because we don't want it to emitting light maybe I only want one of them to emit light I want the yellow to emit light so now I have this extra option for my emissive color and an extra option for emissive strength I can go and change emissive color color to also yellow and then increase that value right here and see it react in real time baby congratulations that was the texture and material hold up did you guys know you can speed up your workflow by using poly Cam's photogrametry instead of modeling and texturing yeah you just snap a couple of photos a voila plus your objects will automatically look photo realistic because they're actually real shout out to poam for sponsoring this course and giving you guys 30% off the Pro Plan promo code and Link in the description but what if we want to bring realistic textures from the internet that's actually a good question because most of the time we're going to be doing that we're probably not going to be creating a simple material like this so let's say you want to bring in material from outside what we're going to do is use one of the free materials of textures.com so shout out to these guys we went ahead to their free section you can go ahead and do the exact same and then we looked for this material right here which said says sci-fi panel so we went on top of the S sci-fi panel and then we went ahead and downloaded the 4K version of all of these different Maps right here except the height map we didn't need that and we'll explain why in a moment so go ahead and download the 4K 2K 1K version the resolution is basically defining how good your materials look how detailed they look if your computer doesn't have the storage or the performance capabilities you can go ahead and download a lower res version so once you download them we're going to go ahead and find them in our content browser on our computer right we have it located right here and what we have to do is simply open up an our content drawer we're going to create a new folder call it sci-fi panel no let's call it textures.com I don't check there's no dot textures from internet stupid hor name stupidest name but it's okay and then we're going to go to to our folder right here and we're going to drag and drop all of these into our content drawer really as simple as that right they're just going to pop right in control space and we see all of these right here you can go ahead and double click on them to see what they look like and their properties are going to be here you can even change some of these values I'm not going to go ahead and do that we don't need that right now so once you have these textures loaded we need to go ahead and create a new material to load them in and connect them to the right nodes so let's go ahead and create a new material we already know how to do this what are we going to call it SciFi panels right and we're going to open up the material and we're going to maximize this right click to drag to the side and I'm going to put this right here so we'll see and then control space to open up the content drawer let's drag everything shift select everything and then drag it into the material graph now we have too many notes so let's go and separate them just so we don't get confused by what they are and what they do and if you forget what each of these maps are we can go ahead and look on the very left side once we click on them to see what they are so if they're very small go ahead and enlarge the space so you'll see what they are for example this is my metallic map this is my AO I'll explain what that is in a moment my normal map my roughness map and my albo starting from the albo these textures as we talked about already come with all the details so you don't have to go and create an RGB value or even a a single float value to go ahead and control any of these you can go ahead and alter them if you like but by default they come in exactly the way they look online when you downloaded or purchase these textures so starting with the albo fire what is albo the base color that's the base color that's just another word for base color right so in order to hook this in we're going to use the RGB value base color and we can already see the difference right here in this sphere so first things first I want to talk to you guys about the bottom right corner right here you can actually change your view viewing mesh it can be a sphere it can be a cylinder it can be a plane sometimes that helps it can be a cube or I think this is going to be really cool for when you have a specific mesh if you have let's say I don't have anything right now to show you guys but I'll just tell you theoretically how this works if you have a specific mes like a spaceship that you want to go ahead and use here in the material viewport you can basically use this button right here as long as you have the mesh selected in your drawer you'll be able to switch it with this button and it will change to that specific spaceship we don't have it right now we only have cubes so it doesn't work but it's good to know so moving on I want to go ahead and actually apply this to my scene so you'll make sure to see the differences so if I let's go ahead and do that let's go ahe and take this scii panel let's apply it to this guy right here so at first it's gray why apply apply baby got to apply let's go hit apply and boom boom we have the Sci-Fi panels on top of the cube but but it's still lacking a lot of detail right we need to connect other Maps we need to connect the other Maps so in order to do that let's first see what this one is this one is the's see should be roughness roughness map so roughness will go into roughness so you guys will come here you're going to go to roughness roughness to roughness hit apply and see what happens boom immediately it got more shiny more shiny perfect okay so the next thing we're going to need is the metallic so this is metallic I'm going to look closer metallic map right perfect so metallic will go into metallic right here RGB to metallic and then let's pay close attention to what happens to the sides right here to these guys when I hit apply boom already turned metallic right and if you want to know exactly how this works let's double click this texture image see the white areas that's the one value value of one that's where the metallic surface is and anything that is black is not metallic the same thing applies to roughness and specular by the way and then the next thing is your normal map so remember how we talked about normal map giving fake detail right so if you H hook up the normal map here let's go closer to these dots like right here yeah so right now they're just flat dots and this is a flat Cube it's just one plane but see what normal Maps do hit apply boom Oh do you see that fake detail we haven't changed the mesh the mesh is still the cube but we got this fake detail on top because the normal map says Hey I want you to bounce off Lighting in a different way when you hit that specific spot because of the normal map and the last map we're going to talk about Here Is AO which is ambient occlusion absolutely ambient occlusion ambient occlusion if you open it up is basically the occlusion means blocking things out so ambient occlusion usually if you look at a floor sorry a floor and a wall in the very Corners you'll see a dark spot because light is not reaching it and so it's it's it's slightly dark the darkness in the corner gives you the sense of realism so when you're missing that in CG that's when you can tell if something is fake and not real not photoreal so ambient occlusion helps you with that photorealism and so we're going to hook that in it's probably going to be a very minute difference I don't even know where it is it's probably here in these dots right here so let's pay close attention RGB will go to ambient inclusion hit apply yeah it's it's it's it's very minimal sometimes the the difference can be a lot so hit apply all right perfect now fire hot do you know what happens if I go ahead and stretch this Cube your texture would be stretched right yeah so let's go and do that so let's go and scale this oh that's ruined okay so in order to fix this we need to go ahead and control the way these uh textures are tiling on top of our mesh and the way we do that we don't want to get too deep into the concept of it but basically it's using using UVS right here each node has that each texture has UVS and it's basically how they're wrapped around a mesh so in order to control this tiling we're going to be using a setup that is already created for us in Unreal Engine you can manually do this we're not going to do that cuz why do we do it if it's already there so right click look for tiling MF tiling so if I search for tiling I'll see MF tiling multiple times just use any of them they still work bring it in and all we have to do is connect the result node into the uves of all of these nodes and hook it up hook it up hook it oh hook it up we're going to do the same thing for all of these guys hook it up and one last one right here okay cool so hit apply and save now this hasn't changed anything yet we have to go and change the values but if you want to see what this is actually doing we have to click this right double click it to see what MF tiling is there's a whole other node graph just for MF tiling but this actually works like how we created a parameter so in order to change these values we have to create a material instance to access the numbers so let's go ahead and do that save and then let's minimize this let's go ahead and create a material instance right here and the name is fine let's go ahead and apply this now to our Cube we can see on the right side it's applied and if we go and open up the material instance we haven't converted anything to a parameter but because we brought in MF tiling this one automatically comes with parameters which is why if you go ahead and turn on tiling offset which is what we want and what we hooked into our UVS we now have access to tiling X and tiling y by changing these values we're actually going to be changing the tiling so now we can make this huge sci-fi panel which is really cool or reset this value um to one and then we can go ahead and maybe play with this right pull the Y to larger number and now we have I think successfully created proper tiling what do you say far yeah I think it looks good perfect okay and I believe that brings us to the end of the basics of materials materal so right now you know how to create a basic setup for a material and you know how to create tilings so that your materials are not stretched in the next chapter we are going to use this knowledge and put material and texture on our spaceship right so we're going to go more advanced so if you're ready for that go ahead and get yourself some coffee and let's start with the next chapter click the video right here
Info
Channel: Bad Decisions Studio
Views: 23,470
Rating: undefined out of 5
Keywords: unrealengine, unreal engine 5, unreal engine, ue, ue5, Unreal Engine Tutorial, Unreal engine for beginners
Id: Sic_goW0bPQ
Channel Id: undefined
Length: 33min 31sec (2011 seconds)
Published: Wed Mar 06 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.