Augmented Reality (AR) scenes can superimpose fantasy onto reality. Bringing the quality and interactiveness of that fantasy sometimes means animating models. But how do these animated models work? Here are the basics of what I learned working with armatures, character rigging, and keyframes to make AR scenes on a mobile app more lively and interactive.
Understanding Armatures
Armatures are the bone structure of a 3D model—very similar to the skeletal structure in a living organism. Each armature consists of a series of bones. Every bone features a head and a tail, and you can parent it to other bones to establish a hierarchy. This means you can control and manipulate each bone individually. When you move or rotate each one, it can deform the mesh attached to it. Check out the screenshot of this cat model (courtesy of Sketchfab), or kitty, below:
Note the long list of bone names indicated with the green bone icon. In an armature, each bone has a parent bone (except for the root bone). When you move a parent bone, all its child bones move with it. However, if you move a child bone, it does not affect the parent bone by default.
This process can be inverted with Inverse Kinematics or the process of reversing the direction of the chain manipulation. Check this simpler model with just a few bones where Inverse Kinematics has been applied:
Here, the child bone (pointiest part of the leg) is the instrument of manipulation. By grabbing this portion of the armature, we can move all bones connected with the child bone to make the model behave in a way that simulates real movement.
Besides bones, we should talk about skinning and weight painting. Skinning happens once the armature is complete, and involves binding the armature to the mesh of the 3D model. This allows the movements of the armature to influence the shape of the model.
Note the leg in the screenshot below. The highlighted line signifies the armature while the meat of the leg is the mesh. And, as the above video showcased, that mesh moves with the armature.
After skinning, you can use weight painting to control how much each bone influences the model. This was not used in any of these examples, but weight painting can go a long way in allowing precise control over the mesh deformation and realistic movement.
But how do we make the model move? Let’s start with rigging.
Character Rigging
Character rigging is like creating puppet strings for a 3D model. We can animate the model by manipulating what it is attached to. In the above video, the leg moved in adherence to a path. This was done by adding a constraint for the leg, which, in the video above and screenshot below, is represented by the black circle underneath the leg.
By telling the model to follow the path of the circle, we as animators are saying, “This is your range of motion. Don’t go outside of this circle.” The circle provides the constraint for the model’s leg movement, which makes it far more realistic and gives us as animators, lots of control over the model’s actions.
This step is crucial for 3D animations. It allows for setting restrictions on movement to the environment in which the model lives and gives the animator a high level of control over a character’s movements—simple or complex. This degree of control is particularly important when adding models to AR applications.
Keyframes
Remember kitty? Kitty is animated, but stays in one location. With keyframes, we can change that. Keyframes are markers of change at a particular point in time during an animation. They store information about an object’s properties at a certain frame. This could include the object’s position, rotation, scale, and other properties.
Take a look at the screenshot below:
Involved, isn’t it? I’m going to gloss over a lot of the finer details to point out that in the Dope Sheet, I’ve duplicated Kitty’s movements over a certain number of frames in order to simulate a longer walk-cycle. But doing so only makes Kitty’s in-place walk longer. It doesn’t move Kitty in a realistic way.
By inserting a keyframe at frame 0, moving Kitty along the y-axis, and inserting another keyframe at 100, we can finally make the model’s movements seem real and allow for more interaction.
This is another great feature of Blender, and other creation suites. Once you’ve created keyframes, Blender will automatically interpolate the changes between them. This means that if you create one keyframe where an object is at the left side of the screen and another where it’s at the right, Blender will create the animation of the object moving across the screen.
Last frame, end of motion
As I found when working on staging models in an AR app, understanding the basics of armatures, rigging, and keyframes is essential to making an AR scene come to life. These features allow an animator to control just how real their models appear.
Tutorial
Leg is part of a tutorial by an amazing Blender maker, Polyfjord. Check it out.