Procedurally Animating Creatures for my Game | Withersworn Devlog

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
procedural animation is used to automatically generate realtime animation with far more diverse actions than predefined animation not only does this save time and resources but looks vastly more Dynamic when set up correctly you have probably seen this used in some way or form in many games you play common uses being legs adjusting to uneven terrain heads turning to look at the player grabbing objects or rag dolls just in name a few this is often done using a technique called ik inverse kinematics which uses equations to determine the motion needed to reach a desired position a simple way to visualize this is placing your hand in front of yourself and then pulling that hand you can feel how your forearm pulls forward with it and the connection from your elbow then pulls your upper arm most of these setups have two main points a leader and a Target goal if you reach for a cup that is your Target and your hand is the lead bone you can set Bend limitations and have bones down the chain be less affected to change the feel and result this can even be Blended in with pre-made animations to give visual feedback in life a great example of this is in Uncharted where when moving left and right in a vehicle the characters Sway With the physics with their seat and hands pinned while the rest simulates when applying this to procedurally animated walking I think these 10 steps from cadir show it quite well firstly use inverse kinematics to control the leg I suggest using a solver setup built into the engine or an available asset as there are lots of ik tools available glue the foot to the ground and then make a Target Point attached to the body break ass down from the target point and move it up or down to the hit location and then check your distance from the foot to the Target point when this distance passes a threshold move the leg towards the target Point depending on the Walking pattern you can Define left and right legs and have them walk in opposite motion by only moving the leg when the opposite leg leg is grounded to adjust the body use the average leg position plus offset and then rotate the body based on the difference between the left and right leg height while these are just the basic steps you can add a lot of extra features and conditions where these rules change to make the walk more unique changing the step duration how high the leg is raised ungluing on angle thresholds and regions around the foot prohibiting other feet from stepping inside can all greatly change the feeling and look while the creature can now procedurally move its legs it still needs to know how to actually move most pathf finding Solutions require you to bake a nav mesh or some sort of environmental setup but I wanted one where the enemy could be dropped in any scene and just work I ended up using a similar setup to an artificial simulation movement Behavior called boyss meaning bird oid AKA birdlike objects normally boys are used for large groups of flocking birds fish or other animals and follow follow three basic rules separation steering to avoid crowding local flock mats alignment steer towards the average heading of local flock mates and cohesion steer to move towards the average position of local flock mates instead of following A Flock the enemy will acquire the player as its Target by grabbing the player tagged object if within engagement distance it will pursue the player and begin the boylik detection this will shoot out AR Ray or sphere casts and depending on the enemy type this can be set to Vision cones or extra dimensions for example a grounded enemy may only need one detection plane whereas a flying one would need to detect up and down as well these Ray casts will check for objects in the way between them and the player and if hit will steer around them to take the path of least resistance if the view from the enemy to the Target gets obstructed it can also strafe or turn to avoid getting stuck so far this method has worked quite well can work in large groups of enemies with more actions and strategy planned for the future similar to the leg setup the rest of the creature uses the same principles the head will turn to look at the Target and often this extends down to the spine and chest slightly if the enemy is a turret this may be the only procedural animation it needs the same method can also be used for aiming range weapons or limit attacks that hone in on the player similar to the previous example of a hand reaching for a cut this can also add life in having the spine turned with rotation or tail and tentacle bone chains for clicking about in a curved sine wave bones can also be simulated with the jiggle on Hit And even impulse the enemy back where all these modular systems will work together to make a fluid knockback recovery for biological creature attacks and other large impactful poses these are the times where pre-made animation do seem like a better choice however procedural methods can blend in with the attack and provide simulated follow-through information other follow-through information are things like cloth fur hair skin or ooze that is done with a clo Sim deforming the mesh these usually don't need extra independent logic beyond their initial setup and can help tremendously with the visual Fidelity not only do these apply to creatures but they have also helped with humanoid animations I've used it to bypass strafing animations idle turning and even allow Dynamic movement on certain attacks I've also begun experiments with fully procedural humanoid enemies but will'll probably use it for more ghoulish entities as combining a shambling walk with active ragd doll has an eerie look to it this is also something that can be applied more to the player and enemies where ragd dolls can be Blended in with Collision hits to add recovery that sings well with the environment and force I think this will be particularly useful for the player when grappling at high speeds into a [Music] surface not only does this affect how visuals look but gameplay can also adapt to the has flexibility destroyed legs can have a creature change its walk or stance to compensate for the missing limb or dynamically guard a vulnerable area while a lot of the groundwork for these have been made I think its true potential will be seen more after the combat Focus as the systems will complement each other greatly I hope you enjoyed this little taste for what is in store and I'm super excited to develop the system further I believe when done right procedural animation can unlock a new dimension of visual Fidelity that may even raise the bar are Beyond quality AAA animation if you use Unity I strongly suggest checking out final ik Maga cloth and F impossible Creations plugins they have tons of solvers that help a lot with the procedural process thank you for watching and please remember to like subscribe wish list Withers sworn on steam or follow along on Twitter or Discord for more frequent updates see you next time
Info
Channel: Asarge
Views: 215,691
Rating: undefined out of 5
Keywords: procedural, animation, creature
Id: I7BRv5wjeZg
Channel Id: undefined
Length: 7min 0sec (420 seconds)
Published: Sat Dec 09 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.