How to Create Landscape Materials in Unreal Engine Without Repeating Stuff

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi going to be talking about how to create landscape materials in New Year 5 the easy way it will be as easy as clicking a button and you get a new material slot created from a template with all the customizations and adjustments you had on the template applied do stay till the end of this video to get a more detailed version of this landcap material for free all I ask is that you leave a like and sub so if you like me before now if you wanted to create a nice slope Blended landscape material or even just basic paint layers you would have had to of course create the base layer and add adjustments and parameters for controlling the various material attributes duplicate all that and then rename each parameter manually and then assign categories to each parameter in each layer and then repeat these for as many times as you need layers in the material that's ridiculously tedious now we have materal layers it has been around since around 4.26 maybe even before then but I've hardly seen anyone applying it to Landscapes I'll show you an example using paint layers and also a slope blend Let's Get Right right into it so first want to create a new material let's create a new folder material call this landscape material open it up go to the details panel enable use material attributes the node should now shrink to single pin next we need some assets head over to quick sell download then import some textures I'll get this eroded Sandstone cliff and this wild grass export both of them feel free to type the asset IDs into the search bar that's for The Rock and this is photograph next right click and create a new material layer down in the materials section this is just a fancy material function I'll call it Bas layer open up the base layer and drag in one set of textures like a boss or you know you can right click and type in texture sample like a wimp I'll let you decide select all the textures right click and convert to parameter name them appropriately this is the orp this is normal and this is is the base color click on the set material attributes node and add a few inputs for each texture for or RDP we need to add three instead of one because we have occlusion which stands for o r stands for roughness and DP stands for displacement next let's add a few scalar parameters so we have stuff to control when testing this out hold on S on the keyboard and left click to add a scal of parameter like a boss or again you can right click and type out Scala parameter like a whim but that's up to you we need normal intensity duplicate this a few times roughness multiplier reclusion amount displacement intensity and as for the base color we need a vector parameter so hold down V on the keyboard and left click or you can right click and you already know what I'm going to say so call this callor overlay get the flatten normal node and also a 1 - x plug in normal texture and plug in the normal intensity through the 1- X node into the flatness put M to get a multiplyer node I'm going to use that for the color overlay the roughness multiplier the exclusion on Mount and the displacement intensity occlusion corresponds to the red Channel roughness to the green and displacement to the blue set all the defa values to one including the vector parameter which makes it white plug them into the appropriate slots and the set matal attributes node apply and save head over to the main material and add a material attribute layers node add the base layer we just created on the default layers as the background layer asset plug that into the output node apply and save create material instance and apply it to the landscape and this is what it looks like so far italion is a bit nasty but I'll leave that up to you to fix let's focus on the reason you're here which is for the material layers open up the material instance and head over to the layer parameters tab so we can see the background layer which is the base layer we created and the good news is that we can just instance this layer for a new layer and simply swap out the textures click on the plus icon expand the new layer and Sample the base layer which we created earlier but we need one more thing a blend assets and that's just another glorified matal function that tells us how to blend between the layers you can use paint layers slope Blends or masks now we need to create the blend asset right click in the content browser and create a new matal layer blend let's call the slope blend open it up and everything is pretty much set up you just need to specify the alpha or you can change the blend node if you need a more complex blend type right click and get a wline blend node plugin scal of parameters for blend sharpness and blend bias and plug in the width explicit normal pin to the alpha apply and save make sure to save all from time to time crl shift s head back to the material instance and apply it to the blend asset swap out the textures back in the slope blend set a default value of 30 for the blend sharpness and minus 12 for the blend bias apply and save and there we go now we have a slope blend again the tiling looks nasty you can fix that easily now let's get the ability to paint open up the content browser create another materal layer blend asset and let's call it paint blend open it up and create a landscape layer sample name it whatever you want may think we just plug this into the alpha and call it a day wrong landscape layer samples have to be in the material itself for them to work properly so cut and paste this into the main material now we need a way to transfer the data from the landscape layer sample into the blend assets so we can plug in the alpha here we use the customize the UVS get a set material attribute node and add a customize UV one got to make flow to and plug the layer sample into one input and into the customize UV pin plug in the set material attributes between the matro attribute layers and the output node we just passed the landscape layer sample data into the UVS for all layers in this material so we can pull it out from either the base or the top material in the blend asset head back into the paint blend asset and get material attributes from either the top layer or the base layer and get the customized uv1 break flow two unplug the corresponding component to used in the main material as the alpha which goes through the AR and that corresponds to the X on the other side apply and save back in the material instance change the blend asset to paint blend when you go back to the landscape it may appear black if that happens make sure to apply the main landscape material also head over to the landscape mode under the paint tab create a new layer info for the layer you just created we're using a weight Blended layer info the landscape gets covered with that layer but the base layer is still right under it the material just has no way of painting the base layer since only one paint layer exists so we need to rectify that head over to landscape material and create a paint layer for the Bas I'll put the base in the X and the other layer and the wire apply and save back in the paint blend we need to switch the alpha because we just changed it duplicate the blend material attributes node we want to be able to paint the bottom layer so plug the bottom layer into B and the first play materal attributes into a plug R from the brake flow 2 into the alpha and plug that into the output apply and save create the layer info for the base layer wait Blended and there we go you canot paint the base onto the landscape and also the layer one back onto it we can also completely fill it with the base and paint the layer one however want the material is not fully a to me it just yet because if you want to create new paint layers we still have to go back into the main landscape material and add these and then into the blend asset and connect these guys and that would also mean that we have multiple blender assets for multiple layers which we don't want that can all be fixed by mod find the blend asset one way to do this is to create a bunch of landscape layer samples in the main material since we have seven customized UVS you can make up to 14 paint layers give them generic names and plug them all into the UVS then in the paint blend assets we create a network of cascad and switch parameters for each landscape layer sample shorts that when we create a new layer we can check the boan of the particular paint layer we want to use for that layer you just have to make sure that you tick exactly one for each layer layer in the inst stance no more and no less or you might get undesirable results you can create a separate landscape layer sample for painting on the Blended material in the description I've left a project containing a complete landscape material using mat attributes for free it's fully flushed out with distance blending with customizable tiling color adjustments tripler projection support for landscape displacement with lanite runtime virtual seuring support for blending assets with the landscape and lots more all I ask is that you leave a like and sub that will really help me keep making these that's all for the video thanks for watching
Info
Channel: Paul Gabriel
Views: 27,197
Rating: undefined out of 5
Keywords:
Id: ZzKdy6WoRDI
Channel Id: undefined
Length: 10min 42sec (642 seconds)
Published: Wed Oct 04 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.