Page 2: Deformation Approaches

Spring 2026 Sample Solution

The idea of a deformation-based approach is that we define a complex transformation that applies to all of the points of the mesh, and use the control of the transformation to move the mesh.

Another way to think about it: we put the points of our mesh inside of a stretchy block of clear jello. And then we move the mesh by pulling the jello around. There are different ways to control the jello.

On this page, I will show some 2D demos so you can get an idea of how the various methods work in a simple case. For each, I have only given a simple version (but I will explain how these methods can be improved).

For all of the demos, you can switch the character. For the first four, there is one switch. For the cage demo, the switch is inside the demo.

Linear Transformation

You can think about an affine transformation (rotate, translate, scale) as a simple form of deformation. Here, we control the affine transformation by computing it from the positions of the 3 points of the quadrilateral drawn around the character. Since the affine transformation has 3 parameters per dimension, we can only control three points.

But notice how the quadrilateral (it starts out as a rectangle, but as you move points it can become a parallelogram) is like the block of jello.

In 3D (with three.js), the affine transformation is the main form of deformation.

Bilinear Demo

This is a slightly more flexible deformation that allows all 4 points of the containing quadrilateral.

While this is OK for moving the character around, we can’t adjust parts of it separately.

Bicubic 5x5 Demo

In this demo, we’ve made the block of jello bendier. We put a grid of points (25 of them) that can pull it around. The terms grid warp or free-form deformation (FFD) are sometimes used. To me, these terms mean that we have a grid of control points, although sometimes these terms refer to specific mathematical ways of determining how the object moves based on the control points.

This demo uses a very simple kind of spline (cubic hermite splines - the 2D version of what we learned about in the Curves Workbook), which does not behave as nicely as “better” splines (often Bezier splines are used).

But the main problem is the grid: you have a lot of control, but you don’t necessarily get the control you want. For example, you need to move a lot of points to move the head, but it’s very difficult to move the arms individually.

The problem is that the grid is not adapted to the geometry of the object being moved.

Standard B-spline FFD 5x5 Demo

This is a second 5x5 grid warp demo with the same control layout, but using a more standard free-form deformation scheme: uniform cubic B-splines. This generally gives smoother and more predictable behavior than the simple Hermite variant above.

Cage Deformation Demo

The best kind of deformation control for animation is to adapt the controls around the object. Effectively, we mold the block of jello to surround the object we want to control. This is called a cage because it encloses the object. In 2D, the cage is a polygon around the object. In 3D, it’s a polyhedron (or a simple mesh).

In order to get control of individual pieces (like the limbs), we need to make the cage concave. Notice in this demo how I have tried to keep the arms/legs separate (with the Octopus, I could not, so I paired some of the legs).

Finding ways for the movement of the cage to correctly influence what is inside (not just what is close) is complicated. This demo uses a simple version of cage math (called Mean Value Coordinates) that doesn’t do a good job. The Octopus is a really hard case for cages since it has pieces that have small gaps between them, so it is hard to put a cage around it, and hard to prevent the “influence” from jumping over the gaps.

Cages are a popular method for doing “high-end” animation. They were made popular by Pixar, where they invented a method that vastly improves the ability to avoid having influence “jump the gap.” More recently, there are newer techniques that map cage changes to movements of the object inside of it.

Summary

Deformation-based approaches are a common technique for animating meshes for “high-end” (movies). They are less common for interactive graphics, and they are not built into three.js. On the next pages, we’ll see some methods that are easier to use within three.js.

Next: Page  3 - Skinning