[Music] [Applause] hello everyone thank you all for joining us my name is bartome varshak i'm a senior software engineer at respawn and in this presentation i'm going to discuss different methods of using physics for animated characters in star wars jedi fallen order so what is actually physical animation so instead of simply playing an animation we can use physics to move regular bodies to follow the animation pose and one of the consequences of that is that with physics we can include collisions so we play the same animation while at the same time we can detect collisions and prevent clipping so in this video we have two characters playing the same animation so the character on the left just simply plays the animation as usual
but the second character on the right it uses physics to play the same moves so we can see that the character on the left just clips through the environment while the character on the right avoids collisions by slightly changing the animation so in general we have three main methods of driving physics to follow the animation so the first method is using motors so the motor is a part of the joint constraint between regular bodies and they use a specified animation target to generate the local force between connected bodies and that local force drives bodies to follow the animation target the second method is using velocities so in this case we compute a velocity needed to move the body from one place to another during a given frame time and in this way
we we can force the body to move to reach to the animation target and the third method is using constraints so in this case we create a new constraint between a dynamic body of the rectal and the animation target and all parameters for this new constraint they define how it like we force the dynamic body to follow the animation target and in our game we started adding physical animation using motors so this is the first method on this list and we added it first on stormtroopers when they are force pulled by the hero in this case he body is kinematic so it strictly follows the animation but all the other bodies are driven by motors and red poles so red objects they represent a pose only from animation so without any physics added and we can observe how thanks to physical animation
legs are nicely colliding and interacting actually with an environment so two-way interaction and pure animation without any physics added so red objects would simply just clip full collisions and our game uses uses uh unreal engine 4 and nvidia physics as the physics engine and i would like to share some essential details of our implementation so first of all there are a few physics parameters that are important to set up correctly so the first one is the number of solver iterations so default values in unreal are eight and one and for motors nothing really works as you would expect with these settings and in our game and overall when you create your own implementation you need to go higher with these settings you need to find the best one that fits your implementation and your
your needs and in our case it was 64 and 32. also going forward we are using a flag e acceleration which is enabled for every joint it makes it easier to set up all parameters related to mass especially and the topic of frictional restitution so these parameters they tend to cause a lot of problems for physical animation because higher values of friction it they make harder for physics to reach the animation target and by default we use just low values for friction and restitution and in the case actually of that force pulled stormtrooper we actually use no friction at all to make it easy for the physics to reach the animation target and another big topic here in terms of implementation details
is continuous collision detection so it needs to be enabled to have really high quality results but it is better to disable ccd between bodies in the same rectangle the problem overall big problem here is that with ccd enabled constraint projection does not work very well in physics so what we what we did we actually ended up doing that we wrote our own piece of code to perform linear projection for all joints so just for every joint we kind of bring two bodies together if they separate too much above a given threshold so in our game after force pulled stormtroopers another case where we started to use physical animation is the death of stormtroopers so here we just simply play a death animation and as you can see we can like we have
really big flips and acrobatic movements from animations and in in the base case we were just enabling red regular physics uh near the very end of the animation to have that like free fall with the gravity and this solution it worked really well for open space but close to other collisions as we can see here in this video it does not give good results so limbs are clipping through collisions and kind of overall the sequence it does not look very natural so to improve that depth sequence we enable physical animation on the whole character and we are using motors for all joints but the main question was what to do about the root body which is in this case the hip body it can't be kinematic because it would
easily penetrate walls as the animation would just simply go through the wall but we wanted still like to make that root body to follow the animation strictly to perform these big acrobatic flips so we need both collisions and we need follow we need that root body to follow the animation so the solution was to keep the hip body as physically simulated body and create a new constraint for that body and the constraint is between the hip body and the given animation target so this new constraint kind of drags the physics body of the hip bone to follow the animation target and for that constraint for that new constraint we remove all degrees of freedom uh so we lock both linear and angular movement for that constraint it gives the strongest matching with the animation to perform all these big flips and the question was
with this new solution what happens when we have an obstacle so in other words uh what to do if the hip body hits the wall and the animation target still pushes forward so what to do about that physical body which is just colliding right now with the wall so what we do we monitor the distance between the actual position of the root body and that desired animation target and if the constraint drive for that hip body is unable to reach that target within some threshold we just turn ragdoll to a freefall mode with the gravity so this is how it looks uh the same sequence using physical animation so we can see how the root body detects that is unable to move through the wall and it turns the rectal into falling with gravity
so that worked really nice for our case so these previous scenarios they were focused on matching the animation pose closely and supporting collisions so that was the case for stormtroopers in our game but right now i would like to move um to physical animation we did for the hero and for the hero uh actually collisions ended up as not an important feature and actually the fluidity of natural movement uh and the smoothness of natural movement was actually the top priority for us and so we started with a ledge hank for the hero so the special navigation for the hero and here hands on and forearms are kinematic so we took to follow the animation and all the other bodies are fully physics driven just by motors so we can yeah we can
nicely observe how just pure animation pose so this red object is more static and physics is adding this nice looking layer of motion also because of that actually animators could focus more on just on core poses and add and use physical animation to add that additional fluidity to the motion so it worked really well uh we had really great great results with this settings so using only motors uh to drive physics uh to the animation pose really gives nice looking results it was it would it really adds a lot of fluidity to the motion and we tried to extend the same approach to other human navigations and results were not so great [Music] so i have an example of sliding with weak model settings so whenever there's an obstacle or some
fast changing motion the hero just swings way too much so we tried with stronger motors in that case character was just too stiff and results were also not really satisfying us and we also tried different approaches mixing models with velocities for all bodies but still we didn't have substantially better results so we tried something different we came up with a different solution we tried back weaker motor settings to get that springy fluid behavior and the new solution for us was a local space blend with animation pose and in case of this sliding we just blend 50 of the physics bulbs so here is the final result and it started to look really better especially
the feeling of it uh when you were controlling the hero with the stake the character really nicely reacts uh to your movement it isn't too steep at the same time reactions are not too swingy and here is how it looks in the final game uh we have different pose for the hero um but the whole uh this action sequence really uh physical animation gives a lot of additional uh fluidity and reactions to every uh change in movement direction or every every collision that happens so with this new kind of approach we started to use to use it in other cases so here is climbing where we blend just 40 percent of physics so here kind of the final result is subtle
but it gives that nice fluidity to the whole movement here we have wind fields and in this case we blend 45 percent of physics with the animation uh and here ropes uh where we blend again forty percent of physics so we can see how my like legs nicely have some inertia after we stop the the movement and additionally it gives really nice additional motion to the hero and after that we started again to have a challenging cases so this one was balanced beam hang it was really challenging to make it right we can see here that it is 50 uh physics blend but it was really hard to find stable movement for this case uh it is because of this
like very aggressive characters moves and the character just swings way too much and the whole final position of the hero is just way too off from the animation so we tried here a different approach so what we did we added a partial velocity drive for just one body to stabilize the movement so here's the code how we did that so we compute first the desired linear velocity so this is the velocity needed to fully move the body from the current position to the target position from the animation in one frame then we read the current linear velocity of the body and we perform just linear interpolation between that current velocity and the desired velocity computed in the first line so this is the way we kind of like feed current velocity whatever is happening
from physics point of view currently to that body to the desired velocity that is just tries to move exactly as it is as the movement looks from the animation and the variable t is just the amount that is just the amount of the blend for the balance beam uh we use uh 50 of the velocity drive for the hip body and here are the results of this new solution so using this partial velocity drive just for the hip body nicely stabilizes the whole movement actually without affecting the behavior for all other bodies so we kind of keeps this fluid behavior for all other joints which are just fully driven by motors and still we don't go with too swingy motion so we can really see how how nicely the
overall the character reacts to the motion so these previous cases they were enhancing some special navigation state for the hero but what about the ground movement so uh we tried to do something with a normal hero walking or running on the ground but we did not see much opportunity for improvements in running or walking cycles except that starts stops and turnings were promising to try our new technology so uh here is the video and we focus only on the heroes arms and overall we have more complex logic when to start a specific physical animation either for start stop or turning
and every physical animation lasts for two seconds and blends out during that time it is a subtle effect as we can see on the video but it smooths out some transitions between different animations and add some inertia to the movement and here we achieve really good results with blending just 40 of physics so we can see how sometimes the arm lags behind the red object so the unused lugs behind animation target or uh after a while it kind of like with additional inertia just just is a bit further than the animation target so it's really giving nice little touch physical touch to the whole movement still however for uh for some cases
for some occasional things uh we had a two big difference between physics pose and the desired animation pose so uh we didn't want to add any velocity drive because it would change the overall behavior for motors and we came up with something new so uh we added again a new constraint this time between a wrist body and the animation target the constraint allows for free angular movement uh but it has a distance limit for linear movement so in our case it was 10 to 5 units so the arm is free to move within the threshold um in this case of 25 units with free angular movement and linear movement limited to that distance uh so if it is too far away from the
target this constraint it broads back it is bringing back the constraint is bringing back closer to the animation target uh if it is within the distance threshold the arm is free to move um as desired so with that constraint added we can see on this image that the arm is not so far away as it is on the on the left image so really it is giving us results exactly what we needed here and we had also similar uh solution to simulate physics on the hero's arms during walking on the balance beam so in this case uh it gives really a nice soft feeling that reflects that careful movement along the balance beam it was working really nicely in this case
and the third big case of physical animation in our game is buddy droid bb1 so this is a special character companion droid and spends most of the time attached to the heroes back and we wanted to add a kind of relaxed physical animation to make the droid react naturally to every hero's move so here is how it looks in the game so the bottom parts of the droid's legs are kinematic and all the other bodies have full physics and there is no animation blending so this is 100 physics and there are no angular limits for any joints so we can see how yeah nicely and naturally the droid behaves with some additional inertia and it reacts to the hero's moves either during action or just movement it is especially visible here during
sliding when the droid yeah nicely swings with the hero it was working really really well here still for some very fast heroes moves we had some problem to support physics on the droid physical animation could become unstable in such cases so somehow we had to restrict droid's moves so again we add a new constraint but this time between the droid's head and the animation target but this time we change the distance limit the distance threshold dynamically so if the body moves slowly the distance is getting bigger to allow more free movement but if the body moves too fast the distance
to allow that free movement is getting closer to zero to keep the head very near the animation target and actually in the case of strict zero for very high velocity we just switch the constraint mode from limited to locked to give the strongest watching and this is how it looks for uh for this um hero like very fast movement here uh so we have a comparison on the left there's no constraint enabled uh so we can observe how the droid's head clips almost completely through the hero during that little moment yeah exactly here and on the right where the constraint for the droid's head is enabled we can see that it nicely stays in place and still the droid keeps his physical
behavior at slower speeds so we don't really alter somehow this uh behavior during slower movement but whenever very high speed action happens that could potentially make uh the droid uh to to to clip through the hero or just become unstable that constraint um is limiting almost to zero its uh distance threshold to keep the droid's head uh where it should be where the animation target is uh overall actually that implementation of physical animation for the droid was really challenging uh there were a few reasons behind it so um we have 85 percent scale uh on the droid when it's attached to the hero and uh working and dealing with some custom scale settings it's never really fun
we had also a problem like um the order of the execution with attaching so uh potentially uh we have uh physics running on the droid when also we have physics active on the hero so that was actually the case on uh during sliding navigation when we had hero with some physical animation and we had also the droid with physical animation so there were really challenges to try to properly execute it in order um also we had a problem that the droid's physical animation was looking a bit differently with variable frame time we had good looking behavior at 30 fps but we had very stiff behavior at 60fps so all these settings all these things were making the droid really challenging in terms of implementation and we came up with these
solutions so in our game every physical animation which does not require collisions which is the case of the droid and in many cases for the hero is running within its own physics scene and the physics scene is simulated at a fixed frame time regardless of the hardware and we add predicted movement for the remaining time left to simulate and because we have this exclusive physics scenes we can control when they are simulated so we run physical animation on the hero first and having these results from the hero we prepare and run the physical animation on the droid so this that was our third big case for physical animation um in star wars jedi fallen order i'd like to summarize um the things i i presented uh here so
um i described a few important details about physics integration so the numbers of iterations frictional institution and ccd with constraints projection and i described how we use the constraint to drive the regular root body the heap body so that was the case for stormtroopers and if that root body diverges above some threshold from the animation target we turn the whole rectal to a free fall mode we also use a lot of local space blending between pure animation and motor driven bodies and actually we prefer weaker motor settings to achieve that fluid behavior we also in some cases we also use partial velocity drive for just one body to stabilize the movement and we create a new constraint between regular body and the animation target to set
movement some movement limits like it was the case for a wrist bone for the ground navigation for the hero and for the draw its head and in in case of the in the case of the droid head we also dynamically change that movement limit depending on the on the head velocity and kind of implementation detail but it was important also for us to to make it right so that we have separate physics scenes for the attached droid to control better the flow of of the physical animation and there are a few things actually i wish i knew before we started to work on physical animation uh so at the beginning it is really good to know uh it is a challenge but it is good to know what is your goal of adding physical animation in your game
do you want to support collisions while playing the animation uh or do you want to change visual outcome of the movement because both cases they require quite different approach and different set of settings different features from physical animation and of all physics parameters they kind of influence each other you change one parameter and it makes something else to work better or worse and you need to revisit previously failed cases all the time you need to check your new knowledge is it working better or worse just to apply your new solutions to some previous cases and when you have active rectal physics which is active almost all the time things that normally work they kind of tend to break for example order of updates for your
actors entities components uh some dependencies between physics and other systems so for example cloth needs to be after physics for some cases or animation notifies these are things that uh when you don't have physics running all the time they kind of work correctly but when you enable physics and you have a lot of dependencies with other systems uh you need to really be careful with these things to make it work correctly i'd like to highlight and mention uh two previous great presentations on a similar topic so this is physics animation and uncharted 4 at gdc 2017 and physics driven reg dose and animation ada from gdc 2018 please check these great presentations to find some other implementation details how they did physics for their characters and respawn is hiring please check our
website respond.com careers and i strongly encourage you to do it so respawn is always hiring so please check maybe there's something interesting for you so thank you so much and i'm happy to answer all your questions [Applause] you
Auto-generated captions from YouTube — names and numbers may be misheard.
Distilling the key insights…
Game Developers Conference · 2026
Game Developers Conference · 2025
Comments