How To Leave Snowy Footprints In Unreal Engine 5 (Tutorial)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys and welcome back to another unregion 4 and 5 tutorial so in today's video what I'm going to be going over is how to leave snowy Footprints in your game so if I were to hit play I'll show you what we're going to make today so as you can see as we're walking around we're going to be leaving these snowy footprints in the ground like so and also when we stop moving what we should see is that these are going to despawn as well which means they're not going to be staying in the world forever as you can see there they're despawning and I've set that to 10 seconds just for me and the reason we're doing that is because if you have too many decals in the world at once it will get very very laggy and it just won't run well at all so we want to just make sure we're not doing that now obviously these snowfall prints are going to be spawning on basically like what concrete or whatever this is not on snow but obviously again that's just because of how I've got this level set up you can obviously do this wherever however and whenever you like but this is how I've worked set up this is just a very basic simple system which we're doing today plus something which can give quite a nice effect like this and you can obviously do this for anything as well it doesn't just have to be snow this could be mud water whatever it is that you want we're just creating a footstep system or footprint system which says sorry not footstep as you can see on screen here so this is only going over and creating today so without further Ado let me delete this code and I'll show you how I've done it I should also mention as well if you want to have this snow which you can see in the world right now I'll leave a link on screen now and in the description down below to a video where we go over creating this Niagara snow system so what I'm going to do first is we want to import our footprint images now I'm going to be using some which I've just found off Google and I'll leave a link in the description down below to the images which I'm using so I'm going to import them now so let me open up my documents folder find where they are and then just drag and drop these in to import them like so once they've got them imported what we're going to do is we want to open them up straight away now if you're using the ones I'm using what you're going to want to do is make sure that you tick chroma key texture pick the color pick the eyedropper and just choose the black background like so press OK and that will then remove the background like this and we want to do that for both of these like so just so we're going to be removing the background and making it a transparent image you can obviously do this in an external program like Photoshop if you want but it's no different we can do it here too it works just perfectly then we're going to close these like so and we want to actually make these into decals so that's very simple what we can do is right click on one of the textures hit create material open it up straight away and then simply change the material domain from surface to deferred decal this is now a decal but to make it work perfectly for us what we're going to do is change the blend mode from opaque to translucent then we'll have the RGB into base color and the alpha or the a into opacity press apply and once this loads we should see we now have a snowy footprint you might not be able to see it in the preview just because it's a decal but if we were to close this drag it into level you should see we now have a snowy footprint like so obviously it's massive but we're going to get into that later on we want to make sure that we do that for both of them so I've got footprint L let's also get footprint R and it's the exact same thing change it to deferred decal and translucent and hit apply as easy and simple as that and let's close this like so what we want to do now is we want to determine where we're going to spawn this in so in order to do that we need to open up our character blueprint so for me that's going to be third person blueprints BP third person character in here we're going to go straight over to the viewport and what we want to do is select the mesh and we're going to add a plane This Plane here I'm going to name foot L and what this is is it's simply just going to be a reference to where the bottom of the left foot is the reason why I'm not getting the bone name and getting the location of the bone is because this is a lot more simple and also the bone socket isn't at the very bottom of the foot I want this to be a little bit more precise so once we spawn that in it should be parented to the mesh like so then we're going to change the parent socket to be foot L to the left foot and you can see it should now be moving in time with the left foot too obviously it's not moving at all because the left foot isn't moving but it will be so if it's changed location like this that's perfect we're then just going to rotate this and move it into the position which we want which we think is going to be best for us so let's toggle off snapping I'm just going to make this a bit smaller you don't need to do the scale at all but I think it's just going to look a little bit better and help us see where this is really going you don't need to be too precise with this but I'm just going to go like this so again get a better reference idea for me so that is going to be good you don't want it too low that's going to be going through the floor you don't want it too high but it's not going to be where the foot actually is so for me this is going to be perfect what we're going to do on here as well is search for hidden we want to make sure we tick hidden in game and I'm also going to find the collision and make sure we set the Collision presets to no Collision so essentially this plane has no collision and the player can't see it so it's basically not there in game at all it's here purely just to be used as a reference of where to spawn in our footprint once you've done all that we're going to select it and duplicate it with control C control V making sure it's still painted to the mesh and change it to foot r this is also now going to be the right foot so reset the location to default and change the parent socket to foot R like so now this is going to be at the right foot location we'll just make sure we rotate it back so we can see it properly and then again do the same thing of moving it into the correct position for us which I think is going to be here just like so we'll compile and save that like this and that is all we need to do in the character blueprint again all we're doing in here is just getting reference locations so we can close this like so next we want to determine when we want to spawn the blueprints so we just did where now we're doing when and I said blueprints I mean decal sorry so to do that we're going to open up our animations so let's go to content characters mannequins animations Quinn now these might be different for you but these are the ones which I'm using and also just for the purpose of the tutorial I'm only going to do it in one animation and for me that is run however you just do this same process in every single animation where you want the footprints to spawn so you probably want walking running maybe even idle if the player's feet are moving and also jump Landing so when they land from their jump basically anywhere where the feet are moving or where you'd expect Footprints to spawn go into these animations and do this same process so let's go back to the beginning of the animation and you're going to want to make sure you have a notified track I do but it's already been used so I'm just going to add in another one and use that like so then what we want to do is just scroll along the timeline until we find where the player's foot is touching the floor now for me this is easy to do because they've already done some here but I'm going to do it anyway so scroll over and I think here so again you can see the right foot there is touching the floor we'll see it's right so right click add notify new notify and we'll call this footprint R footprint right then we'll go along again until we see the next one hit the floor which is about there and you see this is now the left footprint so we'll add notify new notify footprint l and we'll go along and do this for every single time a foot hits the floor so the next one is here footprint R except what we can do now is right click go to add notify skeleton notifies and we have the ones which we have so for me that is footprint R like so and then we'll go over do it again until it hits the floor which is there skirting or twice footprint L and so on and so forth until you have all of your Footprints in here which for me is going to be these final two and we'll move over to we find the last one perfectly like so again these might be different for you you might have more you might have less but essentially anywhere where the foot is hitting the floor you want to have an anime notify which is obviously going to be an event which will fire off which will then spawn the footprint from so we'll save that and close that and again do that for every animation you have where a footprint should be spawning and finally last but not least what we're going to do now is actually spawn in this footprint decal so to do this we want to go to our animation blueprint so for me it's going to be content drawer again and then just animations ABP Quinn is that the animation blueprint I'm using in here we want to first of all get begin play so event blueprint begin play and we want to get a reference to our character blueprint now you may already have this if you do perfect just use that so for me I'm going to do cast to BP third person character with the object obviously being get player character like so then we're going to right click as our character promotes a variable and they miss character reference another reason we're doing this is because we obviously want to be able to get the foot location references from our character blueprint so we'll compile and save that underneath this we want to right click and search for the notify we created so I named mine footprint R in footprint l so let's do R first so Adam notify footprint R so essentially whenever the animation notify is called so the foot hits the ground it's going to fire off this event which will do what we want and what we wanted to do is spawn decal at location not attached sorry we want spawn decal at location like so the decal material for me is going to be footprint R matte the decal size I found for me 15 15 30 is the perfect size for the images I'm using to find out for you what you can do is simply just drag one into the level and then change the decal size down here to see what works best for you so I found that 128 128 256 is a good kind of scaling so it's all proportionate then you take the padlock and just change the values and lower them until you find what works best for you so again for me it was 15 15 30 and I found that by also just placing in a reference to a mannequin in the level and then putting the footprint underneath the foot of the mannequin and seeing which works best and again you'll notice that one does so that looks perfect for me so we'll go back in and continue on with what we're doing the location obviously wants to be the location of our foot so we're going to get the character reference out of this we're going to get foot R which should be all the way at the bottom and that's the plane we created earlier and out of this we're going to get World location so again where in the world is this foot and that will then be the location we're spawning the decal at the rotation we want to do 90 on the x minus 90 on the Y and zero on the Z it always want to be minus 90 on the Y and I've got 90 on the X just because again of the image I'm using it needs to be rotated 90 degrees for you it might not so again try an error see what works best for you and again you can just test by dragging it into the level and playing about with it then the lifespan I'm going to set to 10. now this is obviously in seconds so for me 10 seconds after this footprint is swollen in it's going to despawn you might want to set this to 5 10 15 30 60 120 whatever it is that you want to do just put that in there if you have it is zero it will never despawn it will always be there which you can do if you want but I would not recommend it because again the longer the player walks the more Footprints they'll be the more decals the laggier it will get which obviously no player wants a laggy game then finally last not least we need to do this again but with the left footprint so anime notify foot l so footstep L like so then this is going to be the same thing so what I'm going to do is just get the spawn decal location and get World location and then this time instead of the character reference getting foot R we're going to instead get foot L like so and then obviously change the decal material as well to be footprint L instead of R sorry if you keep saying kind of those are flashing windows like this this is a really annoying bug that some RTX 30 series cards get with armor version 5 not sure when Nvidia are going to fix this but it is just waiting on Nvidia not epic kind of annoying but I hope it gets fixed soon so we'll compile and save that and this should now be everything working perfectly for us if we're to minimize this hit play we should see that when we start walking they should spawn in like so now you'll notice I'm only getting the left footprint spawning in that's probably just because I did this before to obviously create it for the beginning of the video I've got two different versions of the notify so if I were to just get them both we should see this is going to work so we've got footprint R footprint L again I've got two different ones just because I made it earlier as well so you shouldn't have this problem it's only something I've got for the purpose of the tutorial so now we should see this is going to be working perfectly for us although it's still apparently not doing on the right sometimes and that one also had the black background so I think I'm having some weird bugs with ue5 at the moment not too sure what it is I'm using UE 5.1 so I might be just finding new bugs that haven't actually been fixed yet or haven't even been found out about yet and I found one problem is in my right footprint material I didn't connect the alpha into the opacity which I thought I did but clearly I didn't so I need to do that apply and save it and now this should maybe work a bit better for us if we'd stop walking we're going to get it on the left and right except it's not always appearing on the right foot for some reason but again also you saw it was working at the beginning of the video so this does work again I think I'm just finding some bugs with UE 5.1 and I have a feeling the problem with that might be because again I was using two different item notifies I might have put in the different ones in here so just to be safe what I'm going to do is delete these and redo them again all the issues I'm having now you hopefully shouldn't have I believe it's mainly because I've done this before and I'm doing it again in the same project I think when I removed it all and saved ue5 didn't remove some of the references I had which means I've now got double references so I'm going to do it again with different names so again really sorry about this and for this to be in the tutorial but obviously you shouldn't be having this issues and I want to keep it in and show how I fixed it just in case a you do have it I have the issues but also B to show everyone has these issues and you've got to just try out these different methods of fixing them try an error see what works see what doesn't work so this is a kind of another Learning lesson in of itself you will run into issues and you've got to try out different things to fix them and sometimes it's not your fault sometimes it is just you find bugs sometimes the references aren't removed properly whatever it is but there's always ways around it so let me just redo this and I'll get back to you so I've now created some new notifies with new names I've got snow R and snow L now to go back to my animation blueprint what I'm going to do is get the slow R and slow L notifies connecting these into here and now we should see this is going to work a lot better for me hopefully we'll compile save and let's test this one out so we'll see we've now got these spawning perfectly on the left and right Footprints and after 10 seconds these should also despawn which you can see happening perfectly right now like so again that was the issue I was having I think it was just some references weren't properly removed which means it was getting the wrong one was trying to access something which wasn't actually there so I fixed it by just creating it again with a new name that can sometimes happen if you do create things with the same name after deleting it but obviously that's the issue that's how I solved it hopefully you wouldn't have had that problem but I think that'll be it for this video if we've done everything we want to do what we've done is we've set up a basic system which will allow us to have these Footprints of snow in our games which will also despawn after a while so we don't have them constantly in our game lagging it all out and it looks something like this which I think looks pretty good for what it is so thanks so much for watching this video I hope you enjoyed it and I hope you found it helpful and if you did please make sure to like subscribe down below so thanks so much for watching and I'll see in the next one okay [Music]
Info
Channel: Matt Aspland
Views: 8,051
Rating: undefined out of 5
Keywords: ue4, unreal engine 4, unreal engine, tutorial, ue4 tutorial, unreal engine 4 tutorial, how to make a game, how to, blender, unity, games design, ue5, unreal engine 5, unreal engine 5 tutorial, ue5 tutorial, footprints, footprint, foot, print, prints, snow, snowy, mud, muddy, grass, sand, dynamic, footsteps, step, footstep, system, leave, in snow, ue5 footprints, ue5 leave footprints in snow, on ground, ground, decal, decals, right, left, floor, the, time, material, texture, easy, quick, simple, advanced, basic
Id: EJEG9DrQuYg
Channel Id: undefined
Length: 16min 53sec (1013 seconds)
Published: Tue Dec 27 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.