Falloff With Fringe - Blending Layered Materials Tutorial | Unreal Engine 5

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
today I'll be showing you guys how to make this layered falloff setup so that way you could have a nice snower moss on top with a fringe optional Edge and that way you can rotate your objects any way you want and it will always maintain snow Moss or anything you want to put on top so let's get into it as always here we are in a brand new project and we start out with creating a material M fall off go ahead and just open it up turn on used hero attributes and search for terial attribute layers plug this in and that is all we need to do here and let's make our material layer ML falloff and here for Simplicity I'm just going to add three attributes for myself I'm gonna add the base color I'm going to add the normal and I'm going to add the roughness so I can plug in three texture sample parameters that I'm going to get for Mega scans and for the roughness in my case I'm going to plug in my green Channel because that is the default in the packed Mega scans textures but of course plug in whichevery one you want and there's our base setup I'm just going to put all of these in a group called textures and that is all we're doing here because all of our stuff is going to go into the blend let's go ahead and make our material layer blend MLB underscore falloff let's open it up let's go a bit to the left and make some room for ourselves and we'll start by getting the vertex normal roll space so this is the node that will tell us exactly from what direction everything is so if I start premium node you can see it is fully colored and if we get a channel Mass parameter and we say the fall off Direction with a default of blue which is the top down and we preview this you can see right away we now have a top-down ask and if you want to adjust this then I mean there you go you have it but we want to add a lot more controls to this starting off with the position of it so we're going to do is remap this and the low is where we're going to change this so we're going to get a scalar parameter and we'll call this fall off position by default it will be zero and we could plug this into input low and now if I start previewing ends and I I change this let's say 0.3 you can see it goes up and if I do negative 0.3 it goes down so this is how we're able now to position that middle line higher or lower and get it exactly where we want it to now of course we want to saturate this make sure it's always between zero and one then we go ahead and multiply this by 10. so the reason I've multiplied this by a solid 10 is just to increase the intensity of this value as we're going to be combining it with the noise that way the noise is basically only at The Fringe and not anywhere else occasionally a little dot gets through but that can be easily tweaked so we multiply it by 10 and now we need to add the noise as an option so I'm going to do is add a static switch parameter I'm going to call it useful of noise so if it is off we're going to go ahead and use this if it is true we're going to add the noise now of course we haven't created the noise yet so let's plug this in and let's create the noise and we'll do it a bit below let's go get ahead and get a noise node and for this what we're going to need to do is change it from Simplex to fast gradient in my opinion Simplex is 77 instructions fast gradient is only 16 per level there's only one texture lookup it is pretty optimized it still uses the UVS this is the one I've liked using the most so what we're going to do is we're going to get a texture coordinate node and then for scale we're going ahead and divide it so we're going to get a scalar parameter and I'm going to call it noise scale and by default the noise scale will be one so instead of plugging this in directly I'm actually going to divide it again by a factor of 10. and the only reason I'm doing this is to have the noise scale not need to go into such small numbers instead of having this 0.001 it'll be 0.1 this is the only reason I'm doing this it's for ease of use then because this is now a 3D noise we need to append a vector to this so we're just going to go ahead at Penn zero so we have an x y z and we're going to go ahead and add an offset to it so I'll create a noise offset X and duplicate it for noise offset Y and of course noise offset Z go ahead and append all of these and add it all in I have a preview we now have a noise this is our complete noise but of course it's all going to be combined so we don't need to worry about it like this we have our noise that we need and so we can do a named reroute and just call it nice and put it all in a comment and now in here we can go ahead and pull it up let's grab our noise from our named reroute plug it in and now if I preview our add node you could see that it has The Fringe where we want it but it also has all of this below right and we don't want all of this below so now how do we get rid of it all we need to do from the switch we're going to go ahead and remap it one more time and this is where we're going to control the intensity so right now if I preview this and it's currently off on this but let's make it default values true so we can see it previewed with it on we go ahead and give it two scalar parameters and call it fall off noise Min and fall off noise Max so the minimum will actually be one and the max will be default as 1.1 so plug it into both of these and now you can see it has pretty much eliminated everything below occasionally you'll get the little spec there but with a little offset with our controls we can get rid of that and hide it whenever it comes up but now you'll see right here this 10 multiplied if I change it to one you see this is why we get the one this is why we have the higher intensities because we're adding it and you get a little bit more control with this now so if I change the offset Max to be something high like 10 we get the gradient back but we'll keep it in 1 and 1.1 by default but we'll go ahead and saturate this and for convenience I'll go ahead and add a invert noise using another static switch parameter so by default it'll be false and we'll do one minus for the true and finally we just go ahead and multiply this entire thing another scalar parameter and it's going to be our fall off strength default will be one so this way we can control the final output and here we can go ahead and plug it in so this is right here I'll go ahead and put this on a comment let's stop previewing this of course all turns off because nothing is in here by default but that is pretty much all we need let's go ahead and try this out I'll go ahead and make a material instance from the base and in here we're going to plug in our stuff and make two layers plug in our material layer and the base and go ahead and make a new material layer for the top as well plug that in plug in our material layer blend and let's plug in some textures into these now something I'm noticing as I'm plugging these in is first our materials are backwards so let's go ahead and open up the material layer blend which I believe because I copied it and I changed the default on it this guy yep default value invert is true we don't want invert to be true and we don't want use falloff to be true here either let's go ahead and turn those off and now we have our ask so let's apply this to our model here and you can see immediately we now have the falloff so we can now control under the material layer of course everything is not in a group you can go ahead and put in a group for yourself we can also change the direction under here so if you want it from the side you can also do that but blue is probably the one everyone will be using by default we can turn on use falloff noise and then we got the French and so now we can play with all of the settings so we can change the scale you can see the noise here changes and everything in between is pretty much filled in you can change the position so that way it only is based on the angle so if I was to rotate this guy or you could see right here on the base if I don't go to above one we'll probably just want to clamp it then we get all the effect and with the noise scale we can change the Fringe Of course if you got something like this and you don't want it to happen you can change the offsets on the XYZ and just adjust accordingly as you needed but just like that you now have full snow with a nice Fringe and now you can just place these around all over your level and not need to worry about making unique snow for every single asset in every single configuration it'll all play nicely together and just like that we are done hope you guys enjoyed it if you did please consider subscribing hit the like button and I'll see you guys next time take care bye
Info
Channel: Procedural Minds
Views: 1,532
Rating: undefined out of 5
Keywords:
Id: bAB3407LtZw
Channel Id: undefined
Length: 9min 0sec (540 seconds)
Published: Sun Aug 20 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.