From BlenderWiki

Jump to: navigation, search
Note: This is an archived version of the Blender Developer Wiki. The current and active wiki is available on wiki.blender.org.

Wrinkle Maps

This is a technique for creating believable wrinkles and folds using shape keys or textures.

The established method used for animating character clothing and similar cases is based on weighing shape keys with drivers. While creating shape keys is straightforward task for artists, setting up a bone and driver system for controlling each individual shape influence is a major hassle. For a typical character there has to be a set of measurement bones, control bones, driver(s) and shape key weights all for every individual wrinkle effect.

The wrinkle map method is based on measuring surface deformation and using this information to apply a local modulation factor automatically. This creates a vertex group that defines influence of each wrinkle shape rather than a global influence factor. The method is described in detail in the paper "Animating Wrinkles on Clothes" [1] [2]. While the paper describes deformation from detail texture maps on coarse geometry, the implementation of shape key deformation is more practical for typical Blender character animation workflows.

in progress Inprogress50.jpg 30%
 Texture-based wrinkle maps are going to be supported later.

Example: Simple wrinkles on a flat plane

1. Base Mesh with Armature

Wrinkle demo1 01base.png

We start out with a grid mesh. A couple of simple deformation bones can be used to distort the grid.

2. Shape Keys for Modeling Wrinkles

Wrinkle demo1 02shapekey.png

Adding wrinkles with shape keys is a typical character modeling/rigging step. The shape key should define the most extreme possible wrinkling stage. In our example we just add a bunch of regular ridges to the mesh.

3. Declare Wrinkle Map

Wrinkle demo1 03vgroup.png

To use the shape key as a wrinkle map we have to:

  1. Set the overall weight to 1. A smaller weight can be used to tune down the overall wrinkle influence, but full influence is preferrable.
  2. Add a vertex group to allow localized influence of the shape key. This vertex group can be left empty.
  3. Tick the "Use Wrinkle Map" option. This will tell the wrinkle modifier to calculate displacement from the shape key (see next step).

4. Add a Wrinkle Modifier

Wrinkle demo1 04modifier.png

The modifier generates the actual displacement based on surface deformation. Additionally it can store the vertex group influence for later use in modifiers, e.g. for adding small scale noise after subdivision.

Wrinkle demo1 05coefficients.png

In order to generate correct shape key influence, the "wrinkle coefficients" need to be calculated once after the shape key has been defined. These coefficients should be recalculated whenever topology changes or the shape key is tweaked.

to do
 Coefficient recalculation could be done automatically with future depsgraph support. Currently the depsgraph support for shape key edits is too shaky to rely on it.
Wrinkle demo1 06deform1.png Wrinkle demo1 06deform2.png Wrinkle demo1 06deform3.png

Now the wrinkle modifier applies the shape key locally in places where the surface is compressed. It attempts to compensate for changes in surface area by adding more of the shape key, such that the surface area stays the same. This simulates typical behavior of textiles and skin, where compression tends to bend and shear the surface until it reaches a force equilibrium.

[1] Hadap, Sunil, et al. "Animating wrinkles on clothes." Proceedings of the conference on Visualization'99: celebrating ten years. IEEE Computer Society Press, 1999.

[2] http://www.miralab.ch/bibliography/47.pdf