Brushify Bootcamp - Landscape Tessellation in Unreal Engine 4 [Free Tutorial]

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] what's up guys Joe goth here creator of brush if I die Oh welcome to another episode of brush if I bootcamp in this episode I'm going to be talking about tessellation tessellation is a really expensive feature so it's one that you need to really carefully consider whether or not you actually want to use it in your game if you really think that desolation is required and you want to get lots and lots of detail out of your landscape and stuff like that I'm here to tell you that brush if I is fully compatible with tessellation and it's actually very very simple to activate in this tutorial I'm gonna be showing you how to create a puddles layer and also how to turn on tessellation with brush if I if you guys like tutorials like this and want to see more in the future make sure you subscribe by hitting the subscribe button below and taking the Belle notification icon that just means that you'll get notified whenever I create a new video you can also go to WWF Ida io /boot camp and that'll give you that'll put you on the mailing list and that means that whenever there's a new sale or a new product coming out or a new tutorial you'll get an email notification of that too so I hope you guys enjoy the video and let's get started so this is where we got to last time and as you can remember we created a custom paint layer with roughness on it so yeah roughness is a really cool effect because it lets you put a bit of wetness and realism into your materials and yeah so what I thought I'd do this episode is take this sort of a step further and create a slightly more advanced material with this sort of rough wetness effect and also using tessellation and we're sort of going to combine roughness and tessellating together to create a new material that uses that there has actual puddles in it that you that has reflections so just a little side note if you don't actually want to follow the tutorial and you're really just interested in seeing a sort of example if you get the latest version of brush' fie the puddles layer is actually included and you can just use that to simply paint down the puddles which are the sort of result of this tutorial and yeah then you'll be able to you know see how those are set up and I'll obviously ultimately turn on tessellation and use those with the material tessellation is actually not turned on here but later I'm going to actually show you how to enable it and use it sort of in conjunction with with this with this pane layer so yeah I'm with the tutorial so yeah let's get started so I'm going to go to my content menu and we're going to go to materials and the very first thing that I'm gonna do is I'm just gonna take the mud layer and that's this one right here that we've already got painted down and I'm just gonna start by duplicating this layer and I'm gonna call this one puddles and I'm gonna do the same thing then for the mud normals and instead of mud just call it puddles and then again the same thing just duplicate for roughness puddles I'm just gonna remember to delete the one every time to do it on the normals and then last one is height poles okay so now you should have basically four newly created material functions for the base color the height the normals and the roughness I'm just gonna right click and go save with those and yeah so I'm gonna open up the MF puddles material instance material function sorry and inside you can see this is now just the duplicate of the mud layer and you know just like before we've got global macro and tiling global macro and tiling textures that are in there and those are the level of detail textures so we're gonna change the close-up detail texture to a different texture now I've actually already made the textures for this puddle layer and imported those so they're inside the textures puddles folder and I'm just going to go through these and kind of explain how they work so this is the first texture it's basically just a mud texture where certain areas of it I've kind of made dark and these areas are going to be the puddles so actually had a really nice texture that I captured that had some of these puddles existing inside of there and I just used Photoshop to kind of create a layer and kind of mask out where I really want the puddles to show up and then just make them dark in the diffuse in the albedo texture and then yeah I actually got that in the mask information from the height map here and that's what I actually used to create these kind of splotches in the diffuse in the albedo and yeah and basically yeah that that's really very useful and I also used that mask on the normal map and you can see here that where the puddles are I've actually removed all of the normal information to make it completely flat and that's because you want the surface of the water not to be very rough like this and have a little bit slight refracting in different ways and reflecting off the surface in different ways you actually want the the puddled areas to become very very flat so yeah last but not least is the roughness texture so for just open up that so you can see that again I'm using the height map as a sort of mask to create the puddles and just make those really really dark basically the whiter areas are more rough areas and the darker areas are more polished areas so we want the puddles to be very very very polished so they're almost black and yeah I literally just took this height map and then sort of crunched it down in Photoshop and applied that as a mask onto the roughness texture so yeah and those are the sort of four main textures those are the four sort of changes that you're gonna need to make to your textures in order to get that sort of puddles effect and you know get it looking get it looking cool so I'm just gonna go back to the content browser and I'm going to open up the MF puddles and the first thing I'm gonna do is I'm gonna replace the detail texture here for the mud with the puddles detail texture and then that's great and then the other thing I'm gonna do is I'm going to switch from mud normals to always the you know all of these the puddles normals so puddles normals puddles roughness so it uses those instead of the mud ones and height and yeah that's basically everything I need to do in here so just hit save and that's the base color material function done and then I'm gonna open up the height material function and I'm gonna go then go to the detail texture again and same thing I'm just gonna go to my puddles textures folder and then replace out the height map and then hit save great so that's that done and same with the puddles normals you know these are just very very simple just switching out the textures for from mud to the puddles textures and just hitting save every time and this is just a you know really easy way just to like switch all of these and hit save okay fantastic so that's all of the material functions done and they're all inside of that functions folder materials folder and yeah we can now start to hook this up with the landscape system just like we did in the custom paint layers tutorial so we go landscape functions and we open up MF landscape layers and yeah this is the super important place where all of the landscape blends and materials are defined in Russia Phi so we're going to go to the base materials and we go layer blend and we're gonna add a new layer and we're gonna call this puddles and we're gonna take yeah we're just gonna take the mud one mud flat material function copy paste it switch it for the MF puddles material function put that last in the list and we're going to connect the diffuse output to the layer okay great and for the slopes we're just going to add a new layer blend again call it puddles super simple and then I think one the slope we'll just use the rock because we don't really need anything else there and then once that's done so yeah you should have your slope connected and your base color based materials connected don't need to do anything on directional so that's everything done so it's all hooked up to the system and hit save and that's going to apply it I'm just going to close down that give it a bit of time to sort of compile through a bunch of the shaders the shader compiling will be much faster though depending on you know how few materials you've actually used okay great so now it's compiled I'm gonna go up to landscape and then paint now if you get something like this where it's not found what the puddle it seems to have like added something or if it's just completely missing just try to do this try either going off and going back on again if that still doesn't work go to your yeah and just any of your kind of materials yeah any of your materials or just kind of make it make a change somewhere and hit save again and it'll just of reapply the material and yeah just just try compiling the shaders again because it just takes some times the system's a little bit slow and just takes a bit of time to to catch something so yeah you can see now it's actually caught a layer info the layer blend here and actually it has actually come through into the interface it's just something slow about the way that it initializes that okay so now I'm gonna try painting down this new mud layer and yeah you can see that there is actually a really cool it specially found a really cool usage for this texture so so let's explain exactly what's going on here so we haven't got tessellation turned on yet but what is happening is it's looking really cool and kind of bumpy because we've got lots of information going on in the normal map and we've got and we're making use of the reflections in the puddles themselves using roughness so if I go to the roughness so here you can actually see that the roughness map actually contains the sort of information and you can see that you know the puddled areas are really really dark almost black and so sort of fully reflective whereas the sort of muddy areas are you know a little bit rougher and yeah that's what really creates this nice sort of reflection effect that lets you sort of see real reflections in the puddles and actually I can take a you know cube or something and you know you know a real object in the world and I can actually see the reflection of that object through screen space reflections inside the puddles I also love how this works with the I just grab a mannequin character's mesh mannequin and just drag him into the scene and you can also sort of see the the a player or a mannequin basically like reflected in the reflected in the puddles so if you see that right there so yeah it's really cool adds a lot of realism to your landscapes you know when you've got really really detailed textures like this on the ground just add so much you know just a little bit more extra realism and yeah so getting to the point of this tutorial tessellation so how can we make this even crazier so we've actually got a lot of detail already coming out from the sort of normal maps from the roughness but I think to take it to the next level we really want to make it so that this isn't just a flat texture you know if you look really close it's just a flat texture all of this kind of detail and bumpiness is coming just from normals so yeah let's make this a little bit more next-gen so yeah to enable tessellation the very first thing I'm going to do is I'm going to go to the content browser and I'm going to go to brush if I materials landscape and I'm gonna open up M underscore landscape so this is a sort of you know kind of main brush if I landscape material there's a lot of stuff going on here we've got sort of flow Maps directional mapping we've got you know derive specularity we've got all of the sort of blending that takes place between other maps and this isn't something that you need to fully understand you know this is this was basically months and months and months of work you know and years of development to kind of get to the point where this is set up in this certain way but yeah we're really what's important to you is just this little node right here so if you look that the there's a there's a parameter here called world displacement and tessellation multiplier those are actually grayed out right now but you can see there's actually an input called MF underscore tessellation and that is a material function for tessellation which is basically you know it's taking the output of the layer blend from the you know that really important MF landscape layers material function where everything's blended together and it's taking this output world displacement and it's putting that inside of this material so in order to actually enable tessellation all we need to do is just click on the main MS Gold landscape node and you just want to scroll down right here and you want to go to tessellation and hit note instead of no tessellation you want to change that to flat tessellation and just leave everything else the same of course you can play with the other settings on here but the defaults are perfectly fine for now and then just hit save and I'll also just apply that change to your landscape material this might take a bit of time because it has to sort of recompile a few settings and things so yeah and the next thing to do is while that's compiling let's just wait for that so that's actually gonna that's going to turn on the tessellation in the actual shader but it's actually not enabled by default in the material instance so you can see that your landscapes actually got the mi landscape material instance applied to it and that's right here in the folder usually right next to Emma's go landscape so we've enabled it in the EM landscape but now we need to actually open the mi landscape material instance this is just a little material instance that the actual terrain uses and it's the one where all of the settings are kept for the terrain so this is the one you're actually you know I'm gonna be using it to kind of modify settings all the time and yeah you can see here that there's actually a parameter here and naval tessellation and that's actually untaped so yeah first step is of course in your landscape make sure it's enabled flat tessellation and then in your material instance make sure you enable tessellation and then that's gonna compile a few more shaders but if you look now we can actually see we've got some bumps going on on the terrain which is really cool and this effect is you know it's one of those really yeah it's a really cool effect and then you can actually tweak that effect inside the material instance as well I'm just gonna make this a little bit smaller and you can see there are options now for height so if I mean that like 12 you can see it's kind of if make it really extreme whoa it's like turning them to mountains the default something like 2023 so 23 I think about maybe 12 is good for for what we've got here we don't want it to be too crazy and yeah and you can also tweak this offset here as well this is actually just the amount of offset you cut you've gotta be careful not to go too high with it because if you go too high way that you can get some artifacts like these little cracks so usually best to keep the offset as as low as possible in order to you know not have any glitches and stuff but yeah you can usually find you know a very sort of sweet spot that both looks good and you know has has the right settings there are also of course options for the optimisation so if we go up to the wireframe you can see there's actually a ton of optimization going on in the material here so as I sort of move towards the landscape you can see that it's kind of tessellating more and more and more and as I kind of move away though the detail is then being reduced and it's going back to being a normal landscape so this kind of optimization is super important because it means you sort of get the best of both worlds that come close you'll get these amazing little bits of detail and then as you can the player gets further away that terrain kind of refers back to normal and becomes you know very cheap for the GPU again so yeah it's it's a very important effect and yeah of course you can tweak that optimization right here so if I change Nia tessellation this is just going to change this sort of amount in [Music] in the foreground and then there's also far tessellation so you can see this actually changes how far back this tessellation is going to affect the terrain so if I move all the way back here it might be easier to see this you can see the back there there's actually still tessellation going on whereas if I change it back to the default it's now it's now not good anything applied let's just exaggerate that so it's a really really crazy example now you can see just what's possible you know by tweaking this distant amount but if you really you know if you don't want to play with the optimization too much if you if you just want things to look good I recommend just selling them to the defaults because those were very carefully chosen and there usually won't cause any problems but of course you know the option for optimization is already there and you know you can you can just make you know a little bit more detail further out from the player and just play you know I recommend like maybe just try changing it from not point to maybe to like one and you know if that's not an issue for your hardware then it's fine but I don't think in most cases you need to have tessellation going all the way back into the mid ground I think it's something that should just be around the sort of foreground and you can get pretty much good details when the player gets very very close so yeah that's tessellation with brush if I it's already sort of built in it's just something you can literally just enable and you know then you have tessellation you know right there and there example McCain layers as well that you can you know like this one that have roughness and tessellation yeah there's also a parameter here fade distance and this is you know similar thing it's more for optimization but yeah it lets you basically extend out the tessellation even further but yeah the default again is just very very close and they sort of far and near tessellation parameters those are first sort of the amount in the distance the fade is more of a sort of like general you know how how is the gradient sort of fade fall off of the tessellation into the distance but yeah play around with the value see if you can find the you know values that you think look good but yeah I definitely recommend just you know try the defaults first because those will give you some really good results out of the box so I'm just gonna jump into the game mode a bit and sort of run around and we'll see how that looks see a definitely gives a lot of cool little details you know these sort of bumpy puddles look really really good and I'm just gonna exaggerate a little bit more by increasing the height so maybe let's go up to 20 but yeah as a little bit more exaggerated even and you know this is you know a very very detailed effect if you want to get very photorealistic results something like this is definitely required it can make a huge huge difference especially if you using you know sort of scam textures like these or photo textures like these or you know if you try something from quick soul mega scans if you try something with textures calm that's you know got some really really cool physically based rendering settings and captures from the real world of course that's going to look really really good this one's just sort of a texture that I've created you know kind of taking a photo texture and sort of converted it into something PBR and then made a few changes to it but yeah and obviously all of the brush Rifai packs now include this paint layer as standard and yeah you can use that to to sort of learn from and and see how this works [Music]
Info
Channel: Joe Garth
Views: 32,956
Rating: undefined out of 5
Keywords: ue4, epic games, ue4 master materials, roughness map, painting, game development tutorial, texture used in ue4, ue4 shader, diffuse map, ue4 materials, unreal 4 master materials, materials in ue4, 3d game tutorials, game dev, painting tutorial, ue4 prop materials, material, ue4 tutorial series, videogames, photorealism, photo graphics, photoreal, 2019, best, graphics, landscape, automaterial, sculpting, brushify, environment, snow, desert, grass, mountains, tessellation, polygons, detail, terrain
Id: 834JB7bjez4
Channel Id: undefined
Length: 22min 23sec (1343 seconds)
Published: Sat Nov 30 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.