Character Animation in UE4 | Live Training | Unreal Engine Livestream

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everyone and welcome to the Unreal Engine news and community spotlight so last week we actually this month we've announced a new round of unreal dev grants we're always thrilled by the submissions and the folks that have jumped in and made incredible projects that they're submitting we had somewhere between 10 and 15 folks that we've awarded grants to and they were all wonderful so we had Ally R which is a feature film it's coming out next month in theaters and it was developed by a team out in Pakistan it's so gorgeous we also had projects like blueprint u e.com and it allows you to visually display your blueprints on sites so if you copy your code from Engine pop it into their website and then you could share it on the forums or something like that we had wonderful games like clay book where everything in the world is moldable you can shape it and interact or interact with it and wonderful and unique ways so a huge shout out to all of the grant recipients if you're unfamiliar with the program it was a fun set up a couple years ago that we just award these funds to folks with no strings attached so that we can encourage you to make awesome and incredible projects and help fund your future so keep it up and if you want to submit go check out our site and we also released our 419 preview last week and preview to actually released earlier today that includes a live link plug-in updates sequencer perf changes VR resolution setting changes which is a really big one that you'll want to make sure to get the scoop on there's a lot of little things like favoriting folders for quality of life improvements and if you're curious we've released a forum post that's about material layering now this is experimental but the team's looking for feedback or comments and suggestions so go take a look at that and let us know anything on Udacity there's a new program it's our a new a nano degree foundation program that's for unreal VR development and so if you're looking to learn about how to develop in VR there's tons of information in this course it's all in blueprints and it'll get you going we've also released the assets for soul city or the soul demo that I know it's been a long time coming but the soul city and soul cave assets are all now available on our marketplace and there's hundreds of textures and meshes and all these things are now available for and they're primarily optimized for mobile so hopefully it'll help your development get going and there's just a lot of cool stuff to go and take a look at or download that's all free we've also announced our winter Yui for Jam so this will take place from February 8th to 11th the theme will be announced on February 8th at the end of the stream and you'll have that whole time to work on your projects and get going and we'll be in out yeah well and that's the theme there and then we just want to give a huge shout out to all our sponsors Intel's joining their rocking some amazing opting SSDs that we'll be giving away side effects is back in and will give us or give away so I'm Houdini licenses assemble is back on board Ben from side effects and Nick from assemblee are actually joining the judging team so we're really excited to have them help out and a number of our marketplace sellers have jumped in and offered to be sponsors so there's a lot of really amazing assets that you could potentially win so we're really looking forward to that this weekend is the global Game Jam so if your if one Jam isn't enough you can have all the jams you ever want and Tom Shannon is actually going to be attending the jam at the New York City site so that's hosted by play crafting and Microsoft he's going to be giving a couple workshops if you happen to be up there he'll do an intro to ue4 and then a rapid game development talk and he'll be on the show floor at their booth if you have questions want to hang out and in conjunction with the gym this weekend we're releasing a new game jam toolkit so this the idea of this toolkit is will help you get running and jump off the ground or jumping off the ground running with or for Game Jam development and hopefully enable you to make some really projects during the jam but you then could use or for the winner you a fortune last but not least we have a great project by or a great video by onset facilities has been released and they go over kind of how their real-time VFX compositing setup is staged and it's just a really really wonderful project we're excited to see it we're really pumped to see it at the top of Reddit and there's just a really really cool thing going on there they have a hole right up on how they've got it going and set up so definitely go check that out so on to our weekly karmic earners these folks are jumping on to answer hub answering questions helping out their fellow community managers so we like to call them out so we have slaw rater BR Marco Jen ve every none death ray no fight Thompson in one three bird free Yahoo paper bag and Jude you guys rack my sex so on to our community spotlight the first one is a project called book it so it's a trailer he actually made it in paper 2d and it's just I know we don't see tons and tons of projects in 2d and so it's all just really cool to see what folks are able to do and it's just I love I love watching this trailer those animations are great it feels like it has just tons of personality and I can't wait to see more of it and release it and give it a try and you got to get to those pina coladas sometime second project we have this week is the behind the beyond so it's a story driven PC game and it's about an agent who is a victim of his own hallucinations and so he's kind of struggling with the juxtaposition of his dreams versus his reality and it just seems like a really compelling story and I'm really curious to dive in and see how he explores these themes even more in the game so our third and final project is a project called I am Haleiwa and it's another animated feature and they've imagined this is a trailer of the more animations tucked away and hidden away from us somewhere but I love the characters it's just this fun animated series here and you know it shows I really love seeing the diversity of the engine where you have folks creating games or tools and then you get these animated shorts or films I like to see more of it and thank you for joining us for our news and community spotlight [Music] [Music] Unreal Engine livestream I'm your host Amanda bot and we have a surprise guest today before Wes jumps on so we have Kelly and Jeff from Intel and they're they surprised us in the office and we decided to bring them on and let them chat a little bit about what's going on or what they're doing here so well thank you yeah it's a pleasure to be on the livestream a long time you're a first-time speaker so basically what we do here a lot of times we've come out for optimization visits in the past so at Intel we are developer relations engineers a lot of what we do is going to triple-a studios and working with them to optimize their games for Intel hardware whatever that may be whether it's the CPU side we do a lot of VR work over there or if it's the GPU side making sure that games can scale nicely to a wide range of hardware it's especially important in multiplayer games like fortnight Battle Royale which is what we're working on here because that lets you get as many players in the game as possible and especially for streaming you see a lot of streamers playing on lower settings we want to make sure that those are representative of the artists vision of the game as well as having a good performing experience yeah so we've done this before a few times myself and Jeff came out for to work on Unreal Tournament last year as well as fortnight saved the world Jeff's also worked on robo recall and Paragon so testament to stuff like this on an application basis we also make ongoing changes to the engine as well so yeah so you know for the upcoming 4:19 release we've got some patches for multi-core systems so if you have a system that has lots of cores now unreal can scale to that high-end system and make good use of it so that's important for both developers and clients that are running the games we've also got a V tune integration coming in so if you're a developer and you like using V tuned to find out your performance issues are that integration is coming and you'll see some really nice graphs where where all your CPU time is going that are annotated with unreal events so if you're familiar at all with pics or Intel GPA you get those kinds of events coming out in vtune we've also we we work quite a lot with with epic we've got a GDC talk coming up if you're going to GDC we'll be talking about some of the optimization experiences we've had with Unreal Tournament and fortnight so if you happen to be there come check it out we've also got site software in telecom slash game dev where we've got a lot of Unreal Engine 4 optimization guides and those get pretty good reviews online there's a lot of people looking at them so especially if you're an indie developer go check those out now you guys do a lot for in developers too like in addition to all this program like or as a part of all those programs it's a lot about helping teams market themselves and like publish and and what all that process looks like right correct yeah we have like a whole until game dev program that a lot of Indies use a lot of it part of it is just taking the you know really high touch work that we do with some of the bigger accounts and then just making sure that we share that knowledge with the end-use as well because a lot of its gonna apply all the way across and especially like learning things you know taking advantage of all of unreal spilt in profiling tools as well as recognizing when like an outside tool might be more helpful and so that's why we mentioned until GPA that's a lot of what we use on-site for things like this but there's also I mean learning how to use a like a proper events tracing and things like that so and we also do buzz workshops and cities across the across the US and I'm gonna talk about what happens at like a buzz workshop so a buzz workshop is generally like a one one to two day conference targeted more towards like indie developers where they can check out talks from fellow indie developers as well as from triple-a studios and people across the community so I actually spoke at Pig squad helped co-sponsor a portland indie game squad and based out of Portland so we spoke at the buzz Portland about unity and unreal optimizations and there are a few other people talking about different ways to publish your game or different ways to approach marketing your game and start building that interest really early so a lot of those are actually still on Twitch and you can catch them I believe like Pig squad still hosts them so I highly recommend checking out some of those buzz videos the Sun green like what a great opportunity for teams to come and learn more about how to really build up a following behind their game yeah and you had one more program you wanted to talk about event yeah we uh let's see well we're doing some some other things around like at GDC we also have like our demo booth and things like that but we also do a fair amount of like sponsoring of different events too so a lot of times will like contribute to other events like train Jam for instance and do like sponsorships through their diversity scholarships so I definitely check out if you guys are interested a lot of times you'll find those scholarships through either throughout their through IG da so definitely something to take advantage of know you're gonna be a train jam I'm hoping I put my name on the list so I gotta figure I'll be there so you join me go rock the train jam so fly to Chicago I in my case I actually connected through San Francisco so I flew from San Francisco to Chicago to go back to San Francisco and then you take a train for 72 hours and you do a game jam on the train which is especially hard because you generally don't have a Wi-Fi so you just have to have everything localized Balearic and their help me pull documentation pull all of that down everything USB sticks everywhere yeah but it's it's an amazing experience like the views are beautiful the community is great so highly and did you want to talk about Grace Hopper yeah so this is still kind of in the works and I'm trying to trying to pull together some of those resources but one of my things I'm really excited about and gets me excited is you know helping other women technically advanced in gaming and I think the best way to do that is to technically prepare them so at Grace Hopper conference this year I'll submitting a few technical talks as well as some workshops and partnering for some speaker panels with some people like epic and to help in kind of enrich the gaming industry with you know that more diverse perspective and also just enable the people who are interested in the industry and have the skills but or maybe just a little worried about their technical skills or something like that making them feel more comfortable making that jump right and so Grace Hopper in general is just a conference for women in tech right yeah for women in computer science specifically so it's it's the largest one there is I think it's like twenty thousand people now it's it's ridiculous and but it's really amazing to kind of see all of those that come together and support each other so it's it's a pretty cool experience it's awesome that'll be really wonderful and exciting to see more about that as details unfold and yeah anything else you'd like to share with our folks this week or look out for improvements in fortnight Battle Royale and other games coming up oh you had some did you have some things you wanted to disclose about 419 or what's upcoming so actually all of those multi core patches that Jeff talked about are in like the pre-release 419 branch now so you can check him out like some of the changes to the effects system and some of the changes like the v2 and integration and things like that and the process is ongoing so there's always more patches to come right and but it's it's just pretty exciting to see see the engine being able to adapt to a new situation and computing today well thank you both again for joining us Kelly and Jeff it was wonderful having you and I'm sure we'll be seeing more of you as you're optimizing all the things here around epic so thanks for joining us and we'll be right back check out this new trailer that we got queued up for ya Peggy 18 [Music] delizioso c'mon I decided that I see a Catholic a chick in Paris unique watch Apple record is Emile a lead up the list and edit box on the Catechism kiss on criminality laganja Luca chalupa talents asset at the resin pony whose cousin committed hopelessly Ruby who dons hop over a melody it doesn't zoom no invite pursue come amid so if it go 48 is a fish of the same his dude addict already gave you the multi pass him on current well usual a possibility to bundle beat them L Danny purchase a look at the West End only Katya publish the module relative Warren Spector generate a personage comes at the different crucian foxes presumably mr. Democritus were common dr. Reid demanded me kiss kiss kiss kiss would you sit well miss each other it's enough for mess room well example a state of Colorado City mayoral urgency really for some blonde feathers a higher DC wet addicted to damage with two felony diseases and I merely need me with a Padonia to suspect registry the journal V Omega done on vaccine underneath here conscript service a saccade the batiste even when I could skid not make him fat hopefully she's listen factor D public support music industrial city do on Levin improve his modes retinol in yes sir a mushy you don't much me imagine a don't don't say to me there we not sit able musicality tester eto presently on fences solitude a salute to and his team silicon technology we salute and bury a country parody for a retreat la compra letter display de Aquila's aunque la voix Voyager entre otros de res emotional tribu a scary video sent requests best year develop [Music] [Applause] [Music] [Applause] [Music] [Applause] [Music] [Applause] [Music] [Applause] [Music] [Music] [Music] [Music] [Music] [Music] [Music] all right welcome back folks I now have the wonderful West bun with me to go over character animation and ue4 feel like it's done a little bit since we've had you on busy and wanted to make some time here to talk about some character animation stuff gave this talk late last year m2f conference and I also did it internally as well to some of our new hires onboarding for if you're already out there working with animation and you read for some of this stuff you may already know about it but you might be able to think of some tips along the way as well cuz I constantly see this on the forums we get a lot of requests for people asking about animation and a lot of help there because obviously it's an important a part of game development and there's a lot to it so we're excited to have you back on have you jumping in and just a second getting some set up here as we swapped out the Intel our dukedom give me just a sec hold a quick one over your eyes yeah alright so yeah we're gonna jump right into the engine actually and just start building stuff like I said this is kind of bit of a refresher for some of you that are already animating in ue4 but there's gonna be some things in here that you may not already know that we could touch upon as well as some tips and tricks she's just improving the look of your characters animation in ue4 so what I'm gonna do is just open up a new project here just launch that nice preview that's available there yeah a lot a lot of great stuff coming out so what we're gonna do we're just going to create a new project from scratch the goal of this stream is to kind of find the quickest way to get a character up and playable that was talk that I gave and a lot of people found it hugely beneficial there are tutorials out there that I've given that takes you from beginning to end the whole end-to-end process starting from completely scratch and building a playable character we have a video tutorial series on our documentation pages covering that but I wanted to do a quick start guide for getting a playable character up there's no better way to do that then starting out with a template because it already has a lot of that stuff already built for you so there's really no need to reinvent the wheel we can leverage some of that content and then just swap in our own mash our own animations any other additional things that we want to add to that character just gives us a huge leg up so we're going to start with a third person template project here we'll just call this the twitch project so create the project and that'll load up here in a second and what we're going to do is we're gonna take some FBX assets and import those into the engine if you have not worked with animation at all before you do need to create your assets in the FBX file format so you can import them into the engine looks like it's gonna compile shaders again so yeah we already have a character that's playable here and all we want to do is swap in our mesh with our own animation so no need to reinvent this wheel it's already done for us we're just gonna leverage that content the first thing I really need to do is import the mesh that we want to use so I'm gonna create a folder in the content browser here just right-click and create a new folder we'll just call this character so and off screen I have some animations that I just downloaded from mixing Oh site so we get a lot of questions about mixing boat characters why can't I use their skeleton inside of before with UV for mannequin I'll touch on that a little bit as we come to it but a lot of people are out there using mix mode characters and they want to know how to get those into the engine with the mix of assets animation assets so have some animations here that I downloaded I'm gonna go ahead and just take this mutant character that I downloaded and just bring him and drag and drop him in to the engine like so and some reason I can't actually select this aspect ratio or something on this is not yeah we scaled up normally for icy stream oh alright it's fine I should be able to do it at the top it'll say FBX import options is what it would see at the top here but I can't actually pull it down one of the most important things about having animated characters in you before is the skeleton asset I'm not gonna go into too much detail about it here because there is this tutorial if you have not animated in you before highly recommend that you come to our doc pages under video tutorials under animation there's a skeleton assets tutorial series if you're getting started this is the single most important series that you can watch everything revolves around the skeleton asset new before the skeleton asset is just a list of its bone and hierarchy information that is used to drive animation in ue4 but to be able to share animations between characters you have to share the same skeleton asset now there's some other things you can do you could do animation retargeting and and things like that but traditionally what we recommend is any characters that are similar enough that they share skeleton assets and this walks you through the process of when you can and cannot share skeleton assets in ue4 so it's about 20 minutes but it is very very beneficial to understanding how animation works in you before with the skeleton asset so I'm importing a skeletal mesh here you can see right here ask us what skeleton do we want to use to drive animation for this particular character there is the UV for mannequin skeleton already here that comes with this template now we cannot select this for reasons which I'll get into here in a moment if we tried to select this we would have some issues and I'll show you why here in a moment so we'll leave this blank so that it creates a new skeleton asset for us so I'm gonna go ahead and click import take just a second to bring that in and we get a couple of errors or warnings about smoothing groups this character didn't have smoothing groups on it so it's just good ignore those and you can see it brings in our character brings in that creates physics asset there's our skeleton asset and some materials well we take a look at that Yury for skeleton really quickly which i can get to if i just select this and wear hours to that that that's quick this up here for a second and take a look at our new skeleton asset that was created so the most important thing about the skeleton asset here is the naming convention and the hierarchy so if you look at the Erie for skeleton asset list the pelvis spine underscore o1 spine underscore o2 etc all kinds of bones that are going to be used to drive animation and we look at our mixed-mode character going to notice that although it has the same names there named slightly different which is one of the problems why we can't share skeleton assets here because the naming convention is different it'll look up for spine underscore one and not find that even though we have spine one here is technically the same thing they mean consuming conventions have to be the same when you're sharing skeleton assets otherwise it won't work there's some also some things about the hierarchy which I'm not going to get into here but check out that working with skeletons video it'll break this down in greater detail but that's partly why we cannot share and use the Yui for mannequin at this point because of the naming conventions so we're going to close these out and we have our character here I'm gonna create a new folder for animations just to keep it nice and neat say animations and we have sever an emissions here that I got from mixed mode as well so I'm just gonna not open it just select all of these except for the skeletal mesh there let's just drag those in okay so this is the animation import it's asking what skeleton do we want to associate these with because we just created one we're gonna point it to our mutant skeleton and we're gonna import all of those take a second to get all these animations okay so we have all of our animations in and we have a bunch of different animations you zoom in to kind of see these we have character this kind of idling here we have walking some running some some attacks etc essentially what we're gonna do is have a character they can run around walk jump attack there's well as some other things that we're going to touch on a little bit later to kind of improve the way that the carrot looks as looks as he's moving just go ahead and just do this first thing that we're going to need if we look at our animations we have a walk here and we have run and we have our idle obviously one of the assets that we can use to blend between those a blendspace asset which will automatically blend between those three animations based on input values so we could use something like speed the speed of our character to determine when we want to go from idle to running to walking etc so we're gonna use a blend space asset to do that for us so inside the content browser I'm going to right click and under animation we're gonna use a blintz place there's two different kinds here this one on the top here the blend space here takes two inputs so you could have direction and speed so if you're moving left and right or forward left forward right etc you would want to use this type of blend space because you're not only taking in the speed of the character but you're also taking in the direction for our purposes we're just gonna use the one D we're gonna have the speed to determine which way we're walking because we don't have any lateral movements we just have forward and back so we're gonna use put in space one D here I'm gonna select this again it's gonna ask again what skeleton do we want to associate this with so I see our mutant skeleton and it created that asset so I'll just give it a name we'll just call it idle like so and if we open this up we're now inside the blend space editor and we have our little graph here to which we can add animations to you we have a 0 to 100 scale here and a parameter that's going to drive this we can change this over the details panel here so the horizontal axis the name a speed is what actually drives us you can see now it updates we also have the minimum and maximum access values that we can change will leave zero for the minimum and for the max how fast our character can actually move start this out at something like 220 we can come back and tune into it this later if we like we'll start it out with 220 okay so that's all we need to get started so we have 0 to 220 when we are at 0 that's going to be our idols so we're all the way over here we're at zero or idling so we're going to take our idle just left-click and drag and drop that in the graph see our character updates and he actually starts idling now and we'll take our walk animation just drag that into the middle so at about speed 110 our character will actually start walking and you'll see as we blend between those as we move this little point here to kind of preview it see we start out at 0 as our speed increases then we go to a walk and then at the end we'll have our run so we could take our run you can run here and just put that at the end so so now we have our run so we'll go from walk to actual run and blend between those ok so speed is gonna drive that ok so let's go ahead and save this ok and the next thing that we're going to need to get our character up and working as an actual animation blueprint to determine which poses is our character will be in what drives those poses what parameters such as speed whether we're in air if we're jumping or not if we take a look at our third person template character and we go to the details panel here it's using an animation blueprint already and we can browse to that animation by clicking this icon here can open it up and this is our animation blueprint here usually consists of two graphs - the two graphs the two graphs - they're of most importance are the event graph and the animgraph which you can see over here on the my blueprint panel the animal graph is the actual final animation pose that your character enters and the event graph is what's going to be used to drive parameters that in turn affect what pose you're going to be in so if we look at our event graph we have things like is the character in the air and there's a variable called speed essentially what we could do is we could just copy because we're gonna use this inside of our animation blueprint that we create in a moment so I can just select all of this copy go back to the content browser back to our character folder inside of our animations and we can create an animation blueprint in here by right-clicking their animation and go to animation blueprint okay again what skeleton are we targeting told you the skeleton is the most important asset targeting our mutant skeleton typically you can leave the parent class alone unless you're doing things like vehicles or excetera you can just leave that alone for now and you can just click OK it'll create our mutant and in BP alright so if we open this up looks just like the other one did except we have no final animation pose but we have our event graph in our animgraph so i'm going to do is just take all of this delete that and we copied it from the other blueprint we're gonna paste it in here with a control v essentially what this script is doing is updating parameters that is gonna be used to drive our anima graph right here it's looking to see if we are controlling this character if we are it's checking to see if we are in error for following falling then it's going to set a variable that we're in air and it's also getting the velocity of our character and determining our speed now we're getting two warnings here because we haven't created these variables over in the animation or in the blueprint section over here quick tip you can right click on these and create variables from those which was introduced not too long ago which is super handy because I do a lot of copy and pasting that used to drag me yeah so we're gonna create a variable from that and we'll create a variable from this by right-clicking creates those two variables for us for compile those errors will go away so we can now hop over to the animgraph and define the pose that we're going to enter here so this is what our actual moment-to-moment pose will be here so for this what we're gonna do is create a state machine and the state machine basically determines based on various parameters what pose our character enters automatically so for that we can right click and we could say state new state machine okay and you can see it has a little output pin there for our pose so we'll just connect that up so and if we double-click on this you can see it has a preview that we can jump into this graph and start editing what our state machine is going to be now we're not going to get too complex here and I'm going to talk about steep machines here in a moment a little bit more but what we essentially want to do is go to our asset browser and take that idle walk run that we created our blend space that blends between those three animations we're going to take that or left-click and drag that into the graph so now we're going to take our entry and just left-click and connect it like so okay so we're doing a little bit of Inception here jumping into graphs in graphs and graphs so we can jump into our idle walk run here double click on this it says it's a blintz pace and it's taking in a parameter speed which we created just a moment ago and this is what drives the walk the idle in the run so we'll take that speed just left-click and drag and drop it on top so and if we hop back up to the animation graph level if we compile the air will go away our character starts idling like so okay so we're almost done we almost have a playable character the next thing that we would need to do is go back to our third-person blueprint hair template character and just swap in our mesh swap in our animation blueprint make a couple modifications and waffle playable character so we'll take this and we can quickly get to it by editing the blueprint here we'll hop over to the viewport you can see there's the mesh components here we have a mesh that's there already and we'll just swap it out with our own mesh over in the details panel so under skeletal mesh click this drop down and select our mutant so now he pops in there and for the animation mode I'll use an animation blueprint but we'll use our mutant animation blueprint character enters the idle there if we wanted to get really nitpicky we could pop him back inside the capsule a little bit like so probably not dropping him down but whatever I think that's the other things that we want to do is we'll take a look at our character movement component which defines all kinds of things how fast we're running jumping walking flying etc if we look at the character movement component and we search for walk speed we're gonna get some values here that determine how fast our character can actually move so inside of our blend space we set our max speed was going to be 220 not 600 here so he's moving quite fast and you can fine-tune these and changes as you like but we don't want to be starting out as always running our max walk speed is actually actually going to be our walk speed which was 110 if you recall so we're gonna set this to 110 actually we're not changing the crouched B but I'll change it just in case so this is max speed walk Crouch we'll set it the same you can set that lower if you'd like and then under event graph we need a way to change what this value is by running essentially played any first-person shooter out there left shift is usually the sprint button so that's what we're gonna do here we do the same thing so right click and we're going to say left shift button so we're looking for a keyboard event the left shift button okay and when we press it do something when we release it do something else and we're gonna take that character movement component and change this value now by pressing this so we'll drag that into the graph drag off of this and we'll say set max walk speed okay so set max walk speed connect this up just copy and paste that so making sure that this is connected then we'll set our max walk speed now to 220 and when we release it will go back to 110 and another thing that we'll probably need a little bit later is to determine when we're actually sprinting so I'll create a boolean that will sit here as well that just says we're sprinting when we press it and not sprinting when we release it so create a variable we'll just call this is sprinting if I hold alt I can drag that in and set it we're sprinting ctrl-c and ctrl-v to paste it I'm check so we're sprinting and we're not sprinting okay so if I cap I'll save this play we should already see that our character is updated inside of the viewport here so he's already there and if we actually play in the editor character can walk around the old shift character starts running it's already done quick and easy got a character up and running now you notice that the character is popping in between our sprint and our walk and even when we stop walking kind of pops into place there's one of the things that I wanted to talk about here so if we hug hop up a little bit and we go to our third person we're changing the value of our walk speed so we're going from whatever our walk speed is immediately to 220 and when we release going back immediately to 110 I've seen people get the current walk speed so whatever our current walk speed is and then interpolating to the max walk speed so I'm blending over time doing that inside of the third person or your blueprint which is perfectly fine you could do it that way if you want we could also change that inside of the blend space asset itself there is an option here for interpolation time by default it's set to zero so some people miss this and they don't set this we could change this value here and this will smooth out that process so it's set to zero now if we set this to like 0.5 for maybe point four or something and we compile or we just jump in the airplane out is one of those methods preferred over the other I would probably do it inside the blend space asset because it's already there you don't need to do any extra blueprint scripting like I said I've seen people do entering and we're going to do a little bit of entering later because we're gonna have our character actually lean to the left of the right when you're sprinting just kind of give it a little bit more of a realistic look right now he just kind of runs and you turn we want them to actually leave in that direction too but it's already there it's an option and some people miss it so I just kind of wanted to highlight that that you could do it right here so you can see now he kind of blends in and out of that a little bit better oh yeah there are some more advanced things I'd like to do in a future stream so adaptive starts and stop so when he you're running the left foots forward then actually shuffle into a stop the right foots forward shuffle into a stop that type of thing as well as starting animations maybe we could do that in a future stream for now I think this actually doesn't look too bad kind of shuffles his feet with that there so it doesn't look too bad so I'm happy with it for now as well as this here this bugs me I want to fix this we'll get that in a future stream where next level yeah so turning 180 degrees I've seen some people ask that on the forums we'll cover that in future stream as well so we can fix this because that bugs me too so we got our character up and working but if we jump we have this problem here which is not not what we want undesirable so we need to give our character jump animation I do have a jump animation here but I kind of want to talk about this as well for those of you that are already working animations you probably already know what I'm going to talk about but bear with me as we cover this because some people don't actually consider this we have our jumping animation here that came in our mix mill pack here's our jumping animation which looks perfectly fine looks good like a good jump animation to me this will not work for gameplay purposes it will work for an NPC that is just gonna jump up and down in a static position maybe you guys cheering for something looks like a chair to me for gameplay purposes this is not gonna work for us we're gonna have to split that animation up and it's already done in the template for us but just wanted to highlight why so if we were to take our character if you can see my mouse here it's kind of hard to see the on this gray on gray background but if we were to jump up on this box and then jump down that might be one animation that we are our fall duration might be a little bit different than if we were to jump up onto this and then jump down or if we were allow going to allow our character super jump into all the way up here for jumping all the way back down the time and air is actually a variable we don't know how long our character is going to be an air so that jump animation that we have provided with us the mix of up act it's not going to serve us for gameplay purposes because the duration in air is going to fare so what we need to do is split this animation up into three different animations a start a loop while we're in air and an end animation which I've already done for us to save us just a little bit of time but wanted to highlight that because some people don't take that into consideration so we're gonna hop over to our state machine and actually do that inside of our state machine so that we can jump so inside of our state machine here we have our idle walk run let's go ahead and give our character the ability to jump now we're gonna take our jump start just left-click and drag it into the graph take our jump loop bring that in there jump in so this is gonna be our state machine okay and what we'll do is to connect our state machine up we're just gonna do what we did with our entry was just gonna left click and drag and connect to our first state which is gonna be our jump start so it's gonna create a transition for us it's also gonna add a transition a rule for us so what determines how we enter jump start okay so that's that's what we're gonna set here in a moment so once we do our jump start we're then gonna go to our jump loop once our loop is done if we decided that we're no longer in air we're gonna start our jump in and then our jump in we're gonna go back to our idle walk run okay so that's our state machine simple state machine but we do need to define the transitions that allow us to get there so the first one is if we double click on this will take us into another graph how do we transition into it well we created that variable earlier that says isn't air are we in air so that's going to determine when we can enter our jump start so we just left-click and drag that on top okay so you can also see is an air then start our jump start now to get to the jump loop what we're going to do is immediately following the jump start we're going to proceed to our jump loop so once our jump start is nearly complete we're automatically going to progress to our jump loop so we could do that inside of this transition here by don't clicking go right click and say time remaining so how much time is remaining in our jump start here good so like that it's gonna give us a float value so we could just drag off of this and is this value less than let's actually make it less than or equal to less than or equal to something like 0.1 we can connect that up okay so once it's almost done then we're gonna go to our jump blue now we're gonna exit the jump loop when we determine that we are no longer in air so we're gonna take this hold ctrl and drag it in and say not so we're not in air and for our last rule we're going to go from our jump in back to our idle walk run very similar to what we did over here finding out how much time is left in our jump in before moving over so we're gonna click that just take time remaining super simple stuff for those of you that are already doing this you probably already know about this but figured we'd cover it before you move on to the more advanced stuff so there's our state machine in fact if we test this we should be able to see this inside the editor here so there we go so we're jumping we're at air and then we jump we go back down if I actually play in the editor we should see this - we're having a little bit of a hitch inside of our animation so as we're jumping there's a little bit of pop seeing this on the forms actually the other day some people don't know about this option as well inside of our transition rule there's actually a blend setting here so it automatically blends by default and the duration is set to point two if you're seeing that in your state machines a blend that is undesirable you may want to come in here and change this value right now they're all set to point to you I'm gonna half that set at the point 1 and see what that looks like select all of those we'll drop this to point one instead play so it looks a little bit better now our loop animation there I probably if I had more time would animated so his arms are kind of flailing in air I literally took the mixed-mode asset and chopped it up so that's another thing to consider when you're creating your animations in your loop you may want to put some secondary motion rather than just being static like that but now we could jump at different different heights so we could jump up here and we can jump all the way down stay in that loop okay so we can jump around which is fun let's give our character the ability to attack and this is going to lead into our talk about animation montages and state machines because this comes up quite a bit on the forms as well when do I use a state machine versus when do I use animation montages okay so if we take a look at our state machine currently so so here's our state machine we have our jumping so we have our attacks here we have a swiping attack there and we have a punch there we could drag these in and create States from these so we have our swiping attack and we have our other attack we could create transitions for these we could say do this but then what if we want to have it while he's jumping being able attack we'd have to drag another one to that and then if we had a second attack what if we wanted to go from this attack to that attack and then going back to idle and it could get quite cumbersome probably the best practice that I could recommend for state machines versus animation montages which are just one-off animations that are called through script anything that has handled systemically inside of your game such as our jump here yes we're pressing a button to jump but it's automatically transitioning to a loop defining when we land is not being handled by us it's being handled by game play so when we land it's going to to jump in and automatically going back to the idle that's a systemic approach to setting up our state machine here anything that's handled like that you want to put inside of your state machine anything that's one off tax or one-off animations you probably want to do those inside of an animation montage and layer those on top through a slot node which we're gonna do here in a second there's an additional reason I'll cover here in a second as well but that that's a good way to think about it anything that you want to press a button and something happens you could probably do that in animation montage it's not to say that you can't do them in state machines but there's more flexibility I think with an animation montage just want to kill those and we're gonna create an animation montage okay so we'll go into the content browser here the right-click and under animation we're gonna create an animation montage and again what skeleton are we using we're gonna be using our mutant skeleton so much like that and we'll just call this the attack era we'll call it the meet the attack okay so we have a mutant attack now we don't we have two attacks and we could put both of those attacks into our montage and then selectively play which one we want to use which is another benefit of using the montage we could call one asset and play a particular animation from inside that I've set directly so I'm gonna go ahead and open this asset so here is our montage section where we can define which animations make up our montage I'm going to take our swiping montage here play it our character starts doing a swipe like so pause that let's take our punch so we have two animations in here we have this left attack as well as a right attack so it's a little punch like so so what we'll do is we could section these off now so here's our right attack all right at the break there I'm going to right click up here on the top and create a new section we'll call this the right attack I'll right-click anywhere in here create a new section we'll call this the left attack let's make sure I spell that correctly that would help okay I'm gonna drag this all the way to the beginning taking out our default so that it starts at the beginning we don't need this default one anymore so we'll then delete that so these two sections in here so it's cool now is that we could play this and we could leap one section if we wanted to we could jump to the first section or jump to the other punch like so and we could do that with our animation montage the other thing that we could do that would be a little bit more difficult to do inside of a state machine is set up notifies inside of this animation I used to work on UFC games back in the day so I used to fighting games and the concept of frames inside of an animation is super important when you're working in fighting games and combo systems and things like that we had this concept of the initialization the commit and the resolve so when you initialize an attack you'd have a certain amount of frames designated as the initialization it's like the warm-up frames essentially following that you would have the commit so I initialize something once I've decided that I'm going to commit to it I proceed into the commit frames and inside the commit frames you may have like a reversal window so being able to counter that you'd have a section of frames designated as a reversal window and if opponent in put something in that designated window it would branch out and do a different animation they don't it would go into the resolve which are the actual follow-through so it'd be those three stages that we would run through on all of our animations and also in the init you can also cancel it out you could have a section of frames where if you start you can cancel and go to something else so super important being able to designate those sections of frames inside of an animation which would be difficult to do inside of a state machine be a lot easier to do inside of an animation montage we can come down here and we can add a notify saying that we could say that this up until this point here we could add a notify and say that's the end of our in it and then we can come up here and say that's the end of our commit and being able to branch out based on those frames there can super super high-level stuff there's a lot more to it than that but that concept you could do inside of an animation montage that you couldn't do inside of a state machine so another reason why you might want to use this I'm not going to get too engrained in a combo system with our character here we just want them to be able to punch an attack so we're just gonna do that for now we're not gonna put any reversal windows or anything maybe later so we have our two animations in here sure that we have our left attack and a right attack in order for this to work we need to use what's called a slot node you can see right now we're currently set to use a default slot we're gonna create our own slot and assign that here by clicking this icon it's going to bring up the atom slot manager and we can add a slot and we'll call this the attacking slot like so we'll make sure that our animation montage is using that attacking slot okay let's go and save that and what we'll do is we'll come back to our animation blueprint here go back to the top level of our state machine here and make sure that we actually give this a better name then state machines will call this basic locomotion like so okay so we have our basic local motion that is being used to give us our final animation pose here but now we want to add in attack an attack on top of that so we're gonna do is we're gonna disconnect this for a second and we're just cache this off saving this post so that we could use it throughout our animation blueprint so whenever I go for this and say cash you save a new save cache pose to on that rename this and we'll call this the loco cache something like that okay now we can use this anywhere we want inside of our animation blueprint cuz we have a reference to what that pose should be so you can say use local cache pose this is something that we do quite a bit on our games here we have a lot of cache poses that we're doing all kinds of layers and blends and state different state machines being blended together using these cached poses so we have our cache pose here which is just the result of this drag off of this and use a slot okay that's our slot nude and on the slot node see it's set to default slot we have to change that to use our attacking slot so we changed it over to that and once we do that I'm gonna catch this off as well so we'll say and we could say okay so I'm gonna plug that tacking cash in for now so if I compile and I have these two things all these things running at the same time here do you need to give our character the ability to attack here we haven't done that yet so we're gonna have to do that inside of our character blueprint so now we're left shift here directly below that we'll have our left and our right mouse button perform our attack so we'll just say left mouse button right mouse button do our attacks okay and what we'll do now is we'll say let's play okay so we have a play and a montage nib now there is another play montage nude up there as well an additional one select that's gonna give you much more options which we don't need for this particular example you could see there's on our there's our on notify begin or we could say that the reversal window has started if the player if the opposing player performs an input at this time then reverse etc things like that could be done right here with this animation play animation montage note so it's just easier to do that inside of the montage than the state machine so let's take our left mouse button pressed and let's go ahead and change this and use our mutant attack that's asking for the start section name which is currently set to none naming conventions are super important here you have to use the exact same names that you used inside of the montage we have left attack and right attack make sure those are spelled correctly so we're gonna say left button is left attack copy and paste this won't change this to you right tack okay so we have our attacks in their play so our character attacks now there's a big wind-up nice little hook I cancel these out at any point right now they all blend from one another just great but if I move her gonna have a problem so our character still playing that full body animation while we're moving which is not ideal if we were standing still potentially we would one our character play that full wind-up and attack like we're attacking this box here killing that box as we're moving we're going to want to play just the upper body and keep our lower body for the locomotion so I saw this actually come up as a question on the formed for this tutorial or the switch stream how can I do split body animations like this reloading a gun while the character is running we're going to show you right now you can take these same principles that apply it to any animations that you want so we're gonna have our character attacking while he's running so we'll go back to our animation blueprint here and it's going to just connect this see that and there's a skeletal control node that we're going to be looking to use here called layered blend per bone okay so this is gonna take two poses and blend them together at the specified bone okay an all right our instance what we're gonna want to do is actually blend out the spine here so we want to blend the upper body and the lower body starting from this location here so inside of our blueprint what we could do is we could take this with our new tunic selected here we're going to go over to the config section expand this and add a branch filter plus it's gonna ask for the bone name which is called spine spine okay blend depth how much do we want to blend this let's say we'll start out with something like four four now see what this looks like do you want to use mesh space rotation yes we do check that I think that should be all the settings that we need for now we can fine-tune these later okay so we're gonna take our locomotion our locomotion which is just the locomotion without the attack we're gonna take this and copy it and paste it it's gonna be our base pose we're then gonna blend in the attack okay and what that's going to give us if we connect this now we play so now we're playing it just the upper but if we're moving it looks okay so looks okay well we're moving but for standing still we don't want to do that layered behind we want the full body full wind-up all of that included not just that because that looks kind of funky so what we would do is we would run a check to see if we are moving if we are moving then we'd want to play one pose if we were not moving that we would want to play another pose so we're gonna do is we're gonna use a blend of poses by bull no it's a right-click and we say blend you say playing the bull maybe it come trap yeah so blend poses by boolean so true or false are we moving or not true play one post falls play another so we're gonna connect this up and if we are if we are moving then we want to blend both of those together okay if we're not moving then we want just the attacking catch we don't want the locomotion just where to plug that in think so okay so this is why we wanted to catch these poses off because we can use them and we use them as much as we want so for the boolean here we don't know what this is gonna be yet so I'm gonna right click and promote this to a variable which we'll just call is moving okay compile right now we're not moving instead of false so if we hop over to the event graph has recalled the event graph is going to determine an update variables and parameters that in turn drives our anima graph so we already have this speed variable here which if it's greater than zero we are moving so we can essentially just run a check right here at the end if this value is greater than zero then we're moving setting our boolean here so what we'll do is we'll just well be and left-click to create a branch which is a true or false check take that speed variable just drag off of it is this value greater than zero it is I'm gonna hold alt drag this in set this to true copy and paste it set that to false okay so this is updating what's driving this here it's updating that parameter now we're not moving so it's playing the full wind-up which is what we want for running then it's playing the upper body again there's gonna be some funky mess with this as well the Soraa gets to fine tuning the animations if we start an attack so a full body attack like this because we're not moving and they only start moving it looks a little bit funky to me just maybe a nitpicky conversely if we're moving and then we stop and we let go you could make it so that your character can't move while he's performing a full body attack but that's no fun we could actually on the Blin hoses bye bull here we could change the blend time currently it's set to 0.1 we could bump this up to something like 0.5 maybe that'll smooth that out a little bit between blending and true and false so it's still not going to be perfect but if I do a full body and then I start moving blended a little bit better than it was before there's a little bit of foot sliding I would come up with a better solution if I had more time but I think that's good for now yeah so our character can't act we could jump an attack we could do all kinds of stuff which is fun we can run let's go and give our character the ability to kind of lean into the turns a little bit just to give it a little bit more of a dramatic feel to that running animation a couple different ways that you can do this I've seen this done with blend spaces so we've already created a one dimensional blend space that is being driven by a parameter you could do the same thing here you could have a bunch of different poses for different leanings and blend between those based on the direction that you're going try to come up with a cheaper quicker way to do that what we're essentially is going to do is take our skeleton here if we go up to the hips all we really want to do is just tilt the character in a direction obviously we don't want to tilt them too much because it's the route bone but if we tilt them just a little bit it's gonna look like he's turning into those so we're gonna take that hip bone and just rotate that based on which way our mouse is moving so our mouse is moving to the left the character lean to the left it's moving to the right the character move to the right because that's essentially what we're doing to drive our character here inside the level so for this what we're gonna do is it's about 3:15 so we do want to get to some questions yeah we're here for us so let's let's catch this off as well so that we could save this so this is our attacking and our locomotion so we'll drag this off and what we're gonna do is now you use go in attack and to modify the the hip bone there's a node called modify transform modify bone this is what we're gonna use here so like that and we can modify the scale and translation if we wanted to but all you really care about is the rotation here so I'm gonna select this node and over in the details panel here let's go ahead and uncheck translation cuz you don't care about that uncheck scale because we don't care about that all we care about is the rotation and we're going to add to the existing okay and for the rotation actually if we right-click on this pin we're gonna split that up because we don't care about the role in the all all we care about is the pitch of the character so we're only worried about this value here okay so essentially what we'll do is let's go ahead and connect this up so let's go like this to that for now just so we could see it and for this rotation we don't know what that's gonna be it's gonna be a variable based on the input of the mouse so we're gonna right-click on this or promote that to a variable and we'll call this the lean value she's gonna give us the lien value oh we also need to specify what bone we're modifying cuz that little bit so let's go ahead and make sure that our bone is not none but there we go it gets rid of our hair so how do we do certainly what this value is we're gonna go back to the event graph and let's go ahead and go back somewhere over here it's right here we're getting the pawn owner who owns this character or this pawn essentially we're gonna use what's called a cast node to cast to our third person character blueprint here so that we can get the input value from our mouse input here so what we'll do to get us started we'll just drag off of this I will say cast to third person character this down here for a second and just to make things nice and neat well the sq and create a sequence node which is just a series of things that we're gonna do this reconnect that so it does all of this stuff there's all of that stuff and then it comes by and does this essentially what we're gonna be doing is setting this value so alt dragging that in like so so we're gonna be setting that we don't quite know what that's going to be inside of our third person character yet when I compile this and go over to our third person character blueprint and up here we have the input access turn which is a binding used to determine when we're moving our mouse left and right essentially they lookup is up and down so it left and right the turn access value this value is what we're going to want okay so what we'll do is if I play from here real quick see that this movement forward is always firing it's constantly firing so we're gonna piggyback off of this find out what we're moving our mouse and use that to drive our leaning so ahead and let's create a variable inside of here so this is the player lean out like this make this float let's go ahead and we're going to be setting that now so well don't bring that in okay so this is following the move forward we're setting this value player lean amount and what we're gonna want to do is interpolate from our current leaning position to whatever the desired leaning position is I talked about this a little bit earlier in the stream the internet so we say F Terp - so float interpret - essentially allows us to blend from one floating point to another this is gonna be our result so we're gonna take the current lean them out based on the target and blend from one to the other now the the target and the speed at which we want to interpolate are gonna be variables okay they're gonna depend on a couple of factors that were talked about here development the Delta time we can just reverse drag off of this and say get world Delta seconds so but the target and the actual in Terps PD is going to be a little bit different so what we'll do is we'll create a function to handle retrieving the target and the interpret for us so ever in the my blueprint panel I create a new function we'll just call this the calculate lien amount so it's gonna have two outputs it's gonna spit out those two float parameters that we want so we'll click that button and change this to a float we'll say this is the actual lien amount another one this is the speed so okay the other thing that we're going to do is make this what's called a pure function so I'm going to check this option here essentially what that means is when we come back to our event graph it has no executable in our outs it's just a getter essentially for us so I drag it in it has no input bindings on it all it does is to spit out two values for us so I actually spelled enter bran which is awesome I'm sorry our lien amount is gonna be our target our interview want to connect that like so this will give us okay so let's finish off how we get this now so the first thing that we're gonna need is that turn access value what we could say is just get turned access value okay this is gonna spit out a float for us it's gonna be positive or negative essentially we want to know soon as we're moving left or as soon as we're moving right so negative 1 and positive 1 essentially zero right in the middle we don't want to go higher or lower than negative 1 or positive 1 so we're gonna clamp this return value here so we could say clamp this float the minimum being negative 1 because we don't want super crazy and lien values we just want to know where we're moving left or right so we're gonna clamp that now we're not gonna plug this directly into the lean amount yet we're gonna do some additional stuff here that we're going to be checking for we only want to be performing our lean when our character is running we're walking in trying to lean I don't think we want that lesser characters drunk which is fine oh boy so we're gonna run a check here we're gonna say in sprinting we're going to get that and we also don't want our character to be leaning as we're falling unless you want to you in our case we don't but four characters in air we don't want the character actually leaning as well with our left or right mouse button or our left and right movement access so we'll take our character movement here just control drag that in or just drag it in we'll say is falling it's going to take both of these and we're going to use say either of these orbs a [ __ ] billion so either of these are true so if I'm not sprinting or I'm falling then we don't want to take this turn value we don't want to allow our player to lean so what we'll need is a select node okay and that's actually gonna be our lean amount so let's go ahead and plug in so if either of these are true we don't want to apply lean so we're gonna leave that to zero either of these are false it's not then we're gonna take that and apply it so that's how we're getting our turn value the other thing that we're going to want to do is set our in Terps speed similar to what we're doing here is checking if we are falling or sprinting what we'll do is we'll copy our select node paste this and plug that in and we'll set false to true too so essentially what we're doing here for in our in Terps speed if we are falling or we've now stopped sprinting if either of those are true we want to quickly get back to our default position if we are just leaning side-to-side we want to use this value of one to slowly interpolate from the left to the right but if you're coming to a stop you want to instantly view back to your default position without actually applying the lien so we're going to quickly get back by upping the interpret that's getting piped through here so if I compile our event graph is set we do need to go back to our third-person animation blueprint real quick or not this one but mutant animation blueprint and retrieve that now so we have our clearly no mount we're now going to get that inside of our animation blueprint here so we could say get they are the main amount and we're also going to apply a little bit of an offset to this so that we get a better a better lien if we were to plug this directly in it might come out a little bit funky so we're gonna do a little bit of an offset to this which we can just multiply float by and we'll say something like we want to Caprona this to variable and change it later we'll saline okay plug off that in this works so it's super subtle you can see the characters kind of leaning into the turn now super subtle but it gives it a little bit more then not having I think it looks more realistic while we're walking and we're moving left and right characters not actually leaning but as soon as we start sprinting kind of leans into that turn again you can do this with blunt spaces I've seen it done that way I don't know which way is better just thought this was easier quicker and easier than having the animation blend spaces and blending between those but totally up to you how you want to do that so cool character looks pretty cool I did have one more thing on my list and this was actually one of the questions that came up yesterday so I kind of toyed around it your tinkered with it to try and fit it in for today's that's all I had so we're starting we're starting the Q&A how do I look at something so right how do I manipulate a specific bone to look at a specific object inside of the world procedural animation essentially we do have skeletal control no it's like we've been using we've had you have to modify bone which is modifying the rotation or location or scale but we do have a node specifically for looking at things so we're gonna use that now so before I do that let's go ahead and cash this off as well disconnect that that's someone who's asking are these cash poses really taxing on performance or is it actually easier because it's just using I think it's easier to use like this I'd have to do some digging I don't know that there is a significant performance hit on this I know that we do it a lot with our Paragon characters for tonight I'm not 100% sure how much they use it but I know I've seen it inside of the Paragon characters where they're caching off state machines for basic locomotion state machine for upper-body a state machine for full body and the Castros off and blend those together okay I could double check and see like what the actual impact is post with it it's going just say this is this is the fool okay so that we have that okay so let's go ahead and right click and say use right click and we'll say look at this look at again it's gonna tell us the bone that we want to modify okay so we could start out by coming to the details panel changing this will say head for example so you want to turn the head to look at something and we also have the ability on the target here we have a look at target we can expose this as a pin so we can provide what this is gonna be because we don't know what the object is gonna be that we're looking at in fact I'm going to right-click on this and promote this to a variable which we'll just call look at target so as soon as we connect these up we're gonna get here just converting that for us so back on our look at that's gonna compile this zoom in a little bit this is where you're gonna have to do some tuning and tweaking so our character is currently looking in this direction of the line right here if you go to the atom preview editor here you can see our look at target target is exposed we could've tweak this around and play with this we could say look at something like that and you can see that the point moves but our characters not actually looking in the right direction what we're going to need to do is come over and make some changes to our look at access and look up access settings here so when I expand these okay so by default our access is currently set to use the Y so our green here it's actually using the Y it's looking at which is not what we want to do we want to change this so I'm going to zero that out I'm gonna make the Z or look at access okay so now if I compile he's still looking down but if I change this to something like 500 now he's looking in the right direction she was actually looking down the Z which is what we want so based on your character you may have to tune in tweak what this is for this particular character we had to set the Z as our look at access we're also going to do the same for our lookup access if I change this to zero not to one as well okay and they look at at access defines what we're actually looking at the look up access is going to define which way we rotate what we're actually looking in a direction it's a little bit misleading lookup access but it actually determines which way we're looking left and right as well as I guess which we'll see here in a moment so let's go ahead and leave that like so for now the other thing that we're gonna need to do is we don't always want this running we only want this running when we've determined that we will have a point of interest for our character to actually look at right now it's set up to always use this which is not what we want so we're going to use one of the notes that we've used earlier today which is the blend of poses by bull now we're gonna say should the character look at something if so then go ahead and do all of this if not then just play the regular locomotion so want to copy this paste it down here so disconnect this so let's connect that like so let's take our full locomotion copy and paste that so our bullying is saying or should we look at something true then do all this if false then just do the regular locomotion I'm gonna create a variable for this which I'll right click wrote to variable which I'll call should look at target and now we'll connect this as the result let's go in compile at so now it's false fixes our characters head whenever this is true then it's gonna try to look at something which is what we want so going to look at something it looks down there's our page sweet so what we need to do now is find a way to set this boolean value how are we gonna set that so what we're gonna do is we're gonna need to create a simple blueprint object for us to look at so let's go ahead and come over here it's gonna create a new folder called blueprints and inside of it I'm just gonna create a new blueprint of the actor type and just call it the look at square B P look at so this blueprint is the thing that we want to look at in the level that we can drag in place anywhere in the level the player approaches this object will spit that information to the player of the location of the thing to look at updating our animation blueprint now to do all of this back and forth and talking between different blueprints this gets a little bit outside of the animation blueprint talk but blueprints is used throughout Unreal Engine so it's good to have a general understanding of blueprints and especially blueprint communication so we're gonna here's a form of blueprint communication here called an interface which is just an intermediary object that we can send information to anybody out there that's listening to that can then receive that information and then do something with it so I'm going to create a blueprint interface by right-clicking going to blueprints and create a blueprint interface and we'll just call this the send location interface I double-click and open this up it doesn't have any components or anything like that all it has is a function we'll just say this is the sin object location function and it's going to have two inputs on it one is should we look at something so should look another one which is going to be a vector the actual location of the object that we should be looking at so we'll say look at target okay so now if we compile it save it come back to our look at blueprint open that up and this is just a standard blueprint now the question of the form actually mentioned having a character walk by and then the plan character to respond to that character and turn the head you could do the same thing you can add skeletal mesh in in this blueprint and animate it so that it walks by or any kind of object that you want to look at can be done inside of this blue for it's completely up to you for simplicity we're just going to add a static mesh place it into the level add a trigger volume the player enters it look at that static mesh so that's what we're gonna do so I add a component which is just the static mesh so and I add another component which is going to be a box collision okay so clarity we'll just call this the trigger box so well give a static mesh here we'll just add a cube in like so we'll take our trigger box hit R and just scale up our trigger box something like that well the event graph for this take our trigger box over in the details panel we have options that tell us when the player or win something overlaps it so on component begin overlapping this trigger box and in so when the player or something overlaps this click the button to add that I'm gonna click the button to add the end overlap as well now as all kinds of pins on it the only one we really care about is the other actor who overlapped this trigger box and I drag off of this and say cast to third person character so is it the third person character that overlapped at this box if it's not then we don't care what it does if it is that we're going to do something copy this paste it down here as well like so if it is what we're gonna do is call our sin location which was send object location say send object occasion there's our interface there's the message see it's got this little envelope ready to send so we're gonna connect this target it's gonna be our third person in the print so we're gonna send it to them should we look the object when we overlap the trigger box yes we should what is the thing that we should be looking at we're gonna take our static mesh here and just drag it in and then get the world location of it so where is it in the world that's gonna be the application to look at a copy and paste this down here connect this up should no longer be looking at that object cuz we've exited the trigger volume we're in a zero out to look at target it's all we need to do for our blueprint in here it's a simple blueprint for pickup actors or if you have something in your level that there's a point of interest for your character you could do it like this so then we could take this look at blueprint just drag it into the level like so I think that looks good so I'm trying to look at this box during the volume there's our blueprint the next thing we need to do to finish this off we need to come over to our third person character and inside of it we need to right-click and before we do that we need to implement the blueprint interface so that it listens for that call so we're gonna go to the class settings and under interfaces we're going to implement that send location interface and now we could say object send object location so now whenever that interface is called this blueprint is listening and will execute off of this and can perform any kind of script that we want so what we're gonna do is let's go ahead and that's first of all I'll promote this to a variable so that our animation blueprint can reference it as well it's gonna right-click on that promote that to a variable it just called look so well being left-click to create a branch and what we're going to do is we're also going to promote the look at target as a variable so the object of interests we're going to promote this to a variable called object to target so that's all we need to do for this I'm gonna compile that the last thing we need to do inside of our animation blueprint is now retrieve that information and pass that through so let's go ahead and do that we just double check my notes actually this first amended look at on this make sure we're doing this right yeah all right so let's go ahead and so we're gonna get the variable that we created this should we look we're gonna retrieve that value for this and say should it should we look okay then going to branch based off of that if we should be looking at the object should we be looking at the object if so we're then going to set inside of our animation blueprint should we look at our object to true and then what we'll do is we'll take our look at target will also populate that as well so I'm gonna hold alt bring that in and inside of our third person character we are storing that object to look at so we're gonna pass that through so we'll say get object to target and that's our look at target okay so that's what we should be looking at if we shouldn't be looking at the object we need to tell our animation blueprint to not look at the objects we're gonna copy this and paste it pop this down so let's compile and save that oh you know the other thing I want to do is our character kind of turns his head looks at it there are some problems which we'll fix but it's working he is looking at it really wants to look at it but he's looking at the object which is a good start so let's go and fix the problems first thing I want to do is move make sure that we turn on the collision box I could see where it should be starting in nuts do leave time for some of the other questions these windows are all like crazy that's its value I'm not trying to say that for the community's long as you guys are kicking me out good here for them that's what my job does let's leave our trigger box on so we can see where we need to enter the volume so we're almost done then get to your questions in about three minutes all right so let's fix our head problem here let's go into our animation blueprint and let's go to the anima graph it's a couple things a couple things we could do to improve this first of all let's take a look at the bone down inside of the on the look at noon we have the ability to clamp the degrees in which we want to limit this so the first thing that we could do is try clamping that so let's try and set this something though to start say something like 20 to start something like that let's see what that does the other thing that I just noticed that we missed in order to actually rotate the head we need to enable our use lookup access we've set it but we didn't tell it to use it so I need to make sure that that's checked actually so now we're going to use our lookup access of the Z so now if we compile see if clamping and using our lookup axes helps so now he's kind of looking at it but it's still not quite what we want it to be so what we can do is we come to this back to our animation blueprint right now it's using local space to actually look up on our lookup access here we want to use the world space gonna uncheck this this is on buddy fault we're to uncheck that let's try it again looks a little bit better he's turning his head but it's not all funky and we've clamped it so it looks a little bit better but this comes in to some more of the fine tuning that you may want to do so right now we're turning the head which is perfectly fine to leave it just like this but traditionally when you're looking at an object you're gonna rotate your body to so you're gonna turn the body and turn the head kind of turn and look at something so we're gonna add another look at note here this is totally optional but it's gonna give it just that little bit more of realism to it so I'm gonna take all of this and just move that down just a little bit when I copy this look at noon paste it look at target it's still gonna be the same except this time we're modifying we're gonna modify a different bone so let's go and connect all these up so it runs through all of those like so so that's like this and let's try doing we'll do just like the spine we could probably do the neck but we don't really want to rotate the neck we want to rotate the torso so we'll try spine go on and see if that looks like for this for this one that's make sure everything's still the same that should all be the same for this one we're going to use local space here so that it rotates the body in local space but the head stays in the world space if we had both using local space it would get confused that it would get all contorted so for this one for the spine we want that to be in local space so it turns the body towards the object and the head follows in world space so that's what we're gonna do so let's go ahead and make sure that local space is checked local space is off on this one can also clamp this which will probably collapse this is something super small let's just have this something like ten see what this looks like so super minor thing just adding that extra node in there seeing what this does let's see as I come in I'm kind of turned quite a bit probably clamp that 11 mornings turning all the way around so let's go ahead and see what's going on here just make sure that I didn't set set this wrong so we're doing spine yeah wanted spine wine local space just double check a couple things here get some live debugging here quite sure why it's doing that or the significantly yeah literally just created this yesterday so looks like he's trying to pick a fight with the box I know right I have to debug this off and see why this is because it literally is set up as my other project but that gives you a starting point this should give you a starting point to look at objects in the world yeah of course I'm missing a checkbox or something it's got to be something yes so yeah the body turns a little bit the head follows this is what it should look like but you get the idea yeah fine so they look at note is what you'd want to use do you wanna get the questions in now I think that's all I had there have been a lot of questions that if you're ready alright alright go for it let's see some of the questions okay let's see so I guess we could start with the ones from the forge yeah so start at the top alright so start from the top some of these were from the forms I tried to get some responses for try to get through these quickly so on the rigid body note is there a way to transform a bone driven by rigid body note so basically modifying the via additive or modify down and then applying rigidbody to that essentially I think what they're trying to accomplish is having a bone using the transform modify to move that bone and then applying a rigidbody to that in theory this should work I spoke with our team here and theory this should work it should you should be able to move the bone and then have the rigid body respect the new location but speaking with our team they recommend that you don't move joints that are being simulated as you may get undesired results so in theory it should work but I wouldn't recommend it what you could probably do instead is use a separate mesh like so a separate skeletal mesh so if you have a weapon that you want to move and then have it like dangle or something like that outside of the main mesh you have your character with all of its bones and then you have a weapon mesh there's a separate thing that's attached and then moving that and then using a rigidbody on that to simulate physics that would probably be the better way to go then applying the rigidbody node to a bone that you're moving on a character that that's moving as well so that would probably be the way to go I would I would assume would probably the best way to go other than another rigidbody node question can we use the fad collision system inside the rigidbody no to have bones affected collide with external objects I believe that you can interact with static meshes that are not dynamic often double check on this I just got this answer before I came on the stream have to double check on it but this node was meant for secondary animation not necessarily for a full physics simulation mostly for like dangly bits ponytails weapons that you want to jiggle because it will interact with yourself but external objects it's not meant for that purpose I was meant for a lightweight solution for things like that for secondary and motion animation but I'll double check with with the ability to interact with static meshes covers something like hit feedback applying on a scout's mesh by bone or something like that there is so the user is asking about physical animation we do have a content example for that actually have that set up so I was prepped for that we do have a Content example for this there's a whole physical physical body animation physics blending to hit reactions I would take a look at this because it sounds like exactly what you're after so applying you know impulses to this I'm not gonna go through the blueprint here but you can take a look at this blueprint it should walk you through your own how to set something up like this because that sounds like what you're after it's just blending between simulated bodies would it be possible to cover the subject of this distance curves movement system animation following the capsule this was shown in the Paragon animation techniques video I wanted to cover that in this stream actually I was instructed that we cannot do that just it cuz it's not quite ready some of the character movement improvements that are coming that'll have to be a second stream future stream what the yeah I could share it with them I can drop it in it's not the link Ally yeah so this is what they're talking about Laurent created this or you can google bringing a hero from Paragon to life with you before all right gave this presentation before it's super technical presentation on character animation if you haven't seen it before highly recommend that you check it out there's some breakdown of how we do things in Paragon with respect to character animation some of that stuff is coming into Yui that the main branch of ue4 I don't know when but we will have a stream covering that down the road and they're specifically talking about the speed warp being orientation warping things like that coming a little bit later I drop that link in chat there's a PDF in there as well copy I can check out they may want to check out you with more information and it's a procedurally Forsett characters aim animation to always align the hand with crosshairs no matter the animation might maybe get a little bit more information from the user that posted this question but a name offset should do this for you as you could specify the values that you want to drive the animation I don't see why it couldn't if you haven't been using a name offset I would recommend that if it's if there's more to that question please post it in the forums I'll try to see if I can get a better response but Fame offset should cover that for you let's see switching animation blueprints for pod in real time with blending from the previous pose to the next pose for example you have a character that has an animation blueprint interacting with vehicles and you want to switch to another animation blueprint you may want to take a look at this page I'm going to bring this up so this is on our official documentation pages so for that particular instance you may want to use sub Anam instances because that'll allow you to take the pose from one animation blueprint and blend it with another sounds like what you're after if you haven't seen this page before check recommend searching for sub Adam and I'm instance maybe also to get away with using child animation blueprints I'm passing the pose data off to your child as well it was just depend on how you want to do the blending but that would be the place I would start see another question on restricting the distance rigid body moves away from the character for character moves too quickly because of force or animation the rigid body can't keep up or is a little bit glitchy or stretchy I would recommend that you take a look at the physic physics asset actually because the rigid body is pulling from that that's where you're going to want to do your constraints not necessarily on the rigid body note itself let's go ahead and bring this up real quick so I did a twitch stream before so then switch stream before about using animation pose snapshots and essentially blending from a pose where you're laying on the ground and then getting up out of a ragdoll but in this stream I also talked about constraints on the physics bodies because our character was flailing all around when simulating physics inside of the physics asset editor you can specify angular and swing an angular twist all that stuff you could specify inside the physics asset and apply constraints there so you're not necessarily gonna do it on the rigid body node you do it at the constraint level inside of the physics asset so take a look at this strain about 20 minutes and I think I talked about the physics asset a little bit it's a little bit older the physics asset editor has changed but the concepts still apply and the values and properties are still there for you to tune in to week so take a look at that there's a question on how do I keep my state machines tidy I guess we kind of already talked about it before using multiple state machines and caching those poses off and instead of doing everything in one state machine if you take a look at that put that link that Amanda shared earlier from Laurent where we talk about Paragon characters there's a PDF in there that will illustrate how we set up our animation blueprints and you'll see that we have it's very structured we have our basic locomotion which is just one section and that's all it is is locomotion it's it's falling it's jumping it's stuns it's reacts it's things like that it's not including attacks that's not in our basic basic animation or locomotion set and you'll see if you take a look at that we have how its structured that we have multiple state machines feeding different throughout the animation blueprint so that that would be one way to organize your state machines there's a question about covering a reload animation locomotion is active so walking while reloading we kind of did this at that in this stream we did a character that can walk and attack at the same time it's the same concept you would just use different animations there is a link that we shared for that in the docs foot bring that in squinch bring it in so I do cover that in this tutorial if you look up using layered animations on artificial dog pages it's a character that walks of course like that for real but sure there's a character that walks runs shoots at the same time so as I'm walking I'm firing a gun you could do the same thing with a reload same same concept so take a look at that page to achieve what you want let's go and take a look at some of the questions that came up during the stream if I can't get to all of these I'll try to answer them in the forums as well so it is there information in the Yui for documentation manual regarding conditional reactive animation blending such as bumping into NPCs probably want to take a look at physical animation in that instance physics driven if you want it more procedural might want to use montages or I mean it just depends it largely depends on how you want to set this up but physical if you're looking at physical reactions I would look at the physical animations stuff is that might get you what you're what you're looking for is there a way to randomly select multiple item a shoe idle animations on a blend space not a hundred percent sure I'm trying to think offhand I would tackle this might have 100% sure because I know inside of our balloon space you come in you put in the one animation how would you make this random can you expose this as a pin yeah you can so that's probably one way you can do it if you take your blendspace here and you expose it as a pin you can then type in whatever animation you want could you could you select from an array of yeah well this is actually this is the actual blend space now that I think about it it's just changing the actual blend space here it's not changing the animation inside of the blend spaces which is what is what they're after I mean you could have multiple blend spaces with different animations but that seems a little bit contrived I'd have to think about this maybe I can take a look at this at my dance I can find a best way to accomplish this I see what they're after some folks are saying add multiple I don't animations and then blend from those to the sort of blend space yeah you could do that yeah you could have in here the actual idle and then blend that in yeah you could totally do that should I think if there was a way to set it inside the blend space itself I don't think there is but yeah you can blend any animation here and then just like you said an array just randomly picked from those it's an animation retargeting targeting doesn't correctly work in 40 teen so animation retargeting for in for 18 there appears to be some issues I might have to get back to my desk and look at this and see what this is not quite sure what what has changed in for 18 for animation retargeting so we're looking at what is the right way of implementing character role prone animation considering root component there with their parent capsule on the character I'm thinking that some of the stuff that we're working on for the improvements is going to account for this some of the distance matching stuff that we're working on that's going to also be coming into Maine soon inside of the animation post snapshot twitch that I did I do show a way to handle moving the capsule along with the character if you want to take a look at that kind of a workaround until better processes come online so you may want to take out that twitch stream the animation post snapshot into a stream for a way to handle this for now what we have to try to answer the rest of these when I get back to my desk it's okay I think that's all I got for now alright so we're gonna wrap it up but we can if you want to do you want to tackle these and your post post so we have a I've collected your question so we have them in a document if you want to toss a couple more in the chat I can still pull from this and then I'll send them over to Wes and he'll he'll type of a response that will then drop into the forum post about the stream but thank you so much for joining obviously this is a very important talk topic where there's a lot of questions surrounding it and there's a lot of information we really appreciate you coming on and hopefully we can figure out another more advanced treatment to get you back in as always we encourage you to apply for or submit your projects to the Nvidia edge program we're always on the lookout for really amazing great projects and we can you know maybe you'll get a 1080 T out of the deal from Nvidia so that's pretty sweet again and I've dropped the survey link in a couple times that's a great way to give us feedback let us know what kinds of streams you'd like to see in the future again advanced animation or of the like and we would like to bump our local ue4 meetups always look for groups in your area if you go to meetup.com slash Pro slash Unreal Engine you can see the groups all over the world the events going on there's great way to show off your projects get demos learn and just develop with your local community and you know that's all for today keep keep an eye out on socials for what we've got coming up and we'll see you next week [Music]
Info
Channel: Unreal Engine
Views: 191,609
Rating: undefined out of 5
Keywords: Game Development, Animation, UE4, walk cycle, blend shapes, unreal engine, Wes Bunn
Id: YVC-DL9Ibf0
Channel Id: undefined
Length: 118min 58sec (7138 seconds)
Published: Mon Feb 05 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.