Skip to content

fierc3/UnityCharacterAnimations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UnityCharacterAnimations

Goal of this Prototype

The goal of this prototype is to show the different approaches possible regarding animations in Unity and the possibllity it gives to create dynamic character.

Keyframe vs Procedural animations

To understand this project fully the understanding between the difference of keyframe vs procedural animations need to be known:

Keyframe Animations

This type of animation involves manually setting keyframes for the position, rotation, and scale of a 3D object, and Unity then interpolates the movement between those keyframes.

Procedural Animations

Keyframe animation requires a lot of manual work, but it allows for precise control over the movement of an object.On the other hand, procedural animation involves using code to generate animations on the fly. This can include animations that are driven by physics simulations, procedural modeling, or other algorithms. Procedural animation is more flexible than keyframe animation because it can adapt to changes in the environment or user input in real-time.

Character Animations

This prototype attempts to show how these 2 animations types can work together in the Showcase Scene. image

Using Unity to its advantage

Implementing all this from scratch would be a HUGE effort, which is why were using the tools provided by Unity.

Mecanim

Mecanim is a state machine-based animation system in Unity, which allows developers to create complex animation sequences for characters and objects in games. It provides a way to define animation transitions and blend animations smoothly, allowing for more natural-looking animations. Mecanim also provides features such as inverse kinematics, animation events, and parameter-driven animations, which allow for greater control over the animations.

More: https://docs.unity3d.com/462/Documentation/Manual/MecanimAnimationSystem.html

image

Unity Animation Rigging

Unity's Animation Rigging package allows you to create custom animations by manipulating the position, rotation, and scale of joints in real-time. This approach is useful for creating complex animations that are difficult or impossible to achieve with traditional keyframe animation

More: https://docs.unity3d.com/Packages/com.unity.animation.rigging@1.0/manual/index.html

image

Character Features

Each feature displayed in the Showcase should be a learning tool, here a quick explaination to each one:

  • Idle / Running
    • Simple Example how to switch states between 2 animation clips and show how the transition (interpolation) can be influenced
  • Look At
    • Shows the power of using a rig with Animation Rigging constraints and using code to dictate those constraints. A target is dynamically changed via code and the constraints adjust accordingly
  • Ragdoll
    • Simple implementation of a ragdoll system which changes to collider depending on state
  • Get up (Unfinished)
    • Combines procedural with keyframe animations to create a standing up animations. Also shows the workflow that can be used to add Mixamo animations for existing character
  • Cape (not yet started)
    • Example showing how cloth physics can be combined with Animation Rigging constraints.
  • Spell Casting (not yet started)
    • Example showing the use of motion capture data turned keyframe animation in combination with animation layers

About

Sample Project for Unity Character Animations setup

Topics

Resources

Stars

Watchers

Forks