Something that happens quite often to me is that I have a finished character with merged geografts, and then realize that I want to add some more morphs to it. This cannot be done directly, because by merging geografts the vertex numbers change, and it is no longer possible to add morphs. A long time ago Engetudouiti came up with a work-around: reload the body and geograft, add morphs to the reloaded meshes, and then transfer the shapekeys to the character mesh. The problem is that morph transfer is painfully slow, because it uses the data transfer modifier many times. So I came up with some improvements which makes morph transfer much faster, although they do not work in all cases.
The first step is to delete the reloaded armature, and reparent the body and geograft meshes to the original armature. Parenting is necessary to create drivers for the morphs. It is also needed if we want to load the standard morphs (face units, expressions and visemes), because the importer decides which type of character it is dealing with by looking at the children's fingerprints. (The fingerprint of a mesh is the number of vertices, edges, and faces, and is a reasonably safe way to identify the character). The merged mesh does not have a known fingerprint but the reloaded body has, so standard morphs can imported.
However, if the morphs involve shapekeys, these must be transferred to the merged mesh using the Transfer JCMs or Transfer Other Shapekeys buttons. With the source mesh (which we transfer from) active and the target mesh or meshes (which we transfer to) selected, press Transfer Other Shapekeys.
At the top of the pop-up dialog there is a new option which determines the transfer method. It can take on four different values:
- General: This is the old transfer method using the data transfer modifier. It is very slow but works well in general if you have the patience.
- Nearest Vertex: Transfer shapekeys from the nearest vertex on the source mesh. This usually works well to transfer shapekeys to clothes and is the default. Computing the nearest vertex involves a slow step because a matrix of distances between all vertex pairs is computed, but this step is only done once for each target mesh, and once it is done the actual morph transfer is fast. Moreover, this matrix is calculated with Numpy which is much faster than pure Python.
- Body: Only transfer between the first vertices, until a vertex with changed location is encountered. This works for shapekeys on the body that do not involve the geograft, because the merged vertices have higher vertex number than the original ones. This method is very fast when it works.
- Geograft: Transfer shapekeys to the nearest vertex of the target mesh. Note the difference to the Nearest Vertex method. There each target vertex is paired with a source vertex, here each source vertex is paired with a target vertex, and nothing is transferred to unpaired target vertices. Use this to transfer shapekeys from the geograft to the merged mesh. Performance is the same as for the Nearest Vertex Method.
Corrective morphs are usually not by themselves so important for clothes, except for very tight-fitting ones. The main reason to transfer morphs is to keep the clothes on top of the skin, to avoid that skin pokes through. Alessandro Padovani pointed out that there is an alternative method to achieve this, which circumvents the need to transfer morphs altogether: the shrinkwrap modifier. The button Add Shrinkwrap adds a shrinkwrap modifier to the selected meshes, keeping it above the active mesh. This button was already available in the Visibility section, but is now available next to the transfer morphs buttons as an alternative.