Skip to content

Shape keys

Overview

The previous chapter dealt with flipbook animation, which is a general method for animating meshes over time. It does take a bit of work to set up, and in some cases you might just have a single mesh with fixed topology of which only the vertex positions change over time.

For this case Shape keys can be used, either to morph one mesh into another over time, or to blend multiple meshes together into one (static) result. This can be used, for example, to show the time-evolution of an object, or the highlight differences between two meshes. Although this is a fairly specific use case, shape keys aren't too difficult too understand and use, hence we describe them in this section.

There are some limitations, though, to using shape keys:

  • The two meshes must have the same number of vertices
  • The two meshes should have the same topology (i.e. the way in which the vertices are connected to form polygons). If the topology doesn't match then strange results can occur during morphing between one set of vertices and another.

The above are fairly annoying limitations, but there is currently no easy way around it in Blender.

💻 Poor Bunny

  1. Load bunny_shape_keys.blend
  2. This scene contains the Stanford Bunny and a completely flattened version of the Bunny
  3. Verify that these meshes have the same number of vertices. Also do a visual comparison in wireframe mode (Z > Wireframe)

We'll now add some shape keys:

  1. Select the healthy (non-flattened) Bunny.
  2. Under Shape Keys in the Mesh properties, add a shape key using the + button. The new shape keys will be called Basis.
  3. Add a second shape key. This will be called Key 1 and have a default influence Value of 0.000.
  4. Select the Key 1 shape key and enter mesh edit mode in the 3D view with TAB and make sure you're in vertex mode by pressing 1
  5. Select parts of the Bunny mesh and transform them as you like. The changes should be clearly visible.
  6. Exit mesh edit mode with TAB. You should notice that the mesh returns to its normal shape.
  7. Change the influence Value of Key 1 to see what happens to the resulting mesh. You can either click on it and enter a number, or click and drag the value.

Let's add another shape key:

  1. Add a third shape key, it will be called Key 2.
  2. Select Key 2 and apply a second set of mesh changes in edit mode. Note that when you enter edit mode the mesh changes to the Basis data, and not the Key 1 data.
  3. Once again exit edit mode.
  4. Play around with the influence values of both Key ? shape keys, as well as the checkboxes next to the influence values.

Let's check the difference between relative and absolute shape keys:

  1. Uncheck the Relative checkbox to switch to absolute shape keys. Notice that the influence values have now disappeared.
  2. Change the Evaluation Time value to understand how the morphing of the meshes is done now (notice the values right of the shape keys names in the list).

We can use a second mesh to define a shape key:

  1. Delete shape keys Key 1 and Key 2 using the - button and change back to relative shape keys by checking the Relative checkbox.
  2. Select the flattened mesh and the Shift-click the Bunny mesh to add it to the selection and make it the active object.
  3. Open the shape key menu using the downward arrow below the + and - buttons. Select Join as Shapes.
  4. There should now be a new shape key called flattened mesh. Note that this shape key is only set on the bunny mesh, not on the flattened mesh mesh. You can verify this by selecting either mesh and checking which shape keys they have.
  5. Vary the influence of the shape key called flattened mesh to see the Bunny melt.
  6. Delete the flattened mesh object in the Outliner. Does the shape key that morphs the Bunny to its melted flat shape still work?

Look closer at the behaviour of the mesh morphing:

  1. Try to reason why the head of the Bunny is the last part to melt.
  2. Zoom in a bit to see if you can spot the twisting motion that mesh makes as it melts.
  3. Switch to edit mode to try to transform the mesh in the melted shape key in such as way as to minimize the twist. Or toy around with other mesh transforms to see what morphs come out.

Last update: 20 March 2024 15:19:16