Brushify: Bootcamp - Custom Landscape Materials in Unreal Engine 5

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi everyone Joe here creator of brushify toio in this video I'm going to show you how you can add your own custom materials to brushify the brushify landscape Auto material already comes with 11 paintable landscape layers those include all the common materials found in generic bioms things like grass desert forest snow and also paintable extras like beaches mud and puddles but if those aren't enough and you need a custom material for your project it's actually really easy to add one for this tutorial I'm going to take a material from the mega scans library and I'm going to import it to the brushify landscape Auto material we're then going to enable nanite for a really cool displacement effect welcome to brushify boot camp grab yourself a cup of tea and let's get [Music] started you can follow this tutorial using any brushify pack that's because all brushify levels use the same landscape Auto material every single pack shares the same one in the details panel of your landscape actor you'll find that miore landscape is assigned the setup is always exactly the same so it really doesn't matter which brushify pack or level you use you can still follow along with this tutorial for this demonstration video I'm going to be using the same scene that we created in the brushify beginner tutorial so if you're coming from that video you can pick up pretty much just where we left off and I'm just going to change the lighting to daytime so that we can see all the materials a little more easily and this little patch of landscape here in the middle should be a perfect area for us to try out our new custom material in this section I'm going to show you the absolute easiest method for switching out textures on the Brushy landscape Auto material the first thing I'm going to do is I'm going to paint down a little bit of mud on the ground so I'm going to go to the landscape and I'm going to go to the paint Tab and scroll all the way down till I find mud and then I'm just going to paint a little patch of mud here on the landscape and as you can see that's got a sort of mud material or sort of texture I'm going to come out of that mode and we're going to click on the landscape and in the details panel I'm going to find where it says landscape material right here and I'm going to open that in the content br browser double click on the material to open it up if I scroll all the way down to the bottom of this material instance you can find a section called Z zore textures you'll be able to find sections like this for all the different brushify paint layers so if we go into the mud layer we can switch out the diffuse textures for the mud I'm just going to tick the box to the left to enable both of those then it will allow us to actually switch out this texture so I'm just going to get it closer here and I'm going to type in uh cliff just going to switch it out for a different texture Cliff surface and the same for the normals as well surface okay so now we've actually got a sort of Cliff texture instead of a mud texture uh on this material so if all you're looking to do is just quickly switch out one of those textures that's a really quick and easy way to do it so now that we've done the sort of basic texture swapping method using the material instance I'm going to show you a much more sort of robust method which is to actually edit the shaders themselves so I'm just going to go ahead and I'm going to revert the change that we just made here uh I'm just going to revert these back to their defaults and untick the parameters and hit save so now we should have a sort of mud material back so now I'm going to introduce you to the brushify material setup if you go into the content browser and we navigate to content brushify materials landscape this is the actual brushify landscape Auto material you'll find that there's the miore landscape that's the material instance that usually apply to the actual landscape actor itself and then there's also the actual material file mcore landscape now if we open that up this is the core or of the brushify landscape Auto material now it does look very complicated and it can be a bit intimidating to sort of get your head around first but all of the aspects of this Shader are cleanly set up uh and commented and everything is put into sort of quite neat little uh material functions so one of the easiest ways to learn how to edit shaders in Unreal Engine is just to start doing something practical in this case we're going to go into the MF landscape layers material function by double clicking it and then you'll find that a new page will open now this is the sort of landscape layers material function where you'll find all of the different various materials within brushify are connected to this landscape layer blend so what we actually really need to do to add a new material to brushify is simply to add another input in the layer blend right here and there are two different layer Blends one of them is for the base materials and the other one is for the slope or sort of cliffs now I've gone ahead and I've actually downloaded a mega scans material and this is what we're going to be importing uh it's just a sort of basic kind of stone work stone wall kind of material um but we're going to just take the normal map and the albo and we're going to bring that into the engine so to import texture Maps it's fairly simple and unreal we're just going to go to the content browser and I'm going to import uh these new two textures into uh content brushify materials landscape and there's an actual textures folder and this is where you'll find all of the different textures that are used in brushify so Beach Cliffs craters deserts Dunes everything they're all inside of this folder I'm going to make a new uh folder here and I'm going to call it stone wall and inside of there uh I'm just going to import my newly downloaded Mega scans textures and to do that I literally just go into Explorer uh take the albo and the normals and I just drag and drop those across into Unreal Engine and once those have imported in I'm just going to save their names as something a little bit more understandable so stone wall underscore D and tore Stone wallor n and this is the sort of typical Unreal Engine naming convention uh that I'm using here so now that we have our two textures we're going to create a new material function so to do that uh we're going to go back into the uh mcore landscape uh go back into MF landscape layers and we're going to go and add a new input to our layer blend so if you click on the layer blend you want to hit add element and that'll create this new layer non input here which you can see so how do we actually create one of these sort of little nodes here these MF underscore nodes that are right here well that's actually pretty simple uh we're going to just uh go into one of the nodes for instance like MF mud and we're going to open that up in the content browser and what you'll find is that these are literally just material functions like any other and you'll find in the landscape materials folder you have a bunch of these different materials already set up uh we're going to create a new one um we're going to call uh this new folder Stone and then we're actually going to copy from MF mud um we're going to copy a couple of different things we're going to take the uh normals and the roughness and the height of MF mud and we're going to copy all of those into the stone folder and we're just going to rename all of these to Stone so wherever said mud we're now going to call it Stone and this one too and the roughness same of that so where it was once mud we now have all of it saying MF Stone and now we can actually take those material functions one of those and we can just drag and drop that into the MF landscape layers alternatively you can type in the search material function and choose material function call from the list so material function call that's right here and that will add um one of those material function nodes and you can choose the material function right here so now we have MF Stone uh we can actually hook that up to layer non and I'm also going to make sure that I rename layer non uh in the details panel I'm just going to rename that to Stone and then we're just going to hit save now the next step is we're going to go into the MF Stone and you'll see that what we've actually got is we've actually still got the mud textures applied to this um so we want to go into where it says mud diffuse and I'm going to change that to uh Stone diffuse and I'm going to change the material here uh to stone stone wallor D which is our imported Stonewall texture and there you can see in the little preview it's now using the stone wall texture and I'm going to hit save now one more thing that we need to do uh in addition to this is the actual normal map setup and if you come to the right here you'll see that all of the mud material functions are still applied now we don't want to use the mud material functions we actually want to use the stone ones that we just renamed and sort of duplicated so I'm just going to type in here MF Stone and I'm going to choose MF Stone normals that's the one we just made and I'm going to unhook the the uh roughness and the uh height uh for now and I'm going to go into the MF Stone normals now inside MF Stone normals uh you'll be able to find the uh lowest texture parameter uh says mud normal and what we're going to do is we're going to change that to Stone normal and we're going to change this texture input to Stonewall n now you might be wondering sort of what these three different texture sample slots actually are and I think one sort of easy way to explain that is if we actually go into the uh mud material instance you can see this actually nicely commented here so you can see that the top one here this is for the sort of global far texture the middle sample here is for the macro texture and the one that we've been editing it's the close texture so we really want to leave the global and macro alone until we find you know sort of a decent matching Global or macro uh texture for those uh but for now I think the mud Global and macro textures should be just fine uh so inside of here we'll leave the other two the same and we've added the stone normal map right here and we can just hit save now I'm going to go to the landscape paint layers menu and we're going to see if our newly created landscape layer has appeared one thing to note is if you don't find your newly created material in the list you can usually restart the level and that will usually refresh this page we can now find uh a new paint layer called Stone now we're just going to apply a new weight Blended layer info to that um we're going to call that stone layer info and hit save and just make sure you save that in the content browser and we're going to start painting down this Stone paint layer it might take a second to compile there we go you'll actually be able to see that we actually have now uh the stone texture already one of the things I'm not really happy with here though is the roughness it's still using some of the roughness settings from the mud texture but unlike the old method uh we actually now have the option uh to be able to sort of tweak this uh because we have full control in the Shader system so we're going to go back to MF landscape layers and we're going to go to the MF stone and you can see here it says MF mud roughness and what we're going to do now is we're going to actually create a mud roughness for the so I'm going to go in here and type in MF Stone and choose MF Stone roughness that's one we duplicated before and leave the height for now let's just do the roughness and focus on that we're going to hook that output to the roughness input here and then hit save now to add roughness uh sort of custom roughness map you can see at the moment the mud roughness Is Still the One chosen um but what I'm going to do is actually import that texture from the mega scans library and um we're going to use that as our new roughness so if I come again into our custom textures folder so that's Brushy fire materials landscape textures stone wall now we only imported the diffuse and the normal texture but what I'm going to do now quickly go into my downloaded folder here I'm going to grab this roughness map and I'm going to copy and paste that in so now we've got the new roughness texture we can go into the uh texture parameter here and we can add uh the new one uh I forgot to actually rename that texture I'm going to keep things clean let's rename that to tore Stone wallor R so the roughness map is now named properly and let's just add that into the texture parameter input and you can see that's now almost white because this is a stone wall it's it's you know very very rough surface um it should be almost white and then we're going to hit save and let's have a look at the effect of that on the actual material so now you can see that the roughness is a lot better um and the material is starting to look uh really quite realistic uh one thing that's really handy as well is that you can go into the buffer visualiz ations and just check that everything looks correct so that's the base color we can also go into the uh World normals and we can also look at the uh roughness as well roughness is very subtle the only thing that's really missing at this point is displacement in this section we're going to be adding nanite displacement to our custom material and the first step to doing that is we're going to go into the content browser go to our textures folder so landscape textures Stonewall the one we created earlier and I'm actually just going to drag and drop uh from my uh downloaded Mega scans files I'm going to drag and drop the displacement texture into that folder and I'm going to correctly rename that to tore stone wall H now we've got our displacement map uh texture uh we can actually go back into MF stone and you can see at the moment we've got the mud height being specified in there but we can change that to Stone height this is the one that we duplicated earlier then we can jump into that and change the close texture the one at the very bottom to Stone Wall H so it's really just about switching the parameters hit save go back into MF Stone and then hook up height to displacement and we're going to hit save and now we're going to take a look at how that looks and at the moment you won't see any difference um but that's because we need to enable nanite on the landscape so to do that click on the landscape and we're going to click on enable nanite and click build data and this will enable nanite by building a nanite landscape mesh now you can see that on mine this works pretty much straight away now in order for this to actually work at the moment you need to add a custom console variable into your project so to do that you go to the content browser go to your content folder and go to show in Explorer and you just want to go up one level uh to the root of your project folder that's where you find your Unreal Engine project file and your content folder and inside there will be another folder called config inside there is a little file called default engine ini and you want to open that in notepad now there are a couple of little console variables that we need to add to this file where it says renderer settings you'll want to add these two console variables R nanite allow testation 1 and R nanite testation one I'm going to leave those in the description down below so you can copy and paste them into this file once you've done that simply restart your editor and everything should work just like on mine what's shown in this tutorial is just the surface level of what is possible with Shader editing brushify was designed to create massive worlds with many complex materials I really hope you found this tutorial useful if you like tutorials like this don't forget to like And subscribe if you have any questions about brushify you can use our support email support brushify doio thanks for watching this is Joe G signing out cheers [Music] guys
Info
Channel: Joe Garth
Views: 5,391
Rating: undefined out of 5
Keywords:
Id: khuHvZdxbXk
Channel Id: undefined
Length: 19min 51sec (1191 seconds)
Published: Tue Apr 02 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.