From BlenderWiki

Jump to: navigation, search

MeshDeform Modifier

Mode: All modes

Panel: Modifiers (Editing context, F9)

Description

Example of a deform mesh cage – deforming a sphere.

The MeshDeform modifier allows an arbitrary closed mesh (of any closed shape, not just the cuboid shape of a Lattice modifier) to act as a deformation cage around another mesh.

To the right is an example of a deformed object (shaded in gray) inside the confines of a deform mesh cage (shown in black wireframe). The deform mesh cage can be any shape of mesh but it must be closed. In the example to the right it is just an UVsphere that has been altered using proportional editing, as a result the deformed object alters its shape in response. It has had a MeshDeform modifier added to it and has been told to use the deform mesh cage as the mesh it will use to deform itself.

Options

MeshDeform modifier panel.

The MeshDeform modifier is reasonably easy to use but it can be very slow to do the calculations it needs, to properly map the deform mesh cage to the deformed object.

Ob
The Ob text field is used to indicate which object the MeshDeform modifier should use for its deform mesh cage.
VGroup
The VGroup text field is used to indicate that only the vertices in the specified vertex group will be affected by the deform mesh cage.
Inv
Inverts the influence set by the vertex group defined in previous setting (i.e. reverts the weight values of this group).
Bind
The Bind button is what tells the MeshDeform modifier to actually link the deform mesh cage to the deformed object, so that altering the shape of the deform mesh cage actually alters the shape of the deformed object.
Be aware that depending on the settings of the MeshDeform modifier and complexity of the deform mesh cage and/or deformed object, it can take a long time for this operation to complete. This can result in Blender not responding to user’s actions until it has completed, it is even possible that Blender will run out of memory and crash. As Blender progresses through this operation, you should see its progress bar (the colored bar, in the header of the User Preferences window, usually in top-right corner) progress and change of color.
Unbind
When a deformed object has been associated to a deform mesh cage, it can later be disassociated by selecting the Unbind button which replaced the Bind one.
When Unbind is clicked, the deform mesh cage will keep its current shape, it will not reset itself back to its original start shape. If you need its original shape, you will have to save a copy of it before you alter it. The deformed object will however reset back to its original shape that it had before it was binded to the deform mesh cage.
Precision
The Precision numeric slider field controls that accuracy with which the deform mesh cage alters the deformed object, when the points on the cage are moved.
The range of values for the Precision field can range from 2 to 10, the default being 5. Raising this value higher can greatly increase the time it takes the MeshDeform modifier to complete its binding calculations, but it will get more accurate cage mapping to the deformed object. This rise in calculation time can make Blender stop responding until it has calculated what it needs to. As well as making Blender not respond, raising the Precision value high and then trying to Bind on a very complex deform mesh cage and/or deformed object can use large amounts of memory and in extreme cases crash Blender. To be safe, save your blend file before proceeding!
This setting is unavailable once a cage is binded.
Dynamic
The Dynamic button indicates to the MeshDeform modifier that it should also take into account deformations and changes to the underlying deformed object which were not a direct result of deform mesh cage alteration.
With Dynamic button activated, other mesh altering features (such as other modifiers and shape keys) are taken into account when binding a deform mesh cage to the deformed object, increasing deformation quality. It is deactivated by default to save memory and processing time when binding…
As Precision, this setting is unavailable once a cage is binded.


Other Characteristics of MeshDeform Modifier

There are some characteristics of the MeshDeform modifier which are not directly visible within its control panel. This section list some of those issues and features.

Mode of Operation

Alterations made to the deform mesh cage will only be reflected in the deformed object when the cage is in Edit mode, when in Object mode the cage can be scaled and distorted but it will not effect the deformed object.

Deform Mesh Cage Location after Binding

While a deform mesh cage is being binded to a deformed object, the cage must surround all the parts of the deformed object you wish to be affected by the cage. Once the deform mesh cage has been binded it can be moved away from the deformed object in Object mode. When you then switch the deform mesh cage back to Edit mode and alter its shape, it will alter the deformed object even when it is not directly surrounding it.

Distance from Deform Mesh Cage & Deformed Object

Distance between the deform mesh cage and the object to be deformed has an influence on the amount of change imparted to the deformed object when the cage is altered (when in Edit mode). When the deform mesh cage is further away from deformed object, then the amount of change imparted to the later is less and less local to a specific area of the deformed object. When the cage is closer to the deformed object, the amount of influence upon the later is greater and more local to a specific area on the deformed object.

Un-deformed sphere.
Small distance between a deform mesh cage & a deformed object.
Large distance between a deform mesh cage & a deformed object.
Animation showing the difference between each sphere deform in a deform mesh cage (click to see animation).

Above are examples of the effect of different deform mesh cage distances from a deformed object. The top left image shows a normal un-deformed UVsphere. The top right image shows the same UVsphere but with a deform mesh cage which is very close to the deformed object, and as a result there is quiet large deformation in the deformed object. The bottom left image shows the deformation of a deformed object when the deform mesh cage is further away. It can be seen that the deformed object alteration is much more muted, even though the vertex that has been moved in the deform mesh cage has moved by the same amount. The bottom right image shows an animated version of the other three images showing the change in the deformed object with different deform mesh cage distances.

Multires support

Blender 2.49 can now handle both MeshDeform modifier and Multires feature – with the limitation that MeshDeform will only work when the multires level it was binded with is active. This means that when you are not working on the multires level you used during binding, the modifier (and hence any cage modification) will have no effect on the deformed object. Of course, you can add as much MeshDeform modifiers as you have multires levels.

Note however that the MeshDeform modifier does not seem to take advantage of increased level of details produced by higher multires levels…

Interior Control

Besides the cage itself, you can have more faces within the cage, which can form a “sub-mesh” loose or closed, and allowing an extra control on some areas of the deformed object. These sub-meshes might be linked or not to the main cage, intersect it, etc. For example, you could use a big cage deforming a whole face (to get “cartoon” effects), with two smaller sub-meshes around the eyes, to better control them.

Non-deformed Sphere, with a deforming cage including a small sub-mesh.
Deformed Sphere in two different directions by the two sub-meshes of the cage.

In the example above, much more modest, we are back with our two spheres, the small one deformed by the big one. But this time, a small open sub-mesh (a slightly concave plane) has been added to the deform mesh cage, closer from the deformed object (left picture). In the right picture, the sphere-cage’s vertex has been moved towards the center, causing a quite general recess of the deformed sphere, since the cage is originally quite far away from it. However, the area of the deformed object controlled by the little added sub-mesh (of which the central vertex has been moved in the opposite direction) comes out as a little central bump.

MeshDeform Characteristics
The MeshDeform modifier works by taking into account bounding faces of the cage to the deformed mesh when doing it’s calculations to bind the cage to the deformed object, influencing the implicit object (e.g. vertices and edges implicitly), using their boundary faces to do it’s bind calculations. (Info from Greylica)


Implementation

The MeshDeform modifier implementation method (in Blender 2.46) is currently “Harmonic Coordinates (for Character Articulation)” Volume Deformation Method developed by Pushkar Joshi, Mark Meyer, Tony DeRose, Brian Green and Tom Sanocki of Pixar Animation Studios. This method was presented at the Siggraph 2007 conference. It has many advantages in controlling the deformations of meshes.

A copy of the implementation PDF document can be downloaded at graphics.pixar.com.

A video demonstrating some of the important features of the implementation can be viewed below:


Examples

See Also