Simulating Realistic Ragdoll Behaviour In Physical Situations1328413/... · 2019. 6. 20. · The...

33
Simulating Realistic Ragdoll Behaviour In Physical Situations Pontus Stenlund Computer Game Programming, bachelor's level 2019 Luleå University of Technology Department of Computer Science, Electrical and Space Engineering

Transcript of Simulating Realistic Ragdoll Behaviour In Physical Situations1328413/... · 2019. 6. 20. · The...

Page 1: Simulating Realistic Ragdoll Behaviour In Physical Situations1328413/... · 2019. 6. 20. · The foot can clip through the ter-rain and destroy the sence realism, however ragdolls

Simulating Realistic Ragdoll Behaviour In

Physical Situations

Pontus Stenlund

Computer Game Programming, bachelor's level

2019

Luleå University of Technology

Department of Computer Science, Electrical and Space Engineering

Page 2: Simulating Realistic Ragdoll Behaviour In Physical Situations1328413/... · 2019. 6. 20. · The foot can clip through the ter-rain and destroy the sence realism, however ragdolls

Abstract

When trying to make a game character come alive and add some senseof realism to a game, it can be done in multiple ways. Animating a 3Dmodel is the commonly used one and it is usually done by hand. Theartist moves the model’s limbs bit by bit to make small animation clipsthat are then played in the game. This has a few drawbacks, it’s time con-suming and depending on what the character is doing in the game it won’talways look accurate. Ragdolls can be used together with animations tohelp bring more realism to the model. Together with animation and col-liders on the model limbs, it can simulate when the models limbs interactwith objects on the screen. It can also simulate physical responses thathappen. But some problems still remain that can’t be solved by ragdollsand animation alone. One example is the foot position when a characterwalking up or down sloped terrain. The foot can clip through the ter-rain and destroy the sence realism, however ragdolls together with inversekinematics can solve such problems.

Sammanfattning

Nar man forsoker att fa en spelkaraktar att komma till liv och lagga tillen kansla av realism till spelet sa kan detta goras pa olika satt. Animeringav en 3D modell ar det vanligaste och det gors vanligtvis for hand. Ani-matoren flyttar modellens lemmar en bit at gangen och gor animations-klipp om sedan spelas upp i spelet. Den tekniken har en del nackdelar, detar tidskravande och beroende pa vad karaktaren gor i spelet sa det ser in-te alltid korrekt ut. Ragdolls kan anvandas tillsammans med animationerfor att ge mer realism till karaktaren. Tillsammans med animation ochcolliders pa modellens lemmar, kan det simulera nar en modells lemmarinteragerar med objekt pa skarmen. De kan ocksa simulera fysiska svarpa vad som hander. Men vissa problem kan inte losas enbart med ragdollsoch animationer. Ett exempel ar positionen pa foten nar en karaktar garupp eller ner for sluttande terrang. Foten kan klippa igenom terrangenoch forstora realismen. Men ragdolls tillsammans med inverse kinematicskan losa sadana problem.

Keywords: ragdoll, inverse kinematics, terrain vehicle, end-effector

i

Page 3: Simulating Realistic Ragdoll Behaviour In Physical Situations1328413/... · 2019. 6. 20. · The foot can clip through the ter-rain and destroy the sence realism, however ragdolls

Acknowledgements

Thanks to everyone who helped and supported me during the period when I waswriting this paper. A huge thanks goes out to everyone at Zordix, for allowingme to do my thesis there and showing me the ropes, also to Tommy Stenlundfor allowing me to borrow his appartment during my stay in Umea. Finally ahuge thanks goes to my friends and teachers at Lulea University of Technology’sSkelleftea Campus for all the help and support during our education.

ii

Page 4: Simulating Realistic Ragdoll Behaviour In Physical Situations1328413/... · 2019. 6. 20. · The foot can clip through the ter-rain and destroy the sence realism, however ragdolls

Contents

1 Introduction 11.1 Goal and Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.3 Zordix AB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.4 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

2 Research and Tools 32.1 Defining What’s Realistic . . . . . . . . . . . . . . . . . . . . . . 32.2 The Relation Of Terrain Vehicle and Driver . . . . . . . . . . . . 32.3 Vehicle Impacts On The Driver . . . . . . . . . . . . . . . . . . . 4

2.3.1 Physical Situations . . . . . . . . . . . . . . . . . . . . . . 42.3.2 Vehicle Handling . . . . . . . . . . . . . . . . . . . . . . . 5

2.4 Driver Impact On The Vehicle . . . . . . . . . . . . . . . . . . . 62.5 Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2.5.1 PuppetMaster and FinalIK . . . . . . . . . . . . . . . . . 72.5.2 Ragdoll Physics . . . . . . . . . . . . . . . . . . . . . . . . 72.5.3 Kinematics . . . . . . . . . . . . . . . . . . . . . . . . . . 92.5.4 Forward Kinematics . . . . . . . . . . . . . . . . . . . . . 92.5.5 Inverse Kinematics . . . . . . . . . . . . . . . . . . . . . . 112.5.6 The Jacobian Method . . . . . . . . . . . . . . . . . . . . 112.5.7 Cyclic Coordinate Descent . . . . . . . . . . . . . . . . . . 13

3 Implementation 153.1 Ejecting the Driver . . . . . . . . . . . . . . . . . . . . . . . . . . 153.2 Tipping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153.3 Respawning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163.4 Simulating with Inverse Kinematics . . . . . . . . . . . . . . . . . 17

3.4.1 Simulating Looking Ahead . . . . . . . . . . . . . . . . . 173.4.2 Simulating Body Movement . . . . . . . . . . . . . . . . . 17

4 Results 194.1 End Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

4.1.1 Collision . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194.1.2 Collisions At an Angle . . . . . . . . . . . . . . . . . . . . 194.1.3 Tipping . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194.1.4 Respawning . . . . . . . . . . . . . . . . . . . . . . . . . . 194.1.5 Head Turning . . . . . . . . . . . . . . . . . . . . . . . . . 20

5 Analysis 215.1 CPU Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215.2 Memory Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215.3 Physics Profiling . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

6 Discussion 23

iii

Page 5: Simulating Realistic Ragdoll Behaviour In Physical Situations1328413/... · 2019. 6. 20. · The foot can clip through the ter-rain and destroy the sence realism, however ragdolls

7 Balances against ethical, environmental and social criteria 247.1 Ethical . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247.2 Environmental . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247.3 Social . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

8 Future Work 25

References 26

iv

Page 6: Simulating Realistic Ragdoll Behaviour In Physical Situations1328413/... · 2019. 6. 20. · The foot can clip through the ter-rain and destroy the sence realism, however ragdolls

1 Introduction

Ragdolls together with character animations help bring more realism to a game’scharacter. Ragdolls will blend together with the current animation to helpsolve some of the more sought after effects, for example dragging the arms andshoulder against a wall when running parallel to it. Other sought after effectssuch as reaching for a arbitrary object to pick it up, can be a bit trickier to getto look natural by just using an animation since some extra steps have to bedone, such as moving the character to the right place to pull a lever. This canbe achieved with inverse kinematics (IK) that calculates joint movement basedon the last joint position in the joint chain. Another example is turning thecharacter’s head to face some arbitrary target whenever something is selected.It helps the animators save time since no animation has to be done to handleall possible situations that can occur. The problem with ragdolls in computergames are that sometimes the ragdolls movements are perceived as sloppy andunnatural if not done correctly. For example, when the ragdoll lies still onthe ground it will sometimes twitch since the rigid bodies on the model willconstantly detect a collision and try to resolve it. Or when an enemy has beendefeated and the enemy’s limbs will bend in all impossible ways when it dies.Ragdolls together with IK can save animators time and give a games a morerealistic feel. This paper will go over some applications where ragdolls canbe used to simulate realistic behaviour in physical situations in terrain vehicleracing games.

1.1 Goal and Purpose

The goal was to:

• Identify situations where driver would get ejected from vehicle.

• Create ragdolls from existing character models.

• Implement different checks that would eject the ragdoll from the vehicle.

• Get realistic ragdoll behavior in a terrain vehicle racing game with thehelp of RootMotion’s Unity assets, PuppetMaster and FinalIK. It wouldserve as a addition to existing gameplay.

1.2 Limitations

The task was to implement RootMotions PuppetMaster into a game developedby Zordix. I had no previous knowledge about ragdoll physics and how to getthem to behave in a natural way. Since the game is a terrain vehicle racinggame, there was a few key game mechanics that would tie naturally into ragdollphysics. Since it was developed in Unity, memory management and garbagecollection was an issue. The ragdoll behaviour could not generate too muchgarbage that would cause lag spikes during critical moments when playing thegame.

1

Page 7: Simulating Realistic Ragdoll Behaviour In Physical Situations1328413/... · 2019. 6. 20. · The foot can clip through the ter-rain and destroy the sence realism, however ragdolls

1.3 Zordix AB

Zordix AB was founded in 2009 by Matti Larson and is located in Umea. Theydevelops and publishes video games such as ”Aqua Moto Racing” and ”SnowMoto Racing”, where terrain vehicles are used to race and compete againstyourself and other players. The games are developed for major game consoles,such as, Playstation 4, Nintendo Wii U, Nintendo 3DS, Nintendo Switch andXbox One [1]. To the day of writing, Zordix have developed and released sevengames since 2011.

1.4 Background

Predefined animations have its uses and its limits. They are time consumingto make and they don’t always look good, depending on the situation. Proce-dural animations are animations generated real-time that can handle variousscenarios that predefined animations have problems with [2]. There are a fewways to implement procedural animations, such as ragdoll physics and inversekinematics(IK).

”Hitman: Codename 47” was one of the first games to employ ragdoll physics[3]. It has often been used instead of a death animation to save animators timesince the death animation would be generated real-time and the animators don’tneed to make a number of variations of the death sequence. Since then, it hasevolved to be used in a range of situations and many AAA titles such as ”Un-charted 4”, ”Last of Us” and ”GTA V”, use ragdolls to various degree. Ragdollscan be used to greatly enhance visual aspects of the game. In Uncharted 4, whendriving a vehicle the characters are seen bobbing when driving in on rough ter-rain. This is achieved by the use of ragdoll physics [4].

Inverse kinematics can generate procedural animations by calculating joint posi-tions and rotations given the target position. It also used in robotics so industrialrobots can guide a welding tip with great accuracy. By using inverse kinematicsfor animation, the developers can ensure that the characters foot doesn’t clipthrough the terrain when there is a slope and other possible scenarios.

2

Page 8: Simulating Realistic Ragdoll Behaviour In Physical Situations1328413/... · 2019. 6. 20. · The foot can clip through the ter-rain and destroy the sence realism, however ragdolls

2 Research and Tools

2.1 Defining What’s Realistic

Can a game with fantasy creatures, magic or advanced technology be consideredrealistic? After all, it is a game, a bunch of pixels on a screen with creatures andeffects that only resides in people’s imagination. Masuch and Rober wrote, ”Inaddition the notion of realism can always be regarded relative to a chosen pointof reference” [5], which is a logical observation. Depending on whom you ask,realistic graphics or physics may be the reference points for realism. But whenplaying a realistic game, a thing in common is that the player’s mind tricksthem into feeling that the digital world they inhabit is realistic [6]. So how candevelopers achieve this? As mentioned before, graphics and physics are two ofthe obvious answers.

Since the player controls an avatar of some sort, the avatar is perhaps moreimportant in conveying subtle signs of realism. How the avatar moves, talks andbehaves in different situations are perhaps more or less subtle, but importantmessages to the player in order to bring the avatar to life [7]. How to conveythose signs can be done in a number of ways. Animation clips that show differentfacial expressions and body language are common ways to try to convince thata character is real to the player [8].

Wannes Ribbens and Steven Malliet writes: ”A game is not only consideredrealistic when real-life movement, facial expressions or locations are mimickedaccurately” [8].

In racing games however, there aren’t as many situations where facial ex-pressions or body language are shown to the player. To convey the feeling ofrealism, the game physics will be the point of reference. If the player can seethe driver, those subtle messages should still be shown in the extent that thegame allows it. Small things such as the drivers arms and head moving when aturn is made, can be equally important to get the player to feel that this is real.Newtons third law, every action has an equal and opposite reaction, is one iron-clad rule in ordinary physics. If a player drives its vehicle into another vehicle,the player normally expects something to happen. The expectations can rangefrom a small impact with little or no consequence to where one vehicle will bedemolished at the moment of impact and the driver comes flying out from thewindshield. One assumption that can be done with racing games is that playersthat are familiar with the type of vehicle that is driven, will be the audiencethat can truly tell if the game is realistic.

2.2 The Relation Of Terrain Vehicle and Driver

Driving a terrain vehicle is different from driving a car. The driver and passen-gers are more exposed to the risks of driving on uneven terrain and for mostterrain vehicles the driver need to control it with its own body weight. Thenadd the fact that there are often no seat belts on these types of vehicles.

If the driver is ejected off the vehicle there is a risk that said vehicle will

3

Page 9: Simulating Realistic Ragdoll Behaviour In Physical Situations1328413/... · 2019. 6. 20. · The foot can clip through the ter-rain and destroy the sence realism, however ragdolls

continue forward and get on top of the driver. When driving, both the driver

and vehicle posses kinetic energy, K = mv2

2 , created by the vehicle’s motion. Inthe event of a crash there is nothing to get rid of the kinetic energy stored inthe human body, so the body continues in the direction of velocity [9].

2.3 Vehicle Impacts On The Driver

So how does the human body react when driving a terrain vehicle and whatare the more common risks? By spending time on Youtube and watching peo-ple falling off vehicles [10][11], crashing into various objects and doing crazystunts[12], two major situations was identified.

Physical: such as collisions with other objects.Vehicle handling: where bad vehicle handling causes the driver to be ejected.

Since both of the categories are tightly tied to each other, there are somecases where a clear distinction is hard to identify.

And since this was implemented for a terrain racing game, the focus were con-centrated to these two situations. Not because other smaller situations couldn’tbe implemented, but because it would serve as an addition to existing gameplaywithout punishing players too much, and to give control to the developers whenthe driver would be ejected and the ragdoll physics would take over.

2.3.1 Physical Situations

When the driver sits on the vehicle there are some factors that will affect thedriver: velocity, ground irregularities, impact location, angular velocity, wheredrivers center of mass is located on the vehicle, and the stance of the driver toname a few.

Since the driver is exposed, there are many situations that may occur. Thevegetation can be a potential collision risk, bad weight shifting mid jump cancause the vehicle to tilt too much etc. To simplify the real range of physicalimpact that affects the driver, it will be divided into three levels.

Light: Small impact anywhere on the vehicle that may cause the driver’sbody to shake.

Medium: Bigger impact that may cause the driver to loose footing, grip orloose control of the vehicle for a short amount of time.

Extreme: An impact that will potentially cause real harm to the driver,such as being ejected from the vehicle in the direction of velocity and collidewith whatever objects that are in its path.

When getting ejected by a frontal collision, there are a few factors that arethe root cause of the collision. The most self explanatory are bad observationand path planning, collision with vegetation or other arbitrary collision hazards.And when driving on uneven terrain, there are situations where the vehicle

4

Page 10: Simulating Realistic Ragdoll Behaviour In Physical Situations1328413/... · 2019. 6. 20. · The foot can clip through the ter-rain and destroy the sence realism, however ragdolls

doesn’t respond as expected, caused by the velocity being too high or the wheelsdon’t have enough grip on the surface which may lead to a collision.

Next would be when collision when the vehicle is rotated θ degrees in the xor z axis in Unity. This may occur when a vehicle has enough velocity drivingdownhill and when reaching level ground, the suspension can’t disperse theforces involved, causing a shock from below. Or in the case of having enoughvelocity to get airborne and the vehicle rotates in the air, then lands on theground causing a downward force to be applied. Figure 1 shows an example ofcollision when the vehicle is rotated 45 degrees.

Figure 1: An example of collision at an angle

2.3.2 Vehicle Handling

Another risk when driving in rough terrain is driving through a slope that maycause the vehicle to roll over. This proves challenging to solve since the angularmomentum that the vehicle may have in certain situations will differentiatewhat people do. There are three situations identified. First is when the angularmomentum is quite low. Then people will try to keep the vehicle steady byshifting the center of mass or jumping off and holding up the vehicle. Thesecond situation occurs when the vehicle is starting to tip while the driver is ontop of the vehicle in a slope and the driver can’t halt the tipping by shifting thecenter of gravity. The driver will then usually jump off the vehicle towards thehigher ground and in so doing not be in the vehicle’s path when it starts rollingdownhill. The third situation occurs when the angular momentum is too greatand people don’t have time to react when the vehicle start rolling downhill.

So how is one supposed to solve this wide range of impacts on the driverwhen something happens? The three situations listed above have a few factors

5

Page 11: Simulating Realistic Ragdoll Behaviour In Physical Situations1328413/... · 2019. 6. 20. · The foot can clip through the ter-rain and destroy the sence realism, however ragdolls

to take into consideration when trying to solve this. The angle of the slope, theangular momentum currently affecting the vehicle, the width of the vehicle andwhere the center of gravity is situated on the vehicle. The biggest one is wherethe center of gravity is located. Figure 2 shows the basic physics involved whentipping over.

Figure 2: Object tipping over(Image credit: Body Physics: Motion toMetabolism)[13]

2.4 Driver Impact On The Vehicle

If one has ever driven an all terrain vehicle (ATV), snowmobile, quad or otherkinds of terrain vehicles, it is known that an ”active riding” style [9] is a char-acteristic of these kinds of vehicles. Shifting the driver’s center of gravity tocounteract forces that are affecting the vehicle could lead to loss of control [14].Also while driving over obstacles or uneven terrain, forces will be transmittedthrough the vehicle and the driver’s body must absorb them [9]. This is a cru-cial part of gameplay, since how fun is it to drive a vehicle that otherwise wouldneed shifting center of gravity and it had no effect on the vehicle?

In the beginning the team had implemented IK animations and vehiclephysics to get the feedback to the player that shifting the weight would havesome impact on driving. But as it only had a limited effect on the playersdriving performance, the risk of loosing control of the vehicle and being ejectedwas not implemented. If implemented, it would serve as constant reminder thatvehicle control is key. As mentioned before, tilting the vehicle is a real risk whendriving, so to get a more immerse gameplay it would be crucial to implementthe risk of the driver being ejected from the vehicle when the tilt was to big,and that the player could use the weight shift mechanic to save the situation,and also not drive in steeper slopes.

6

Page 12: Simulating Realistic Ragdoll Behaviour In Physical Situations1328413/... · 2019. 6. 20. · The foot can clip through the ter-rain and destroy the sence realism, however ragdolls

2.5 Tools

2.5.1 PuppetMaster and FinalIK

PuppetMaster is an asset that can be bought to the Unity game engine. It hasfeatures such as creating and editing ragdolls, different procedural behaviours,individual muscle settings and more [15]. It also comes with a number of ex-ample scenes to show what can be achieved. The PuppetMaster asset gives fullcontrol over the ragdoll’s muscle settings and its behaviours in different situa-tions. It allows some changes during play to help balance the different optionsavailable. It’s also able to create ragdolls during runtime. PuppetMaster uses adual rig, the normal animated character and a simplified ragdoll structure. Byusing a dual rig instead of a single character setup, performance is gained, sinceexpensive calculations are not necessarily done on objects that have colliders.The performance gain is even greater when IK/FK procedures are done on thetarget pose [16]. Its main purpose is to make the ragdoll physically follow themotion and animation of the animated target character. It provides classes thatcontrol muscle behaviours, pinning, and other properties.

2.5.2 Ragdoll Physics

Figure 3: Colliders on a ragdoll in Unity

To be able to have the physics engine interact with a character model, it

7

Page 13: Simulating Realistic Ragdoll Behaviour In Physical Situations1328413/... · 2019. 6. 20. · The foot can clip through the ter-rain and destroy the sence realism, however ragdolls

has to have some physical properties. That’s where rigid body properties comesinto play. Since a model is basically vertices with a texture on top, it has nomass, drag, or other physical properties to do calculations on. If no rigid bodyis added to the model, nothing will happen except an animation that can beplayed. When a rigid body and collider have been added, the physics enginehave something to do calculations on. This may be all that is needed for simplegame objects e.g. a rock, but when it comes to humanoid characters somethingelse is needed to get a more natural interaction with the character model andthe world. A ragdoll are a number of rigid bodies that are situated all overthe model, connected with joints. For extra interactions with the world aroundthem the ragdolls usually have a number of colliders attached to them. Theneach part of the model can collide with objects in the world and convey a feelingof realism to the player if implemented in the right way.

(a) Before punch hits (b) After punch hits

Figure 4: Before and after a punch lands between two ragdolls with PuppetMaster.

Ragdolls are usually used in the moment of death of a character to saveanimators time and by not repeating the same death animations over and overagain. It can also be used to apply impulses to a specific body part and then seehow the ragdoll behaves. This allows two biological characters to interact witheach other in a convincing way. For example, two humanoid characters thatare fighting with each other, one character hits the others arm with a punch,apply an impulse to the right body part and solve how much that body partmoves. Figure 4a and 4b shows how that can look. If inverse kinematics wasalso applied, the model can move its other arm to the point of impact to furthersimulate a feeling of pain without having an animator to do an animation clipfor it. Ragdolls combined with inverse kinematics can enhance a game’s feelingof naturalism at the cost of extra computational time.

8

Page 14: Simulating Realistic Ragdoll Behaviour In Physical Situations1328413/... · 2019. 6. 20. · The foot can clip through the ter-rain and destroy the sence realism, however ragdolls

2.5.3 Kinematics

In classical mechanics there exists a branch of study called kinematics whichdescribes objects in motion without taking into consideration the forces involvedor what caused the motion. In computer graphics it is used to create anima-tions. There are two main ways to achieve animation with kinematics, ForwardKinematics and Inverse Kinematics. Forward kinematics is used to createanimations by selecting a joint or bone and move it a certain distance and repeatto make an animation clip. Inverse kinematics are used in procedural anima-tion which are animations computed in real-time. IK can also solve problemsthat aren’t as apparent. Such as when a character walks up or down crookedterrain, if inverse kinematics isn’t applied, the feet will clip through the groundsince the walk animation is playing and do not take into account for the slopesangle. With inverse kinematics applied, the feet will be parallel to the terrain.

2.5.4 Forward Kinematics

Forward kinematics calculates joint movement in a chain of rigid bodies con-nected with a number of joints, from the base joint to get the end-effector to adesired location. Since the number of joints may vary, this affects the Degree ofFreedom (DOF) the chain has.

Figure 5: A chain of rigid bodies connected with joints (Image credit: Themathematics of Forward Kinematics 2017)[17]

Figure 5 shows a chain were the three joints are rotated to its zero angle,resulting in its resting position. If rotation is applied to joint P0 by θ0, the restof the chain of joints and links attached to P0 will move.

9

Page 15: Simulating Realistic Ragdoll Behaviour In Physical Situations1328413/... · 2019. 6. 20. · The foot can clip through the ter-rain and destroy the sence realism, however ragdolls

Figure 6: The joint P0 is rotated by θ0 (Image credit: The mathematics ofForward Kinematics 2017)[17].

Important to note in Figure 6 that joints P1 and P2 have no rotation appliedto them. When applying rotation θ1 to P1, P2 will be affected by both θ0 andθ1.

Figure 7: Looking at the first joints in the chain (Image credit: The mathematicsof Forward Kinematics 2017)[17]

The math to solve the change in orientation in the chain is quite simple.Starting from the base joint:

P1 = P0 +D1 (1)

When the angle θ0 changes, rotate the distance vector D1 around P0.

P1 = P0 + rotate (D1, P0, α0) (2)

As mentioned above, if rotation is applied to P1, then P2 is affected by θ0 andθ1. So the equation for the whole chain becomes:

Pi = Pi−1+ rotate(Di, Pi−1

,

i−1∑k=0

θk) (3)

The drawbacks with FK is however, that in order to move a characters hand,movement and rotation have to be applied to the upper arm first and then thelower arm [18].

10

Page 16: Simulating Realistic Ragdoll Behaviour In Physical Situations1328413/... · 2019. 6. 20. · The foot can clip through the ter-rain and destroy the sence realism, however ragdolls

2.5.5 Inverse Kinematics

From the beginning, Inverse Kinematics (IK) was used in robotics, but it worksreally well in computer animation as well. From the position of the end-effectorcalculate joint movement back to the root. The reason to use IK in anima-tion instead of forward kinematics are, since the point in 3D space where theend-effector is trying to reach, it is then easier to go up the joint hierarchy andcalculate rotation and positions for each individual joint. So by moving theend-effector, the whole joint system moves with it. But it comes at the costat increasing computational time. There may also be more than one solutionor none, since most IK algorithms use an iterative approach to get the closestanswer. This creates a problem since IK animations in games need to be calcu-lated in real-time. However the algorithm can terminate if the solution is closeenough. In order to understand how IK works, two different type of methodsto solve IK were researched.

2.5.6 The Jacobian Method

The Jacobian is a linear approximation to the problem of getting the end-effectorto a certain position. Assume that there exists a joint configuration: T, thatlet’s the end-effector to reach target position. To get T, the change in rotation∆O needs to be calculated. And in order to calculate ∆O, the Jacobian MatrixJ, needs to be calculated. The Jacobian Matrix represents the relationshipbetween the position of the end-effector and the orientation of each joint. Thesethree steps are the main calculations for the Jacobian Method. If O is the initialrotation, then the next step is to calculate ∆O, T is calculated by adding thechange in orientation:

T = O + ∆O (4)

This is done by using an iterative approach similar to the Gradient DescentMethod [19].

By using iterative solutions to calculate ∆O, each solution is closer to thefinal answer than the previous, the local error minimizes for every successfuliteration. To influence the iterative approach, h is inserted to equation 4, sothe equation changes to:

T = O + ∆O ∗ h (5)

Where h is a chosen number between 0.01 - 0.000000001. This is repeateduntil the end-effector position is close enough to the target position defined bysome chosen distance.

To find ∆O, the Jacobian Matrix needs to be calculated. To find ∆O,equation 6 is used.

V = J ∗ ∆O (6)

Where V is the change of spacial location and is calculated by V = X − P ,where X is the target position and P is the end-effector position. J is theJacobian matrix (see equation 7).

11

Page 17: Simulating Realistic Ragdoll Behaviour In Physical Situations1328413/... · 2019. 6. 20. · The foot can clip through the ter-rain and destroy the sence realism, however ragdolls

J =

δex1

δΘ1

δex2

δΘ2. . . δexn

δΘnδey1

δΘ1

δey2

δΘ2. . .

δeyn

δΘnδez1δΘ1

δez2δΘ2

. . . δeznδΘn]

(7)

Each column in the matrix represents how the position of the end-effectoris effected by a change in a joints angle [20]. See equation 11 for the analyticalform to calculate the Jacobian Matrix.

In equation 6, the unknown is variable is ∆O. So in order to calculate it,the Jacobian inverse J−1, is multiplied into equation 6.

J−1V = J−1J∆O (8)

Which results in equation 9.

∆O = J−1V (9)

Now the equation to find ∆O is known, all that is left to do is to calculatethe Jacobian matrix. As shown in eqtuation 7, it isn’t difficult to calculatethe Jacobian matrix. However the inverse can be computational expensive andsince the Jacobian Matrix may not necessary be a square matrix, an inversemay not exist. The reason that the matrix may not be a square is that eachcolumn represents one joint in the chain. If there are more than three joints,the matrix will not be a square. There exists a rough approximation to theJacobian Inverse that works in simple cases, it is the Jacobian Transpose JT .So by replacing J−1 in equation 9 with JT , we get:

∆O = JTV (10)

The Jacobian Transpose always exists, as opposed to the Jacobian Inverse.It also less computational expensive, which means that the performance will bebetter. Additionally, the Jacobian Transpose is easier to implement than theJacobian Inverse.The analytical form to calculate the Jacobian matrix is simple:

J =

RA × (E −A)x RB × (E −B)x RC × (E − C)xRA × (E −A)y RB × (E −B)y RC × (E − C)yRA × (E −A)z RB × (E −B)z RC × (E − C)z

(11)

Where RA, RB, RC is the axis rotation of joint A, B and C. E is end-effectorposition, and A, B and C is the position of each individual joint. Equation 11is only an example and can be used for a joint chain with n joints.

12

Page 18: Simulating Realistic Ragdoll Behaviour In Physical Situations1328413/... · 2019. 6. 20. · The foot can clip through the ter-rain and destroy the sence realism, however ragdolls

2.5.7 Cyclic Coordinate Descent

The Cyclic Coordinate Descent (CCD) algorithm have a main advantage, it iseasier to implement than some other IK algorithms.

Algorithm 1: Simple CCD Algorithm

Result: End-effector position close to input positionInput: Target position in world space

Set all joints in world space;while distance < epsilon or iterations > limit do

Create vector C from current joint to end-effector;Create vector T from current joint to target position;Calculate angle A between C and T;Check rotation direction with CrossProduct(C,T);Rotate joint in local space by A;Calculate new distance from end-effector to target;if current == root joint then

current = end-effector.parent;else

current = current.parent;end

end

Algorithm 1 shows the how a CCD algorithm works. It can however beimproved by restricting the Degree of Freedom (DOF) for each individual joint,so it can’t rotate to a position that a character can’t physically achieve [21].By dampening how much the angle of each joint can change in a single stepit can get a smoother look. As all IK algorithms it starts at the end-effector.By measuring the difference between the current joint’s position and the end-effector’s position and to reduce this difference to zero, a rotation or quaternionis calculated for each joint. In order to move the last link in a a chain of jointscloser to the target, the CCD algorithm performs a series of rotations. Eachiteration will try to get the end-effector closer to the target input.

However, the CCD algorithm has some issues. Figure 8 show some casesthat the algorithm has problems solving. In figure 8(a), the target could bereached by one rotation at the root but it requires 100 iterations. Figure 8(b)shows how the chain loops around itself but there is a simpler solution. Andfigure 8(c) shows how the chain collapsed around itself to reach a target positionthat is close to the root [22].

13

Page 19: Simulating Realistic Ragdoll Behaviour In Physical Situations1328413/... · 2019. 6. 20. · The foot can clip through the ter-rain and destroy the sence realism, however ragdolls

Figure 8: Typical problems with CCD (A robust inverse kinematics algorithmfor animating a joint chain 2009)[22]

14

Page 20: Simulating Realistic Ragdoll Behaviour In Physical Situations1328413/... · 2019. 6. 20. · The foot can clip through the ter-rain and destroy the sence realism, however ragdolls

3 Implementation

Ragdolls and it’s behaviour was implemented with Unity, Rootmotions Puppet-Master, FinalIK and C#.

3.1 Ejecting the Driver

Unity has a built in function, OnCollisionEnter() that is called every time acollision registers on the game object that have a collider attached. In OnCol-lisionEnter(), vital collision data is easily obtained, such as the normal of thecollision, impulse, and relative velocity. When a collision occurs on the vehicle,the magnitude of the force is calculated and is sent to the custom ragdoll be-haviour script together with the collision normal. The script then checks if theforce is big enough to eject the ragdoll from the vehicle or trigger another checkthat ejects the driver if the angle between vehicle’s forward vector and collisionnormal is too big. If it is big enough, some checks are done to ensure that it isa valid collision since collisions directly from below give unwanted ejections insome cases. By implementing it in this way, certain collisions are ignored be-cause of the uneven terrain that can cause collision triggers when driving overa certain velocity.

3.2 Tipping

Since tipping over occurs when the body’s center of gravity passes the farthestpoint of the base (see figure 2), this can be solved by doing a ray-plane inter-section. The plane will be defined by the wheels positions and the ray origin isthe center of mass of the driver. And since the ray direction is always in thesame direction as gravity, it was the perfect method to solve this problem.

Algorithm 2: Ray-plane intersection

Result: Get the intersection point of ray-planeFind the center of gravity of the driver;Get wheel positions;Calculate plane normal;if DotProduct(world.down ,plane normal) > epsilon then

Get point of intersection;if intersect point is within the square then

return;else

Eject driver;end

end

Algorithm 2 shows how to check if the ragdoll is at risk of falling off thevehicle when it is tilted. Specifically when the center of gravity is outside of thewheelbase of the vehicle. It also ties together to the game mechanic of beingable to shift the drivers center of gravity.

15

Page 21: Simulating Realistic Ragdoll Behaviour In Physical Situations1328413/... · 2019. 6. 20. · The foot can clip through the ter-rain and destroy the sence realism, however ragdolls

3.3 Respawning

Since the driver could get ejected from the vehicle, it had to be able to returnto it as well. PuppetMaster had a function to move the ragdoll to a providedposition and rotation. This function had some issues however. It did teleportthe ragdoll, but only when it ”read”. With the provided source code, it was noclear sign that it began to ”read” for example, the next frame. It was becauseof the fact that in Unity, fixed updates aren’t necessary called every frame. It isall dependent on the current frame rate used. If the frame rate is 100 frames persecond (fps) then two rendering frames are spent for each fixed update. If theframe rate is 25 fps, then fixed update is called two times every frame. Therewas also the issue of getting the correct position and rotation of the vehicle.Getting the orientation of the vehicle too soon meant that the ragdoll wouldteleport about midway and possibly get stuck in the terrain. This was solved byusing C# coroutines, which saves the current state of the function and allowsthe CPU to do other calculations. The CPU can then return where it left ofand continue with the operations left.

public IEnumerator RespawnPuppetAtVehiclePosition()

{

respawning = true;

Physics.IgnoreLayerCollision(24, 26, true);

Physics.IgnoreLayerCollision(25, 26, true);

Physics.IgnoreLayerCollision(26, 27, true);

puppetMaster.Resurrect();

doNotKill = true;

yield return null;

puppetBehaviour.SetState(BehaviourPuppet.State.Puppet);

if(bodies != null) {

for(int i = 0; i < bodies.Length; i++) {

bodies[i].ClearForces();

}

}

yield return null;

if(!aik.runtime.updateBody) {

aik.runtime.updateBody = true;

}

yield return null;

puppetMaster.Teleport(rootTransform.position,

rootTransform.rotation, true);

16

Page 22: Simulating Realistic Ragdoll Behaviour In Physical Situations1328413/... · 2019. 6. 20. · The foot can clip through the ter-rain and destroy the sence realism, however ragdolls

yield return null;

fbbik.enabled = true;

puppetBehaviour.masterProps.normalMode =

BehaviourPuppet.NormalMode.Unmapped;

car.lostControl = false;

timer = 0.0f;

puppetMaster.mode = PuppetMaster.Mode.Active;

respawning = false;

}

As seen in the code above, the coroutine yields four times to allow the gameengine to clear all forces to the rigid bodies, get the correct orientation of thevehicle and reset some PuppetMaster states.

3.4 Simulating with Inverse Kinematics

3.4.1 Simulating Looking Ahead

The natural behaviour of a driver is to look to a point in front of where he/sheis driving. To solve the head turning RootMotion’s AimIK was used. It worksby only rotating the neck joint and there is functionality to add other joints tofollow when φ is too large. The point has to however rotate around the driverand follow a slope angle in order to simulate that the driver was looking ahead.This was solved by SphereCasting (raycasting in the shape of a sphere) aroundthe point in order to keep it level with the ground at all times. Rotation wasdone by Unity’s built in function Transform.RotateAround().

3.4.2 Simulating Body Movement

To achieve smaller body reactions when driving, the ragdoll was active at alltime. This however caused the driver to stutter on the vehicle since the rigidbodies on the driver was a few frames ahead when resolving physics constraints.In Unity the physics are calculated in ≈ 60 fps, while ordinary updates canbe called more often. In order to simulate body movement, IK was used toa limited degree. By changing the local position of the different parts of thedrivers body, there was some simulation on the body by using RootMotion’sFinalIK. However, to really see the body movement, the local positions of thejoint’s had to change to a certain degree (because of the camera angle). It hadlimited uses in smaller vehicle impacts. And when larger body movement wastriggered, it blended badly into the current animation in certain situations.

17

Page 23: Simulating Realistic Ragdoll Behaviour In Physical Situations1328413/... · 2019. 6. 20. · The foot can clip through the ter-rain and destroy the sence realism, however ragdolls

(a) Protective stance (b) Falling

Figure 9: The animations blends from (a) to (b) with flailing of the arms andlegs in (b)

The solution was to only simulate body movement when the driver wasejected from the vehicle. PuppetMaster came with predefined behaviour’s forthe ragdoll, one which blended to and from a protective stance when the distanceto the ground was small enough and writing animation when the distance wastoo big. This worked really well when ejecting the driver. Figure 9b shows thetwo animations that will blend together.

18

Page 24: Simulating Realistic Ragdoll Behaviour In Physical Situations1328413/... · 2019. 6. 20. · The foot can clip through the ter-rain and destroy the sence realism, however ragdolls

4 Results

The goal of the project was to implement ragdoll behaviour in a terrain vehicleracing game developed by Zordix. The driver would be ejected from the vehiclein different situations. It would act as a throttle limiter for some vehicles, asstrong collisions would eject the driver and the player would not be able tocontinue driving for a period of time, thus loosing a small amount of time in therace. It would also act as gameplay enhancer since shifting of center of gravityon the vehicle already was implemented but otherwise didn’t have much effecton how the game was played.

4.1 End Results

4.1.1 Collision

The result of collision are straightforward. When the impact force is strongenough then the puppet will ejected from the vehicle, use ray casting againstcolliders on the vehicle are activated, and let the physics engine solve the re-sulting collisions. This ensures that no outside forces are added to the ragdolland the ragdoll have some physical interactions with the vehicle.

4.1.2 Collisions At an Angle

Angled collision was solved and the ragdoll can fall from the vehicle when suchcollisions occur and the angle is big enough.

4.1.3 Tipping

Since tipping is a real risk when driving a terrain vehicle, this was importantto implement. This was done by using a ray-plane intersection algorithm andthen check if the point of intersection was outside the wheelbase. However,the ray-plance intersection is implemented with some leeway. Otherwise whenshifting the drivers center of gravity it will fall off since the wheelbase is quitesmall. The driver can also not get ejected mid air in the current version whenthe ray-plane intersection fails.

4.1.4 Respawning

Respawning at desired location was solved and implemented. By waiting a fewframes, the correct location and rotation could be found and the driver teleportsback on to the vehicle.

19

Page 25: Simulating Realistic Ragdoll Behaviour In Physical Situations1328413/... · 2019. 6. 20. · The foot can clip through the ter-rain and destroy the sence realism, however ragdolls

4.1.5 Head Turning

The turning of the head was solved to a degree but not used in the currentversion. There was a issue where the point somehow was calculated abovethe driver head after a collision, giving the impression that the drivers neck hadsnapped. Due to lack of time and other more important issues, this functionalityis not used in the current version.

20

Page 26: Simulating Realistic Ragdoll Behaviour In Physical Situations1328413/... · 2019. 6. 20. · The foot can clip through the ter-rain and destroy the sence realism, however ragdolls

5 Analysis

The specifications for the computer used for testing was:

Operating System: Windows 10CPU: AMD FX-8350 Eight-Core Processor 4.0 GHzRAM: 24.0 GBGraphics Card: Nvidia Geforce GTX 1060 6 GB

Unity allows for profiling a project. This window allows the user to checktime spent on garbage collection, CPU usage and more. To see if the ragdolluses too much computational power, analysis was done by activating profilingthe moment before the ragdoll was ejected from the vehicle, by having a keybound to ejecting the driver so that it could be repeated. And the profilingended when the ragdoll had respawned. The place (in game) chosen was on topof a heap of objects, that had rigid bodies and colliders attached to see how aworst case scenario would impact performance. This was repeated ten times toget a rough estimate how much impact the ragdoll had on the performance andsince the default profiler in Unity only supports frame by frame checks it wouldgive a basic sample.

5.1 CPU Usage

During the time from being ejected to getting back to the vehicle, the averagetime spent on calculations in the custom script during a frame was 0.105 ms.The behaviour script was designed by using FixedUpdate() and when the driverwas ejected, the only functionality were addition of Time.deltaTime to a timer,fetching vehicle velocity and checks if some criteria had been fulfilled in orderto start respawning the driver. Ejection checks were ignored during this time.

5.2 Memory Usage

Since there was limited number of ragdolls in use at the time of profiling, theamount of additional memory allocated by RootMotion’s PuppetMaster, Fi-nalIK and the custom script was minimal during runtime. At most the memoryallocation for each class was:

PuppetMaster: 0 bytes.FinalIK: 0 bytes.Custom: 2.5 Kb, which happened at the moment of respawning the ragdoll atvehicle position.

Since there was a small amount of additional memory allocated there wouldnot be large garbage collections caused by implementing PuppetMaster andFinalIK.

21

Page 27: Simulating Realistic Ragdoll Behaviour In Physical Situations1328413/... · 2019. 6. 20. · The foot can clip through the ter-rain and destroy the sence realism, however ragdolls

5.3 Physics Profiling

Figure 10: A screenshot of the profiling window in Unity

In Unity, profiling physics gives only simple information. Figure 10 showsone of the graphs from the profiler. The line shows the frame before the ejectionfunction of the driver was called. Respawning happens a few frames before thegraph ends. As seen in figure 10, most lines under Physics are pretty muchconstant. That’s because it is referring the physical objects in the whole scene.There are a few peaks in active constraints during the time between ejectionand respawning.

22

Page 28: Simulating Realistic Ragdoll Behaviour In Physical Situations1328413/... · 2019. 6. 20. · The foot can clip through the ter-rain and destroy the sence realism, however ragdolls

6 Discussion

The use of ragdolls in modern games can enhance the feel of realism and getthe player to play the game how it was supposed to be played. And it can givenice body effects during different scenarios. Most of the goals that were set upat the beginning of the project were achieved and worked better than expected.RootMotions assets for Unity are simple to use, have good documentation andgive the developers many tools to tailor it to their needs. The most challengingthing was to balance when the driver would get ejected from the vehicle. Tooeasy to get ejected and casual players might not want to play the game. Toodifficult to fall off and it would result in the player thinking ”I’ve should’vefallen off there”. Since there are many different situations where the driver canget ejected from the vehicle it was no easy task to balance it correctly. Withthis in mind, I think the implementation that I leave behind is fairly balancedbut there is room for improvements.

23

Page 29: Simulating Realistic Ragdoll Behaviour In Physical Situations1328413/... · 2019. 6. 20. · The foot can clip through the ter-rain and destroy the sence realism, however ragdolls

7 Balances against ethical, environmental andsocial criteria

7.1 Ethical

The implementation of ragdoll doesn’t save user information so there is no riskof exposing any. It will only add to existing gameplay. The game will feel morenatural and be more challenging to play.

7.2 Environmental

Since the game is developed for different platforms, there may be a need forphysical copies. This uses material that would not be used if it was purely fordigital download. There can also be the case that this game is the deciding factorthat tips a person to buy a new console or computer to be able to play it. Thepower usage of the different platforms and also the source of the electricity canalso have a negative effect on the environment. If the platform uses electricityproduced by fossil fuel it is definitely bad for the environment.

7.3 Social

There is always a risk when releasing a game, that some people get so addictedto it that they forsake everything else in their life to play it. Things like family,friends and their own health by not taking the time to eat or drink.

And it also a risk when two friends start to compete with each other thatthey end up despising each other.

If the inverse kinematics algorithms get better and make it easier to codeand use, then there may be a risk that the job of animation designer may beaffected.

24

Page 30: Simulating Realistic Ragdoll Behaviour In Physical Situations1328413/... · 2019. 6. 20. · The foot can clip through the ter-rain and destroy the sence realism, however ragdolls

8 Future Work

There is room for improvement. The ragdoll currently has two poses, drivingand protective. Since the driver assumes the protective pose when being ejected,all ragdoll collisions are solved from that pose. And when the ragdoll’s velocityis less then a certain threshold it blends into the driver pose. It can look a littleweird, depending on how the ragdoll’s final resting position is. It could possiblybe solved by dampening some joint limits and how much the ragdoll shouldfollow the current animation. The ragdoll also ignores certain collisions thatcould have acted as a nice addition to visuals, like driving under a low hangingbranch. It could’ve detected that something was at head level and ducked todrive under it. And it could be beneficial to implement grip strength to thedriver. At the moment the driver gets ejected when certain requirements aremet and it doesn’t take into account the grip strength of the driver. This couldbe useful in certain situations to trigger some other behaviour for the ragdoll.

And since IK was used sparingly, it could have been used to change thepose of the driver when it was ejected depending of the magnitude of the forceand what was in front of it. If the magnitude and direction of the force waswithin a certain range, IK could have been used to get the driver to flip over thevehicle but still holding on to the steering wheel. It can also be used to simulateloosing footing off the vehicle or having various laying poses that was randomizedwhen the rigid body is practically laying still. There is also functionality inPuppetMaster to get the driver to get up on their feet. I did try to implementthis, but there was not enough time to get it to work properly. For example,there were cases where the driver would stand straight at a 45 degree angle.

25

Page 31: Simulating Realistic Ragdoll Behaviour In Physical Situations1328413/... · 2019. 6. 20. · The foot can clip through the ter-rain and destroy the sence realism, however ragdolls

References

[1] Zordix. Zordix’s homepage. url: http://www.zordix.com/. [Accessed:29.01.2019].

[2] Alan Zucconi. An Introduction to Procedural Animations. Apr. 2017. url:https://www.alanzucconi.com/2017/04/17/procedural-animations/.[Accessed: 17.03.2019].

[3] Nathan Chandler. How Ragdoll Physics Works. url: https://electronics.howstuffworks.com/ragdoll-physics1.htm. [Accessed: 25.03.2019].

[4] Michal Mach. Physics Animation in Uncharted 4: A Thief ’s End. Dec.2018. url: https://www.youtube.com/watch?v=7S-_vuoKgR4. [Ac-cessed: 25.03.2019].

[5] Maic Masuch and Niklas Rober. “Game Graphics Beyond Realism: Then,Now, and Tomorrow”. In: (Jan. 2005). [Accessed: 11.03.2019].

[6] Gek Siong Low. “Understanding Realism in Computer Games throughPhenomenology”. In: (Mar. 2019). [Accessed: 31.03.2019].

[7] Katherine Isbister. Better Game Characters by Design, a PsychologicalApproach. Clarendon Press, Sept. 2005. isbn: 9781558609211. [Accessed:14.03.2019].

[8] Wannes Ribbens and Steven Malliet. “Perceived Digital Game Realism: AQuantitative Exploration of its Structure”. In: Presence 19 (Dec. 2010),pp. 585–600. doi: 10.1162/pres_a_00024. [Accessed: 10.03.2019].

[9] Charles Jennissen et al. “The Effect of Passengers On All-Terrain VehicleCrash Mechanisms and Injuries”. In: vol. 21. Oct. 2013. doi: 10.1136/injuryprev-2015-041654.24. [Accessed: 16.03.2019].

[10] QUAD & Four-Wheeler FAILS. Jan. 2019. url: https://www.youtube.com/watch?v=6MYIpw_W8UU. [Accessed: 04.02.2019].

[11] Worlds Best & Worst Quad-ATV Wrecks & Crashes. Oct. 2016. url:https://www.youtube.com/watch?v=i_oqxC8HT-Y. [Accessed: 04.02.2019].

[12] 2018 EPIC ATV-QUAD MOMENTS Vol 1 - MWL. Feb. 2018. url:https://www.youtube.com/watch?v=i_oqxC8HT-Y. [Accessed: 11.02.2019].

[13] Lawrence Davis. Body Physics: Motion to Metabolism. Chap. 39. url:https://openoregon.pressbooks.pub/bodyphysics/chapter/tipping-

point/. [Accessed: 28.03.2019].

[14] Charles A. Jennissen et al. “Dynamic Responses of Experienced All-TerrainVehicle Operators to Simulated Unexpected Terrain Changes”. In: Pro-ceedings of the Human Factors and Ergonomics Society Annual Meeting58.1 (2014), pp. 1889–1893. doi: 10.1177/1541931214581395. [Accessed:28.03.2019].

[15] Partel Lang. Puppet Master Documentation. url: http://root-motion.com/puppetmasterdox/html/page3.html. [Accessed: 28.01.2019].

26

Page 32: Simulating Realistic Ragdoll Behaviour In Physical Situations1328413/... · 2019. 6. 20. · The foot can clip through the ter-rain and destroy the sence realism, however ragdolls

[16] Partel Lang. PuppetMaster Overview. url: http://root-motion.com/puppetmasterdox/html/page3.html. [Accessed: 31.03.2019].

[17] Alan Zucconi. The Mathematics of Forward Kinematics. Apr. 2017. url:https://www.alanzucconi.com/2017/04/06/forward-kinematics/.[Accessed: 17.03.2019].

[18] Steve Pitzel. Character Animation: Skeletons and Inverse Kinematics.url: https://software.intel.com/en- us/articles/character-

animation-skeletons-and-inverse-kinematics. [Accessed: 08.03.2019].

[19] Niklas Donges. Gradient Descent in a Nutshell. Mar. 2018. url: https://towardsdatascience.com/gradient- descent- in- a- nutshell-

eaf8c18212f0. [Accessed: 29.03.2019].

[20] Luis Bermudez. Overview of Jacobian IK. July 2017. url: https : / /

medium.com/unity3danimation/overview-of-jacobian-ik-a33939639ab2.[Accessed: 08.03.2019].

[21] Jeff Lander. “Making Kine more flexible”. In: Game Developer Magazine11 (1998), pp. 15–22. [Accessed: 08.03.2019].

[22] Ramakrishnan Mukundan. “A robust inverse kinematics algorithm foranimating a joint chain”. In: IJCAT 34 (2009), pp. 303–308. [Accessed:22.03.2019].

[23] Wages Richard, Stefan Grunvogel, and Benno Grutzmacher. “How Real-istic is Realism? Considerations on the Aesthetics of Computer Games”.In: vol. 3166. Sept. 2004, pp. 216–225. doi: 10.1007/978-3-540-28643-1_28. [Accessed: 22.03.2019].

[24] Yamaha Raptor 700R vs YFZ450R Shootout. Which is Best for You?Sept. 2016. url: https://www.youtube.com/watch?v=B9S6Q2KQSIA.[Accessed: 20.02.2019].

[25] Best Snowmobile Fails 19, Snowmobiles Fail-Win Compilation. Jan. 2018.url: https://www.youtube.com/watch?v=IIuJqvLp5qw. [Accessed:11.02.2019].

[26] Jin Ok Kim et al. “The Inductive Inverse Kinematics Algorithm to Manip-ulate the Posture of an Articulated Body”. In: International Conferenceon Computational Science. 2003. [Accessed: 22.03.2019].

[27] R. Muller-Cajar and Ramakrishnan Mukundan. “Triangulation : A newalgorithm for Inverse Kinematics”. In: 2007. [Accessed: 22.03.2019].

[28] Gino van den Bergen. Math for Game Programmers: Inverse Kinematics.url: http://www.dtecta.com/files/GDC14_VanDenBergen_Gino_

Math_Tut.pdf. [Accessed: 19.02.2019].

[29] Pluralsight. How Animation for Games is Different from Animation forMovies. url: https://www.pluralsight.com/blog/film-games/how-animation-for-games-is-different-from-animation-for-movies.[Accessed: 18.03.2019].

27

Page 33: Simulating Realistic Ragdoll Behaviour In Physical Situations1328413/... · 2019. 6. 20. · The foot can clip through the ter-rain and destroy the sence realism, however ragdolls

[30] Wei Song and Guang Hu. “A Fast Inverse Kinematics Algorithm for JointAnimation”. In: Procedia Engineering 24 (Dec. 2011), pp. 350–354. doi:10.1016/j.proeng.2011.11.2655. [Accessed: 20.03.2019].

[31] Gabe Mulley and Matt Bittarelli. “Ragdoll Physics”. In: Apr. 2007. [Ac-cessed: 19.03.2019].

[32] Johan Gastrin and Lars Kjelldahl. “Physically Based Character Simu-lation – Rag Doll Behaviour in Computer Games”. In: 2004. [Accessed:21.02.2019].

[33] Wikipedia. Ragdoll Physics. 2019. url: https://en.wikipedia.org/wiki/Ragdoll_physics. [Accessed: 04.02.2019].

[34] Ron Kurtus. Center of Gravity (CG). url: https://www.school-for-champions.com/science/gravity_center.htm#.XJyHkVVKhhE. [Ac-cessed: 28.03.2019].

[35] Michael Meredith and Steve Maddock. “Real-time inverse kinematics: Thereturn of the Jacobian”. In: (Jan. 2004). [Accessed: 03.04.2019].

28