The next form of procedural content explored was procedural animations.

Procedural animations are a great alternative to traditional animation, when something needs to be animated in a way that is unpredictable or complex it can be much faster to animate procedurally. “One of the most simple, yet effective way to do procedural animations is by using ragdoll physics” (Zucconi 2017). Ragdoll physics is a type of procedural animation that simulates character movement using physics based reactions (Ipacs 2023). When a character has external forces act upon it, like being hit by a large object or falling due to gravity, ragdoll physics are used to simulate how the character would react. The biggest disadvantage of ragdolls is that they are unpredicatable and can result in awkward behaviours.

(Zucconi 2017)

Another implementation of procedural animations is inverse kinematics (IK). “Inverse kinematics is a mathematical and algorithmic solution that determines the joint movements needed to achieve a desired position of an end effector” (Ipacs 2023). This can be used to make a characters dynamically interact with the environment, such as having different foot placement depending on the elevation of the ground they are standing on, or have them touch a wall when they are pushed up against it.

To implement IK into Unity, the Animation Rigging package (Unity 2020) can be utilised to move part of the animation pipline into Unity itself, enabling the ability to add constraints, custom rigs, and create animations within the editor (iHeartGameDev 2022). We will be creating a simple waving animation.

Once the character has been rigged using the Animation Rigging package, procedural animations can be implemented iHeartGameDev. (2023).

Next, the constraints need to be added. We will be making use of a Two Bone IK constraint as well as a Multi-Rotation constraint. After auto filling the Two Bone IK constraint, two source objects will be created, a Target object and a Hint object. The Target is the point where the tip is attempting to move to and the Hint is used to specify the direction that the limb should be oriented in when it bends. Next, the hand is set as the constrained object in the Multi-Rotation constraint and set the Target object as the source object within the constraint.

Finally, code was implemented to create a waving animation, and the target objects where added in the editor.

Here is the final result


Reference List

Zucconi, A. (2017). An Introduction to Procedural Animations. [online]. Available from: https://www.alanzucconi.com/2017/04/17/procedural-animations/ [accessed 9 October 2024].

Ipacs, D. (2023). Procedural Animation in Video Games: A Guide. Bluebird International [online]. Available from: https://bluebirdinternational.com/procedural-animation/ [accessed 9 October 2024].

iHeartGameDev. (2022). Intro to Animation Rigging & Procedural Animation in Unity. [YouTube video]. Available from: https://www.youtube.com/watch?v=Wx1s3CJ8NHw [accessed 9 October 2024].

Unity. (2020). Animation Rigging. [online]. Available from: https://docs.unity3d.com/Packages/com.unity.animation.rigging@1.3/manual/index.html [accessed 9 October 2024].

iHeartGameDev. (2023). *How to build a Character Rig and State Machine for Procedural Animation Unity Tutorial*. [YouTube video]. Available from: https://www.youtube.com/watch?v=-Oqa-iOZpIE [accessed 9 October 2024].

Zoltikrys (2024) IK_Tasks. GitHub [online]. Available from: https://github.com/Zoltikrys/IK_Tasks [accessed 9 October 2024].

Updated: