Page 1: Animation in the Pipeline

Spring 2026 Sample Solution

Part of making Graphics Town is bringing it to life: you must make things move. This is animation.

Unfortunately, we don’t have much time to talk about animation. But there are some things that are extremely useful for making animation in things like your Graphics Town assignment, so I wanted to mention them here.

We’ll focus on one thing: how do we make meshes move?

We will talk about animating meshes. The term “mesh animation” is sometimes used to mean what I will describe as “vertex animation” in a bit. Short story: we need to avoid vertex animation, and find other approaches that allow us to move meshes without changing the vertices.

In the previous workbook when we talked about graphics performance, we emphasized the importance of building meshes at the beginning and then sending them to the graphics hardware once. That way, the graphics hardware can just process the list of information very efficiently.

What not to do: Vertex Animation

To explain the problem, consider what happens if we try to move the vertices within a mesh every frame in order to animate the mesh. On every frame we need to:

  1. Figure out how to move all the vertices. (describe the motion)
  2. Move the vertices (and there might be a lot of them).
  3. Recompute the normals (and potentially other quantities that depend on the relationships between the vertices).
  4. Make sure all the data is in the special memory formats the graphics hardware needs.
  5. Transfer the memory of the mesh to the graphics hardware.
  6. Wait for that transfer to complete (clear the caches).
  7. Process the triangles on the graphics hardware.

The techniques we want to use will simplify all of this: they will make it easy/convenient to describe the motion concisely (1), and then do everything else on the graphics card.

A Simple Example: Transformations

To convince you we can solve all of these problems, let’s consider a strategy you already know: transformations. The way we’ve been moving objects around (in 3D) so far has been to keep the mesh constant, but to change the transformation to make it move. Notice how this strategy meets our needs of processing all of the steps on the graphics card (and making the specification easier).

From the list above:

  1. We can describe the motion of the object in terms of a simple transformation (either the whole matrix, or rotate/translate/scale). It doesn’t matter how complicated the object is: we can use a simple description.
  2. We don’t need to move the vertices: the graphics hardware will transform them in the vertex shader.
  3. We don’t need to recompute the normals: the graphics hardware can transform them (using the inverse-transpose of the transformation matrix).
  4. All we need to do is send the graphics hardware the transformation matrix.
  5. A matrix is small, and easy to transmit.
  6. It’s a uniform variable, and there isn’t much waiting for it.

So, magic - we get easy authoring, and good performance. No recomputing the mesh on the CPU side - the graphics hardware takes care of the work.

The problem, of course, is that the transformations we’ve learned about are quite limited: the linear transformations we’ve been using so far can do lots of things, but not everything we might want.

So, the question: how do we get the efficiency and ease of specification of transformations, with more expressiveness (the ability to perform a wider range of techniques)?

The Strategies

There are a few key strategies for animating meshes:

  1. Deformations - we can use more complex transformations than linear transformations. These methods are often called deformations because they change the shape of the object. The two most important kinds of deformations in modern animation are grid-based deformations and cage-based deformations.
  2. Skinning or transformation blending - we can use methods where a mesh is controlled by a set of different simple linear transformations, so any given vertex is manipulated by a combination of matrices.
  3. Morphing or shape blending - where we have multiple versions of a mesh, and combine them to create the final mesh. These different versions of the mesh are called morph targets or blend shapes.

We will dive into examples of these over the next pages.

Deformation-based approaches are very interesting mathematically, but they are not well-supported in Three.js (you basically need to implement them from scratch). Skinning and morphing are built into Three.js and very easy to try.

All of these strategies keep the mesh constant. They add extra information to the vertices so that the graphics hardware can move them as needed. They use a concise description (a small set of numbers) to describe how things move on each frame.

  • With a deformation each vertex gets a coordinate that specifies which part of the transformation applies to it. The transformation is usually specified by the movement of a small set of points (for example a grid or a “cage” polygon/polyhedron around the mesh).
  • With skinning each vertex gets a set of weights that specify which matrices (transformations) apply to it, and how much each one should be applied.
  • With morphing each vertex gets a set of alternate positions (and other attributes such as normals) from the other targets.

We can now look at each of these strategies more closely.

Next: Page  2 - Deformation Approaches