Good Practice

Follow good practice to get the best behaviour out of the solver. This isn’t about avoiding bugs or quirks, but about using the solver the way it was designed for best results.

Use closed, water-tight, intersection-free, manifold meshes for your bones and tissues.
The software will work with lower-quality meshes, but the further the input mesh is from this standard, the less reliable, robust, and predictable the results will be. Some features are automatically disabled when the input meshes do not meet these standards.

Changes to mesh geometry after it has been added to the solver require special care.
Changes to tissue or cloth meshes (after adding them to the solver) are completely ignored by the solver, unless you follow one of the approaches listed below. Changes to bone meshes, however, take immediate effect, even if done after the bone was added to the solver. In both cases, changes to mesh topology disrupt the painted maps controlling attachments, materials, etc. These maps are only updated in the default Maya fashion. If you would like to change the geometry of a tissue or cloth after you have already added it to the solver, you have three options:

1. The first option is to first remove the tissue or cloth, using Ziva➞Remove: Tissue, Cloth or Bone. This strips away all the Ziva information, leaving a clean Maya mesh. Then, change the mesh geometry, and then add it back to the solver as a tissue or cloth. This approach destroys any painted Ziva maps, such as attachment maps or material maps.

2. The second approach, which attempts to preserve the painted maps as much as possible, is to select the tissue or cloth for which geometry needs to be updated, and a new geometry (a Maya mesh) for it, then issue Ziva➞Replace Simulation Component: Tissue, Cloth or Bone.

3. The third approach is to use our zBuilder tool. In order to use this approach, you first author the Ziva scene, then save the Ziva rig to a .zBuilder file. You then load a clean scene that only has geometry (no Ziva rig), potentially with geometry modifications. Then, you can use zBuilder to automatically apply the Ziva rig from the .zBuilder file onto your geometry. The end result is a Maya scene with your (modified) geometry and the Ziva rig applied to it. Note that in case the geometry changed (including changes to mesh connectivity), zBuilder will interpolate Ziva maps onto your new mesh.

Use the largest tetrahedra that will capture the deformations of interest.
The tetrahedra can often be much larger than the triangles in the surface mesh. Smaller tetrahedra invert more easily, are less stable, require smaller timesteps, take more memory, and more time to solve. Remember that you can use adaptive refinement to only make tets smaller in the specific areas where you need them to be. See the section on Tetrahedal Meshes for more details.

good_practice1 image

Above: The resolution of the above tet mesh captures the desired deformation without unnecessary resolution.

Use tetrahedra no smaller than the triangles in the tissue’s surface mesh.
The simulation operates at the resolution of the tetrahedral mesh. If the tetrahedra are smaller than the triangles, then it is doing more work than will be visible. This is wasteful and the solver is not designed to work in this regime. Attachments will behave oddly in this scenario and the surface dynamics will be a poor representation of the solver’s internal state.

good_practice2 image

Above: The resolution of the tet mesh for the sphere on the right is too high, given the resolution of the embedded surface.

Use a simple mesh to create the tissue, and embed a different high-resolution hero mesh for output.
The mesh used to create the tissue only needs enough detail to define the tissue shape and its surface for attachments. It can probably be coarser than the mesh used for output. An arbitrary output mesh can be separately embedded into the tissue at any time. This does not increase the solver time (except to geometrically deform the high-resolution mesh, which is minor).

good_practice3 image

Above: The fascia surface above (purple) is a high-resolution mesh that is embedded into a tissue. This tissue has a coarse tet mesh (black), computed from a much lower-resolution tissue surface mesh (green).