4.26 Update + Power IK setup- UE4 Advanced Blueprints Tutorial - Unreal Engine 4 DevLog

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

Cool, Iโ€™ve been looking to implement IK feet, itโ€™s on the to do list.

๐Ÿ‘๏ธŽ︎ 3 ๐Ÿ‘ค๏ธŽ︎ u/StandardVirus ๐Ÿ“…๏ธŽ︎ Dec 17 2020 ๐Ÿ—ซ︎ replies

been thinking about adding IK to my game, but i think im too far in and it might break other mechanics or add a ton of extra work on the animation side. would you recommend adding it mid development?

๐Ÿ‘๏ธŽ︎ 1 ๐Ÿ‘ค๏ธŽ︎ u/bazseven ๐Ÿ“…๏ธŽ︎ Dec 18 2020 ๐Ÿ—ซ︎ replies
Captions
[Music] hello and welcome to the next episode of advanced blueprint tutorials in this episode we will mainly focus on the 426 update and set it up some ik setup so first of all changes to animation first of all i renamed the animation component to be just called agr animation master instead of animation master component it's obviously this a component because it's a component class skeleton mesh and physics asset they are all starting with agr at the front so it's a lot easier to find it in the context browser so when you are picking a mannequin skeleton to import into you won't have to pick one of 30 that are named the same because this one will always be named differently and now in the animation component there is a ragdoll start in a ragdoll and event dispatcher that you can hook up to and listen for ragdoll events there is a small rework for ragdoll so it's better looking a bit and reacts better to the environment i also added aja ragdoll animation notification so you can set up a def animation that will go into ragdoll from a certain point of time and and there were some small replication issues that that were only visible on local multiplayer so they all got fixed for the combat component there's a begin attack and an attack even dispatcher now it also contains the attack tag from the input buffer and there are heat traced events dispatchers um and uh of combo even dispatchers so we know when the combo is being reset by hand or by timer and there's a lot of bug fixes that for example didn't properly rested combo didn't necessarily allow us to start combat after resetting the combo sometimes setting new attacks at runtime for example when you pick up a new weapon did it register those attack properly there were so small targeting issues that i fixed and there were some small issues with the animation replication for combat but they're all solved right now and that gets us to 426 update i made a new branch on the repository which is called 425 and this is the final update for 425 all new updates will be implemented only to 426 but i will try to make them uh at least workable on 425 so you can just download both versions and make a merge so the master branch will be the newest version whatever it will be right now it's 426.0 i also made some improvements to the ik system itself so the nodes that were already in place and i also added two new um plugins that it will ask you to download from marketplace both of those plugins are forever free one of them is called power ik and the second one is easy ballistics easy ballistics will get its own tutorial but today we will cover power ik simple food placing example so uh let's begin with that okay so first of all i will disconnect this targeting event because as it was set up previously we were testing our targeting so whenever i click if there was a target that met specific variation it was getting sticky for our camera to try to target this actor and if another actor with that better meet the criteria is being selected will focus him okay so we don't need this right now so just disconnect that but not deleted completely we also don't need those guys they're just standing and looking at us so we'll delete them as well and let's focus on the ik animations themselves so right now when we are moving for example on stairs the camera is quite steady it's a bit shaky but thanks to camera luck it's [Music] almost unnoticeable but the character is just floating and if we do show collision we can see that this is because of how the capsule component is reacting to the environment and how our perching setting and stepping setting is working with those stairs so let's do something about that let's make this character walk on stairs properly okay so first of all just go into plugins make sure that power okay is enabled it's a free plugin so anyone can use it and got a few really cool features so we'll cover just one of them in this video so this is the animation graph we're not changing anything to anything in here except we will add ik right here for our base locomotion final pose that being used in the final blend so let's go and do a power ik oh no not like this power ik ground so we want to ground our character let's do this this and from the start it will not do anything yet we need to do some basic setup so character root and so the root of all the bones that we'll be manipulating is pelvis so any relation to will be done uh through the pelvis and the root of the character is also being moved uh when there is certain height difference detected by the way i don't know this character is just floating a bit i wonder why that is let's see here no this is this is done correctly [Music] that's maybe because one of our our ik notes let's see no it didn't change anything okay i was wondering if we broke something but not but uh we'll fix that in a second so let's go here character route is pelvis solver alpha is one alpha of the entire node is one okay and we're not touching any of those options for now i will show you what they do later that's actually a very nice segment but we will go here into feet and we'll add two feet one will be fold left the second one will be called foot r and we are again not changing anything no position pulling no negative pulling nothing compile and now we have those feet position when we have this selected we can see where those bones are for the ik solver and now we go into ground collision and we need to pick our collision channel and a good practice is to actually have a special collision just for ik so you can enable and disable it based on you know what you need so let's do it right now so we'll go here into project settings and we'll find collision collision object channel or trace channel we want to make a new trace channel so we'll add the trace channel and we'll call it fruit ik for example and our default response will be block so we want everything to block this channel but not really so we'll do accept and the default for any new object type or any new trace or anything that we do any new press set that we do will be block but we can change the defaults based on what whatever presence we have here so let's go into no collision edit and this is the no collision wow interesting okay so let's leave it like this overlap all block all okay so block all doesn't need to be changed because it's block all overlap all edited well then overlap all except local dynamic doesn't have to be changed overlap all dynamic has to be changed uh ignore only pound edit so this should ignore pound so it doesn't matter if our foot ik cancel overlap only pound definitely ignore on this one except okay now pound we definitely want to it to ignore and spectator pound definitely ignore character mesh no this is definitely ignore however you might want to have ik on dead bodies but dead bodies will no longer be character mesh they will have physics actor or ragdoll present so on physics actor we want it to block destructible we want it to block so we don't have to change anything invisible wall definitely we do not want it to block invisible wall dynamic definitely ignore trigger volumes definitely ignore ragdoll leave it as a block we want it to block or maybe we don't that depends on you vehicle when we are inside the vehicle we'll probably ignore but right now we'll do block because you might want to be able to stand on a vehicle properly so on a car or something like that ui definitely ignore and water body collision will definitely ignore okay and that's it now we have a new preset and if we go here and we'll go into our capsule and we'll go into uh collision preset unfortunately we set it to custom and because it is custom it didn't update this setting to anything else than default so we have to do ignore by hand we have to go here and do custom ignore by hand as well okay so now ik will ignore our capsule so it will not self collide and we'll ignore our mesh so it will not try to stand with our foot on top of our own head that's good for sure so now we want to pick this so save food yeah here it is trace complex yes and now ray cast up and down 400 units that's that's absolutely crazy we don't see those lines but this is crazy spec let's say that we'll go 55 units down which is 10 more than the step height i guess let's see what's this tab height yeah max step height that we can walk on is 45 up maybe let's make it like 60. so let's say that steps overall difference is the max that we want so 90. so we go 60 and only 30 up okay so that's 90 overall ground slope will not touch any of these for now but we might the lean and counter line later on that depends if we're doing third personal first person uh perspective we're not touching any of it okay uh oh wait or maybe we are this is the stride this is leaning counter leaning and this is leaning forward and backward not not sideways rotate foot to ground normal it will yes definitely rotate foot to ground normal but we want to limit our role to let's say oh let's leave it at 60 but you know what that could be crazy 60 of almost 90 let's make it 0.4 we're not touching this and we're not touching this offset fit position yes please and this is the just basic offset of this let's see minus four okay let's let's not play with this for now let's finish the setup and then we will play with it a little okay okay band direction this is also important bone name what's the ball name for knees because we want to lock knees in certain directions so uh foot and this is calf okay so calf calf left and the second one will be calf right and y1 is it correct guess let's do a zero no i didn't change anything so i think this should be okay excluded bones no joints limits so we're not touching this for now that's a bit more complex so over settings we might want to bump it up to six if we want to but for now let's not allow the threshold -1 which means that it will always do the solver if we had lod on the character we could for example do foot ik only for lod 0 and 1 and ignore it on two they would set just two and if the lod level settings is two or higher it will ignore this node completely it will be a lot lighter but we don't have lods for this character so let's make it one and alpha and that's it i think that's everything okay okay yeah so let's see it okay so right now the character is actually doing ik properly and he should oh oh yeah that's that's creepy uh and this is the right leg so let's go back here and let's go into our oh yeah here so bend direction and so for the left leg y is one but for this it should be minus one okay okay so now it's bending properly but still acting a bit weird sometimes okay this is right okay let's do it like this so we are now strafe walking it will be easier let's make the tracking a bit higher even so let's say that uh it's not 60 it's 75 and 45 that's crazy numbers but let's do it and let's see how it looks like okay okay not bad not bad already but now when we are walking on stairs he will do this crazy thing when he's bouncing up and down and shaking incredibly and our camera is pretty stable because it's uh bound to the capsule and the capsule uh it's not doing all that shaky movement all that much because the character when he's being dragged down by the stairs the root of the characters of the pelvis is being dragged down as well and in order to make it more smooth and not looking like this we'll have to actually a bit break the solder because right now when we walk here you can see that his feet is a bit sunking into the stairs before the solver is able to correct it so if we increase the solver smoothness to a higher value like 300 and now we run it the feet will adjust to the surface a lot faster but the shakiness of the start is actually a lot worse like a lot worse but when you're moving really fast you won't notice that the feet are sinking or not only when you are static you can see that but the way that he's adjusting the height is just crazy so let's instead of increasing this value let's decrease it let's say something really small like 60 the default was 200 so let's see now okay he's not shaking that much now he's still shaking when he's adjusting but not that much and when you are standing still you can see that he's adjusting a bit slower but also his pelvis is adjusting a bit slower which makes it a lot more nice and smooth and if we were in first person perspective that would be even more noticeable but even right now it's it's a lot better so let's improve it even more let's say that this 60 stays here uh okay we have the pool this will stay the same okay so let's boost up the solver itself so let's change max iteration from three to six like we shouldn't do that unless we have really small number of characters on screen because that will be a lot heavier on the cpu but now it runs literally twice as smooth and when you stand still there is very little shakiness when he's adjusting the feet even if we go slow-mo point two oh you can see that he is sinking in the floor because of the sulfur being slow but you can also see him adjusting for each frame it's not really that bad and yeah at least the animations look smooth he's thinking but it's smoother but what you see in real time is actually this when he's not moving he's moving it's less important but let's say we want to make it a bit better 120 well you can adjust this value as you as you like until you're happy with it so let's see if when he's standing is he floating really our camera doesn't allow it too much but it seems that he got proper contact with the floor with his feet so we don't have to just adjust them at all and let's add a ramp so we can actually test some stuff so let's even just that other basic shape put it at 30 degrees and scale it and we got a ramp let's play and let's see how he is placing his feet at 30 degrees angle okay i don't see any bad location of knees so that looks okay and feet is adjusting it's a bit sinky so we might want to actually adjust the foot position a bit so let's go here into foot position offset and let's make it a small value let's say four i mean it's it's i think in centimeters yeah that's a lot better so that value would be actually different for every character if they have the same position for bones but have different structural proportions okay what else we can change so the the basic is that you have to send bend direction if you don't do that your knees will just go crazy sometimes you might do a joint limit on the knees or on hips probably preferably on the hips if you have a crouch position that has your leg on sideways you might want to limit your hips and all those directions they are well like it said directions so it doesn't matter if the value is i don't know 50 or one it's uh it's still just a vector direction so whatever uh it's just a normalized vector so it is from -1 to 1 and not much more to it it's a shame you cannot bind only this value you have to bind the entire setting so this entire ground slope setting that's a bit of a pity but you can just bind it and you can read from the character directly his state so you could for example do uh forward traits and back trace and you could notice that you are on a ramp or on stairs and you could even know the angle of the stairs and you could add some stuff depending on that there's one more really cool setting i want to show you and it is this apply inertia to body and it said that it is smoothing the root motion but it's actually doing something a lot cooler so let me show you if you allow that and you do not allowed spring at all and you play you will see that your character is more stable when it comes to his position and versus the position of the capsule itself so this is a very nice setting for first person perspective games because if you have animations like this either animation that is just breathing and moving around it it makes all the movement a bit more smooth and i can show you a better example of that in a second uh on a mock-up animations but this is quite cool and if you go here and you will do at spring so let's even leave it as it is it will add on walking some of those that bounces up and down but now you can see that the head position is on the um up down axis almost steady and it's just shaking a little bit the entire body is swinging uh left and right but the center of the body so the hips and the head are staying online so that's really good for fps uh animations normally when i would set up fps animations i would just for mocap animations i would take the first frame of the idle animation and make it a separate animation that is just one frame and then i would turn the entire idle animation as additive animation to this one frame animation and if you are seeing your character from third perspective you would play this additive animation with full strength and you would see all these cool little motions of swaying and adjusting targeting all that but if you go into first-person perspective you no longer play this additive so you get one frame of the solid stance and you're aiming at one particular point and it will allow you to aim and you won't even know that the third person perspective or multiplayer perspective player sees a different thing than you do okay yet another setting in the power ik ground is for those lean and now they're not being fully procedural this is like the scaling of leaning that is being detected automatically so if the front foot and left foot they have a difference of elevation it is assuming that you are moving on a slope and this is a fair assumption so if you allow lean and cantalene which means that lean it will lean the entire body from the root so from the pelvis it will um tilt the entire character and then counter tilt just one part of it for example head but i would actually do a spine o3 because i want to rotate the hands as well let's see if it didn't break anything yeah that's not so bad so what it does it reduces the shakiness that normally goes up and down and it is swaying your character front and back and because of this setting if you have leaning and counter running and move route you can now increase the solver delta smoothness back to 200 or even 300 and still not that shaky on stairs it looks quite okay and now when you are standing still the solver will be a lot faster it will adjust a lot faster also when you're running and you will no longer see this foot sinking in motion well like i couldn't see it anyway but this way you are sure you want okay so that's a lot faster that's a setting i wouldn't use for first person because that's shaking forward and backward entire character that would be terrible from first person perspective but for third person perspective this makes everything a lot more smooth and works a lot better as for the strike if you do scale stride it will actually make your steps longer or shorter if you are on angle surface so if you walk here you will see that those animation actually makes the steps shorter but if you go into the strafing animation now you walk here it will just be ridiculous you can see the swing and counter swing so my weapon is still being hold in place as should be but the rest of the body is doing this crazy thing so in first person that would be terrible and i'm not using striding at all and when it comes down to move root you can disable that as well and the food ik itself will try to counter this lack of root movement but it will be more shaky thanks to that to be more shaky left and right and forward and backward so if you use this even on default settings your character will shake a lot less he will still do that but a lot less as he's shifting the root already by you know assuming what angle you are moving at and where the next place that your body need to be will be so as you are moving in a straight line it's it's a lot better when you are making a lot of movement it's still pretty smooth so yeah you can try different settings for those uh they're pretty easy to work with okay so this is the basic setup for ik and we can then do more stuff with it later on i just need to make some more experiments because um power ik got two more really cool solvers there is a walk solver which is basically [Music] procedural walking where you have on on curves basically you're putting your legs up down and then you ground them in word space position and you have a fake walking cycle that is completely procedural and this is really cool and there's one more which is just called solver and this is this is doing everything at once this is a full body solver and this requires a setup of let me get here where did i put it oh okay in characters and this requires to have a control rig and inside the control rig you can do a lot of controls and stuff but right now i am just experimenting with this node called full body ik so what i'm doing is you have those two events one that is setup event and this setup event you just call all those handles and you bind them to certain positions and then you bind bones to those same positions and then you have this full body solver and oh okay i don't need this one anymore so you have this full body solver and this full body solver is an amazing tool that allows you to adjust position of let's make it bigger adjust position of your entire character based on those points and you can you know pause them as you like and you can see that it is adjusting certain other bones in a specific way and it is no you know it's got really cool um space of limits almost like a ragdoll and you could yeah do really a lot of stuff and you can make poses and you can make some animations or some ik events based on that and if you make yeah it's just amazing so once i finish this setup uh will be an input and the power ik nodes are manipulating uh those controls uh to set up the entire full ik for the entire character so what it means i could just store attachment points on a weapon and run another solver just for the foot and without any animations whatsoever you could have a shooter game animations without really running animations very easily so that's it for today i'm uploading this project and i hope that this helps you in your further development so see you guys soon so just to record and showcase a real example of mocap animation high quality character in a real environment with power ik well here it is so this character is running our ik on a quite complex environment and it even works when crouching really really well so you can see like the direction bending of the joints it's working when crouching and if we take our weapon we start to act a bit differently we have a wider position and even on stairs came a bit okay yeah so it's it's working and even if we are for example rolling you can see that the solver is taking a headset like to i think 80 the the blend speed so it is slow enough to not break the roll animation so and let's find a ramp and some stairs and everything runs really smooth and nice okay yeah so just to showcase how how well working this plugin is you
Info
Channel: AngeIV
Views: 14,014
Rating: undefined out of 5
Keywords: unreal engine 4, ue4, devlog, animation, animation blueprint, blueprints, gamedev, free, tutorial, sound system, sound, footsteps, weapon, aim, ik animation, multiplayer, replication, gamejam, re2, resident evil, lets make, recreate, game mechanics, ue4 ai, damage, hit reaction, zombie, aim offset, procedural animations, root motion, unreal engine 4 tutorial, agr, ue4 devlog, unreal engine 4 devlog, game, ue4 game, game devlog, ik, power ik, foot ik, full body ik, full body solver, control rig
Id: PMSxTCp0kuQ
Channel Id: undefined
Length: 38min 3sec (2283 seconds)
Published: Thu Dec 17 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.