Node Mesh Reshape - anticto/Mutable-Documentation GitHub Wiki
⚠️EXPERIMENTAL⚠️
Function
The mesh reshape operation allows to drive mesh deformation using other meshes. Base shape and Target shape meshes define a deformation that will be transferred to the Base mesh. Base and Target shape must have the same topology, e.i., same number of faces with the same order. Although not needed, usually a morph of the base shape is used as target to guarantee this property.
Vertices in the Base Mesh are bind to faces in the Base Shape by proximity then using the binding information the Base mesh vertices are re-targeted to the Target Shape correspondent faces.
The node also allows to apply a similar process to bone joins and physics bodies. Bone joins use a method similar to vertices. The joint position is bind to the base shape and then re-targeted to the target shape. Physics bodies are bind using a set of points representative of the body shape and then reconstructed from the re-targeted positions of these points.
Use case
One of the use cases for the node is to fit the same garment mesh to multiple body constitutions. For example, a collection of clothing pieces (shirts, pants, jackets, etc...) that needs to fit a large variety of body shapes. The node allows to author the garments meshes for a single body constitution and reuse it for all other body shapes.
Options
In the node properties panel a selection of what will affect can be specified. Vertices, skeleton bones and physics bodies. In addition, a selection of which bones and physics bodies to deform can be chosen. Here physics bodies are selected by the bone name to which they are attached.
Mesh post-process.
Sometimes the output meshes may loose some quality in the re-targeting process, options to apply laplacian smoothing and recompute normals can be enabled to try to improve the results.
Vertex color usage
The mesh vertex colors can be used to change some of the behavior of the node per vertex. If a channel is set to Mask Weight its value will be used to weight the influence of the effect for a given vertex. Only one channel is allowed to have this option enabled.
Another use for vertex color is the definition of rigid vertex clusters ids.
Rigid clusters with the same id are deformed applying the same re-targeting
transformation, the one computed from the centroid, to all vertices in the cluster.
In that case vertices that are not part of a rigid cluster must be set to the highest
value possible, if all channels are used for this purpose then the color would be white.
Notice that more than one channel can be specified for this purpose, and the combination
of the selected channel values will determine the cluster id.
Output
Mesh: Base mesh with the reshape defined by Base Shape and Target Shape applied. (Note) Only skeleton or physics may be modified if Reshape Vertices is not selected.