BlendWrapping is an example-based wrapping method that can handle extreme mesh deformations. It’s more robust and requires much fewer control points than standard Wrapping. This method uses a set of pre-existing wrapped mesh references provided by a user to analyze how different parts of the base mesh can be deformed, and thus, increase wrapping quality.
A standard Wrapping assumes that a base mesh can only be deformed in a uniform way. While this assumption works in many cases, it fails for areas like eyelids or lips where a surface can be significantly stretched in one direction but not in the other.
BlendWrapping overcomes this limitation. It can be used for different types of objects, but the most common application is facial expressions (FACs).
Suppose we need to wrap facial expressions of tens of different characters. Let’s assume that we have already wrapped and carefully cleaned up a set of facial expressions for one character. With BlendWrapping node you drastically simplify the wrapping of other characters by re-using information from previously made characters, even though the characters are very different.
BlendWrapping node looks at user-provided references to analyze how different parts of a face can be deformed. For example, by looking at the references it understands that eyelids can be stretched in the vertical direction much more than in the horizontal, and it doesn’t penalize vertical stretching during wrapping.
As a result BlendWrapping node reduces the need for cleanup to a minimum.
BlendWrapping is much more robust than standard Wrapping and produces much fewer artifacts, but because of its nature, it can’t fit the base mesh to the target surface as tight as Wrapping. It is recommended to use Wrapping or OpticalFlowWrapping after BlendWrapping.
BlendWrapping only works with models on a centimeter scale!
If the input models use a different scale, it will lead to poor wrapping quality and speed.
An easy way to check if a model using centimeter scale is to compare it with the base meshes from the Wrap gallery.
As already mentioned, BlendWrapping needs a set of examples provided by a user called reference meshes. All reference meshes should have the same topology as a the base mesh.
Reference meshes include:
- Neutral Reference
is a neutral facial expression of a reference character. If this reference mesh has a different orientation or scale than the base mesh, you can turn on the Use Rigid Alignment parameter to automatically align it with the base mesh.
- Blendshape References
is a set of blendshapes (FACs) of your reference character.
All Blendshape References should be aligned (stabilized) to the Neutral Reference and have the same scale.
It’s not mandatory that Blendshape References are decomposed by muscle groups as you would do for rigging. I.e. if Blendshape References contain an expression with both-eyes-closed, then there is no need to decompose it into left-eye-closed and right-eye-closed. The algorithm will still be able to wrap an expression with only one eye closed.
BlendWrapping needs to retarget the blendshape deltas from reference meshes to the base mesh.
If the Use Retargeting option is on, the BlendWrapping node will do it for you automatically.
If Use Retargeting is off, you need to extract blendshape deltas between Neutral Reference and Blendshape References and apply them to the base mesh using the Blendshapes node.
Reference meshes can have a different orientation and scale from the base mesh.
If the Use Rigid Alignment option is on, the BlendWrapping node will perform the rigid alignment automatically using the set of points plugged into the alignment points input.
If Use Rigid Alignment is off, you need to rigidly align the Neutral Reference by orientation and scale to the base mesh. You also need to transform the Blendshape References with the same rigid transformation as was applied to the Neutral Reference.
Manual rigid alignment and retargeting may be needed if you want to use more than one character as reference meshes. In this case, you can extract blendshape deltas from each character and apply them to a single generic neutral mesh. Then you can provide the generic neutral mesh as a Neutral Reference and the blendshape deltas applied to it as Blendshape References.
- floating geometry
GeometryGeometry to be deformed (a base mesh)
- fixed geometry
GeometryTarget geometry to fit to
- point correspondences
PointCorrespondences(optional) A set of point correspondences between the floating and the fixed geometry
- excluded floating polygons
PolygonSelection(optional) A set of polygons that will be excluded from the wrapping process, i.e they will not try to fit to the fixed geometry but will be deformed as rigidly as possible to match the rest of the mesh.
- alignment points
PointsOnTriangleA set of points selected on either the floating geometry or the Neutral Reference (since they have the same topology).
If Use Rigid Alignment is on, the points will be used to rigidly align the Neutral Reference to the floating geometry by orientation and scale. Then the same transformation will be applied to each Blendshape Reference.
- Auto Compute
if set, the node will be recomputed each time a parameter or input data is changed
if Auto Compute is off, starts the wrapping process in the preview window
- Neutral Reference
the file name of Neutral Reference mesh
- Blendshape References
a list of file names of Blendshape References
- Num Components
defines how much information will be taken from the reference meshes. A larger value leads to better model flexibility but comes with a cost in terms of robustness and speed the better the wrapping quality, but at the same time, the bigger the computation time
this weight defines how rigid the base mesh is
this weight defines the strength of fitting of the base mesh to the target surface. Increasing it will lead to tighter fitting but can mesh smoothness can suffer
- Control Points Weight
defines the influence of control points on the wrapping process. Higher values result in the tighter fitting of control points to their targets
- ICP Iterations
number of Iterative Closest Point iterations
- Coarse to Fine Iterations
number of coarse-to-fine iterations. To explain in simple terms, on each iteration the algorithm breaks the base mesh into pieces and tries to fit each piece to the target geometry. With each new iteration, it breaks the base mesh into smaller pieces producing a tighter fitting
- Sampling Radius Initial
the size of base mesh pieces during the first coarse-to-fine iteration. Defined in centimeters
- Sampling Radius Final
the size of base mesh pieces during the last coarse-to-fine iteration. Defined in centimeters
- Use Rigid Alignment
if set, aligns the Neutral reference to the base mesh (floating geometry) by orientation and scale. It applies the same alignment transform to the Blendshape reference
- Use Retargeting
if set, for each Blendshape reference it computes vertex deltas from the Neutral Reference to the Blendshape reference and adds the deltas to the base mesh (floating geometry) producing a personalized set of blendshapes