Unreal Engine 5 | Dynamic Footsteps with MetaSounds

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
what's going on everybody thank you so much for tuning in again this week and we are back with another unreal engine 5 early access audio tutorial today we're going to be taking a look at setting up a dynamic footstep system using meta sounds now dynamic footstep system is something that i've set up in the past it was about two years ago uh we had set that up in four point i believe it was two three using sound cues but since metasounds are meant to completely replace sound cues i thought why not revisit and take a look using those meta sounds so if you're new to the channel make sure you hit that subscribe button along with the notification bell so you don't miss out on any future content and if you'd like to be a part of the sound effects guy discord server you will find a link in the description below so with that being said let's get started [Music] so this tutorial is going to be fairly similar to the the original one that i had done but there are going to be some differences but basically i've got just a testing format set up here and we've got three different materials we've got our concrete we've got grass and we've got mud which is actually concrete grime but it looks like mud and it's the closest thing that i had in the starter content so the first thing that we need to do is we need to set up a physical surface type for these materials so what we're going to do is we're going to come up here to edit we're going to go under our project settings and on the left here under engine if we scroll down and go to physics and then scroll down this list eventually you're going to come to a section called physical surface and you can have up to 62 different physical surfaces within your project so what we're going to do is we're just going to go ahead and name these so for the first one we're going to do concrete and then we're going to do grass and then mud and then you can close this window so the next thing that we need to do is we need to set up our actual physical materials so what we're going to do is inside our content browser uh we're going to go ahead and right click we're going to go under physics and we're going to set up a physical material select physical material select and we're going to name this concrete and if we double click on this it'll open up uh if your details panel doesn't open uh and it looks like this uh just go under your window and select details and with the details panel open under physical properties which will be down here at the bottom you'll have a drop down menu and if we hit this drop down menu you will see the three materials that we had set up in our project setting i'm going to go ahead and set this to concrete and save it we can close that and now we just need to do the same thing for our mud and our grass so again physical material select uh we'll call this one grass and select grass save close physics physical nope not physical mask physical material and we'll call this mud double click default to mud save close and so now we have our physical materials set up we now just need to tie them to the materials that i have already on the surface i'm gonna go ahead and pull this out of the way here for a second just go ahead and click on them and then under our details panel you'll see the material so if we double click on this it'll bring up that material and over here on the left you'll see that it has a section for physical material so now that we've set up those physical materials since this is concrete we can go ahead and select concrete save that and once it's saved you can go ahead and close it and we're just going to do the same for the grass and the mud and so now all three of our different surfaces have a physical surface material applied to it so the next thing that we need to do is we need to get the player to detect what type of surface that they're standing on and to do that we're going to come into our content browser under mannequin animations and we're going to go to our animation blueprint and we want to be under the event graph and inside our animation graph what we're going to do is just like we did in the first tutorial we're going to try and get the pawn owner and we want to get the location because what we're gonna do is again just like we did in the first tutorial um for 4.23 we're going to do a line trace by channel because we're going to draw a line straight down from our player and it's going to then we're going to tell it to detect whatever surface type that line hits so we're going to do a line trace by channel and our actor we're going to take that location and that's where it's going to start now in the 4.23 tutorial that i had done we had pulled off here and we did a vector plus vector now either i'm blind or it's been removed but i can't find it so if you do know where it is please let me know in the comments below or if you know what happened to it uh let me know but as a workaround what we're gonna do is we're going to break this vector and then we are also going to make a vector and it's the one under math vector make vector and so our x and y we can keep the same but to get that line to go straight down we want to take this z and we're going to do an add minus 500 or you can do subtract and put 500 however you get there we're basically taking a line straight down on the z-axis and then we're going to move this up to our z and we are going to put that to our end point so from here what we can also do is we're going to take our pawn owner and we want that to go to our actors to ignore now i have done it without adding this and it still works uh but just on the off chance um is kind of a fail safe we're gonna add it to the actors to ignore just so it doesn't he's not essentially tripping over his own feet and causing sounds to fire where we don't want them so from here our out hit we are going to go ahead and break the hit result and if we hit this drop down um we're also going to come off of our out hit and we are going to get the surface type from here return value we're going to add a select node and because you're pulling off of the get surface type it already understands that surface type is the type of menu that you're looking for and you can see here that because we had set all this up in our project settings you will find them here as well so what we're going to do is off our impact point that's where we want our footstep to be heard so we're going to play a sound at that location and this return value is going to be that sound now we haven't set the sounds up yet we're getting to that in just a second but we want this line trace be what triggers that and we'll get to triggering the line trace here in just a moment as well so what we're going to do is we're going to go ahead and compile and save our third person animation blueprint and i'm just going to drag this off to the side for now and since we're in our animations let's go ahead and take a look at our run and we'll go ahead and pause this because if you've ever seen any of the footstep tutorials that i've done you're pretty aware of what we're doing right now basically we're going to scrub through here and we're looking for that impact point where we want this notify to happen so once we found a relatively good spot for that footstep sound to take place on under our notifies on our one track what we're gonna do is we're just gonna go ahead and right click add notify new notify and we're just gonna call this footstep and so what we're gonna do then is drag over here to our next footstep which looks about right there and we're gonna do another add notify new notify and we can just call this footstep as well we can go ahead and save that and close that that's all we need to do to our run animation and so with our third person animation blueprint here if we right click and i just start typing in footstep you'll see now that we've created that animation notify event we do have that trigger available to us now and that is what's going to cause us to trigger this line trace by channel so if we go ahead and compile this save it we're going to move that back out of the way and i'm going to move this out of the way actually before i do that uh in our line trace by channel just so we can see uh that line happening under our draw debug type let's just go ahead and put forward duration because now if we hit play we'll be able to see that line and that is the line trace by channel and the little red square at the end that is where it is impacting the ground so now what we need to do is we need to set up our meta sounds so that we have our footsteps to play at the location so i've got some footsteps imported here and i called these cement even though i called the actual material concrete but it's whatever you can name them whatever you want uh what we're going to do is we're going to create three different meta sounds just like we created three different sound cues or multiple sound cues in the original tutorial and so we're gonna call this concrete i'm gonna create another one called grass and then i'm going to create another one called mud so if we open up one of our meta sounds here what we're going to do is we're going to right click and we're going to add a wave player and the footstep sounds that i have are stereo but typically you want footsteps to be mono so what i'm going to do i'm going to add a mixer here and just going to go ahead and essentially sum the left and right channels down to a mono source off of our wave asset we want to get a random array and then off of our array we want to promote to a graph input and under our values here which let me turn off my camera so that you can actually see what's happening over here we're going to add four different ones how you can add however many footstep sounds you have i have four so since this is our concrete i'm going to go ahead and oh i called it cement so cement one cement two meant three and cement four so that is our array it's going to be randomly pulling from one of those assets and we're going to take our input that is going to go to the next and then on next it is going to go ahead and play so if we go ahead and just hit this hit play you can hear that it's randomly pulling from this array of assets so we can go ahead and save that and close it and then we're just going to do the same thing for grass and mud so i'm going to go ahead and set that up and be right back so now that we've got our metasound saved what we're going to do is we're going to go back to our third person animation blueprint and now in our select node we just have to add those meta sounds if we come under concrete you'll see that your meta sound is listed here and then under grass and then mud we'll go ahead and compile that and save it and you are finished so now uh we've set up our physical surface materials we've set up our animation notify inside our run animation we've set up our metasounds we've thrown it all together and now if we hit play you'll see because we didn't set up a default surface there's no footsteps that happen here but then as we run onto each of these surface types you'll hear that it's detecting the surface type and it's pulling from that select node and playing the appropriate meta sound alright guys so that is going to wrap things up for this video like i said a lot of it was very similar to the 4.23 tutorial that i put out but because meta sounds are going to be replacing sound cues in upcoming updates of unreal engine 5. i wanted to revisit that and kind of go over how to essentially create that using the new system if there's anything that you'd like to see me cover let me know in the comments below and again you're more than welcome to join the sound effects guy discord server linked in the description until next [Music] time [Music] you
Info
Channel: The Sound FX Guy
Views: 23,969
Rating: undefined out of 5
Keywords: TheSoundFXGuy, The Sound FX Guy, The Sound Effects Guy, Unreal Engine 5 | Dynamic Footsteps with MetaSounds, Unreal Engine 5, Unreal Engine 5 tutorial, Unreal Engine 5 Meta Sounds, Unreal Engine 5 Dynamic Footsteps, Dynamic Footsteps with MetaSounds, Unreal Engine 5 metasound tutorial, Unreal Engine 5 Footstep tutorial, MetaSound Footsteps, MetaSound tutorial, MetaSound ue5, UE5 Metasound, UE5 Meta Sounds, UE5 Tutorial, Unreal Engine 5 Tutorial, UE5 for beginners
Id: pYxocPdtHBw
Channel Id: undefined
Length: 17min 35sec (1055 seconds)
Published: Sat Jul 24 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.