 Hello there, you beautiful 3d artists, right, so we're back. It's time for another step. So let's have a look in This step what we're going to do is take a look at tessellation So as you can see I've dropped back into the first person example map just to show you this effect in isolation So on screen, I've got two of the rocks that we created the one on the left This one here. He has no tessellation and this one here has tessellation and can displace as we get closer to it So as we run in let's just click in here as we run in you should see That this rock becomes a little bit more jagged is get it gets more of an outline on it Okay, so you should be able to see as we walk around it It just looks more jagged and that's the displacement that's doing that So what I'll just show you is what that looks like in wireframe So you can see the one on the left is made of very few triangles and the one on the right has lots and lots Triangles and that's happening dynamically as a result of this tessellation so as we move back you should say that those triangles start to disappear and The the number of triangles looks about the same and as we get closer The triangles are splitting to smaller and smaller triangles and it displaces and starts all like that So in this video, we're going to look at how you go about setting that up Okay, so here we are now back in the main level that we've been building and I'm going to use this Displacement effect on these three rocks here that create this little cluster to make them look a little bit more interesting As the player runs towards them if you wanted to you could just change the shader over on the rock in the static mesh editor And that would change it for all of them But you need to keep in mind is that this tessellation can be an expensive thing to render So you should use it sparingly and where you're going to get a lot of impact out of it Okay, so we need to do then is we have our rock material and what we'll do first of all is Create a copy of that so that we can work on that without breaking the original So let's right click on here and we'll go to duplicate Now this for me is going to be called M underscore rock 2 because I've already done this once just to make sure it was all working So there it is M underscore rock 2 and we will open that up Here it is and I'm just going to ping that into my docking area So this is the material as it stands So I'm just going to get all of these parts that make you up already and just move those up a little bit So I'm going to put the displacement stuff down here So let's get into it right so the first step here is to have a look here We've got world displacement tessellation multiplier these currently aren't available So that the base node isn't set up to have any tessellation So what we're going to do is change that so click on the node and we're going to scroll down You have to scroll down quite a long way until you find the tessellation section and you can see that by default no tessellation So let's open that up and for this one We're going to try flat tessellation if you want to have a go at PN triangles then knock yourself out But for today, we're going to do flat tessellation And then you can see that the displacement and the tessellation multiplier become available Okay, so the first thing I'm going to do is just put a node into the tessellation multiplier So I'm just going to have a scalar parameter So that we can change this later. So I'll put that into the multiplier. We will give it the name of tessellation multiplier so that I know what that is later. The default value is going to be five No, maybe zero point five And I'm going to leave them in a max alone so I can just have that whatever I would like it to be So that's that bit done. We'll just put that there and now we've got to get into this world displacement to get that going Okay, so one of the first nodes that we need is called a vertex normal W s node. There's a little chap here and He needs to go into a multiply It's going to be in the a of the multiply and the output of this multiply is going to be the thing that we plug into the World displacement, so we'll pop that in there and then into the B We actually need to do a couple of other things. So we're going to need a texture sample Which is right here and this texture sample is going to be Displacement that I put in with the texture files that you can download So we're going to have a look in here and search for rock and there should be this rock displacement That's the one we're going to use for this Okay, there we go and what we need to do is actually multiply this by a number and that's going to be based on how far It can displace out from the original mesh So we're going to put another scalar for that and this one is going to be called tessellation distance Like so and the default value for that one will have it five and then we might want to change this later in fact, let's just set it to 15 so that we're definitely going to see something happening and then These two values need to be multiplied together and put into B of our original multiply So let's just get this out of here and get a multiply Groovy and then we're going to put in The texture sample into a and the distance into B Yay Okay, so that should be it all set up. Okay now so for the sake of neatness. We're going to put all these nodes together Select them press C on the keyboard and we're going to call this displacement So that if we ever come back to this material like what are all these doing? We will know what they're doing. So Let's move that down there a little bit. That's now good to go So we're going to save this material and now that's saved we're going to go back to our level and we're going to create a Material instance so that we can change the parameters on that So let's right click on this rock to that we've created or in your case It'll be called rock one and we're going to create a material instance from that So I'm going to leave that M underscore rock to inst and This will be the material that will apply to these three rocks So with that selected in the content browser What I'll do is select a rock and then on the material slot here I'm just going to click on the little arrow and that will swap that over and you can see straight away The outline of that change so that's already displacing and Then we'll do the same on this one here and then the last one So that's already working really nicely. So what I'll do is just test that out. So I'll go into play and As we run towards it We should be able to see that it gets a little bit more jagged and this is actually all I would really do with it It's quite subtle and I like it that way But you could really push it so that you can see that it's happening But just to prove that it's happening if we go into wireframe mode by pressing F1 We can now zoom and you can see that it is subdividing the number of triangles Which is good as we move out They get lessened in and out in and out So it is doing its job exactly as we wanted it to but if you want to see the effect of that happening a little bit more What we can do is open up the material instance We'll just make it so that we can see this and the rock and if we open up or Enable these parameters that we set up And let's just make this a little bit brighter So we can see what we're doing what we'll do now is Mess with these parameters. So if we change the distance, I think the top one is You see that now it displaces more so you can go like too far with it like that not good but if you keep it sort of Reasonable you can have it add a lot more variation to the rocks than we had previously and then if we change this multiplier You won't see much happening, but what that's doing is allowing it to subdivide into more triangles than it did originally So I'll show you that happening in wireframe mode, and if we change this multiplier here You can see that that's allowing it to use more or Fewer triangles. So let's make it go just as far as that Like that and then we'll save this instance And we'll give it another test when we press play So now as we get closer to these rocks, we should see that they are a little bit more jagged And look more like rocks. So that's working. Well done. Okay, so that's it for this step Thanks for watching, and I will hopefully see you in the next video Thanks for watching If you really want to take your learning further than I can cover in this series Then I highly recommend checking out plural site They have loads of really detailed video courses covering game art and game development using Unreal Engine 4 When I learned how to use unreal a couple of years ago This is where I went and I log in regularly to take a new course and improve my skills I recommend checking out the introduction to Unreal Engine 4 course by Joshua Kinney This is really good and offers a good overview of what you can do in unreal You can get a free 10-day trial by using my link in the video description And you get full access to all of their courses for that time at the end of your 10 days You can either subscribe for more or cancel totally up to you It's got to be worth a free trial though, right? I'd like to say a massive thank you to my patrons Your support helps me to keep making videos like this one And I really appreciate each and every one of you It really blows my mind that people will support my channel and my work by pledging their money through Patreon So again, thank you all so so much If you aren't already a patron and you'd like to have your support then please go to patreon.com forward slash Shane Whittington