Create a solver node. Multiple solvers can be present in a scene. Each tissue, cloth, bone, attachment, etc., resides in one solver. The different solvers are completely independent.
This is the same as executing ziva -s;
When there is only one solver in a scene, Ziva commands will always use that solver. However, if there is more than one solver in a scene, Ziva commands will attempt to choose a solver based on the following logic:
- Top priority is given to solver nodes that are selected directly. Selecting a solver’s cache node is equivalent to selecting the solver node.
- Next, solver nodes connected to selected simulation objects are considered.
- Finally, the Default Solver is chosen, which can be set with Set Default.
If the ambiguity between multiple solvers cannot be resolved, an error message is printed. Examples of unresolvable ambiguity include:
- Multiple solver nodes/caches in the selection.
- Simulation bodies from multiple solvers in the selection.
- No Default Solver has been set.
All solvers always simulate when pressing Play, regardless of the current selection and the default solver. If you don’t want a solver to simulate, you can disable it by setting its zSolverTransform.enable to off.
Return info about the selected solver or tissue. If there is only one solver in the scene, no selection is required.
This is the same as executing ziva -i;
Solver Info =============== Num Tissues: 51 Num Fiber Fields: 13 Num Bones: 195 Num Attachments: 330 Num Proxy Points: 21054 Num Tri Vertices: 74306 Num Tet Vertices: 10166 Num Tets: 27359 Tissue Info =============== Name : |pSphere1|pSphereShape1 Num Tri Vertices : 382 Num Tris : 760 Num Tet Vertices : 2400 Num Tets : 600
Selects the solver node that is affiliated with the currently selected simulation components (bone, tissue, cloth), or the default solver in the scene.
This is the same as executing ziva -sel;
See the notes here for more details about how a single unambiguous solver is determined if there are multiple solvers in the scene.
A related, but different, functionality can be achieved by executing the command zQuery -t zSolverTransform; . In the presence of multiple solvers, the zQuery command selects all solvers in the scene, whereas the Ziva.Select command selects a single solver, taking into account the current selection and default solver.
Sets the default solver to the selected solver, or the solver affiliated with the currently selected simulation component (bone, tissue, cloth or attachment).
This is the same as executing ziva -def;
The default solver is used for ziva commands whereby two or more solvers exist in the scene, and the specific solver was not selected. The default solver is useful in multi-solver workflows when adding (many) simulation bodies to a solver. In an interactive session, it makes the workflow more convenient, because one does not have to keep selecting the specific solver when addding the next simulation body to a solver.
See the notes here for more details about how Ziva chooses which solver to use for a given command.
Launch Scene Panel¶
Launches a new object-viewing panel that can be used to inspect the current Ziva setup.
The Ziva Scene Panel allows you to quickly browse a subset of the Ziva objects in your scene. The selected Ziva objects and their immediate connections are shown in an easy-to-navigate tree, allowing you to focus on specific parts of your scene. To display the full scene in the panel simply select the solver and launch it or hit refresh.
By selecting muscle or bone geometry and launching it will check all attachments to see what else is connected and add those to the tree view. By selecting an attachment it checks the source and destination and adds those. It does this so you have control over what is viewed to minimize amount of items you have to sort through.
Selecting an item in the panel selects the corresponding item in the Maya scene.
If you update the Maya scene, the panel is not automatically updated. You can update it by closing the Scene Panel and re-opening it via Ziva➞Launch Scene Panel. Another approach is to use View➞Refresh on the Scene Panel menu.
The Scene Panel can also be launched from python by the following:
import zUI.ui as ui myWin = ui.ZivaUi() myWin.run()
zAttachments right-click menu items:
- Paint by Proximity UI - Launches the dialog to paint attachment weight by proximity.
- Paint by Proximity .1 - .2 - Paints a map based on proximity presets of .1 - .2.
- Paint by Proximity .1 - 1.0 - Paints a map based on proximity presets of .1 - 1.0.
- Select source and target - Selects the source and target mesh in scene of given zAttachment.
zLineOfAction right-click menu items:
- Select Curve - Selects the curve associated with the given zLineOfAction node.
Add Simulation Component¶
Convert the selected maya mesh(es) into tissue(s), the term we use to describe elastic solids in our system.
This is the same as executing ziva -t;
If no solver exists in the session, one will be automatically created.
Convert the selected maya mesh(es) into cloth, the term we use to describe the elastic thin objects in our system.
This is the same as executing ziva -c;
If no solver exists in the session, one will be automatically created.
Convert the selected maya mesh(es) into bone(s), the term we use to describe externally animated Maya meshes in our system.
This is the same as executing ziva -b;
If no solver exists in the session, one will be automatically created.
Attach tissues/cloth to bones, or tissues/cloth to other tissues/cloth.
Exactly two simulation objects must be selected. The selection order is important; the first selected item’s vertices will be constrained to the second selected item. By default, all of the vertices of the first object will be constrained to the second object. However, if you select specific vertices on the first object before executing the command, only those vertices will be constrained.
After an attachment is created, you can change which vertices are constrained by painting attachment weights on the first object. You can also paint the attachment weights on the second object – this restricts the vertices of the first object to only be constrained to the painted region on the second object.
By default, attachments are fixed. After you create the attachment, you can change its type to sliding.
This is the same as executing ziva -a;
Constrain tissues/cloth to a (externally animated) bone, using an adjustable soft constraint. The bone’s geometry must topologically match the tissue or cloth.
This type of attachment can be used to add dynamics to an externally generated animation. For example, animate a Maya mesh using any technique and convert it into a bone. Then, duplicate that mesh on frame 1, convert the duplicate into a tissue, and then goal the tissue to the bone. The tissue will generally follow the bone, but will be enriched with secondary dynamics. Also, any “kinks” in the bone motion will be automatically corrected into a good-looking physically-based output.
One use case would be to add mesh relaxation and dynamics to a blendShape-driven face. Another one is if you want to use your own muscle system, but then want to use our system to add dynamics to your muscles.
Note that the goal bone will automatically have collisions disabled, since the only way it’s meant to interact with the scene is to act as a goal shape for the tissue or cloth.
This is the same as executing ziva -ga;
Add Tissue Property¶
This command adds an additional material layer to the selected tissue(s)/cloth by connecting an additional zMaterial node to it.
The newly added material is positioned on top of any previously created layers. Multiple material layers are blended together similar to how images are composited using an alpha channel, with the material’s painted map controlling the alpha value. For every point on the simulation body’s surface, the blended material stiffness will be alpha * top Material + (1-alpha) * previous Layers. Since the default alpha value for the new material layer is 1.0, this new zMaterial node will override the previous material layers until the weight map of the new material is painted so as to reveal them.
This is the same as executing ziva -m;
Add a zFiber node the the selected tissue(s), converting a regular tissue to a “muscle”.
Upon creation, the zFiber weights will need to be painted in order to direct the muscle fiber field. This is accomplished by first flooding the weights to 0.5, and then painting the values of 0.0 and 1.0 to the vertices that you’ve chosen as surface points that you would like the fibers to flow between. We refer to vertices with a value of 0.0 as an “in point” and those with a value of 1.0 as an “out point”. Any number of in and out points can be used to direct the fiber field direction. The painted fiber field is also used to determine the direction of anisotropy with anisotropic materials.
This is the same as executing ziva -f;
Given the selected muscle fiber (or tissue with a single fiber) and NURBS curve(s), create a Line-of-Action node to automatically excite the muscle fiber when the curves contract.
This is the same as executing ziva -loa;
Given a selected tissue and selected Maya mesh, set the tissue to use the mesh for calculating collisions in place of the default tissue mesh. To reset the collision mesh to the default tissue mesh, use Remove Collision Mesh.
This is the same as executing ziva -tcm;
Given a selected ‘parent’ tissue and ‘child’ tissues, convert the child tissues into subtissues of the parent.
A subtissue is not an independent part of the simulation; instead it defines materials, muscle fibers, and attachments within its parent tissue. This is useful for controlling the material properties of exact internal regions of a tissue. Without subtissues, the internal material properties of a tissue are just interpolated from the surface, with no way to control them manually.
This is the same as executing ziva -ast;
Given a selected tissue/cloth and Maya mesh, deform the Maya mesh according to the motion of the tissue. This will embed the vertices of the second mesh into the tet mesh of the selected tissue.
This is the same as executing ziva -e;
User Tet Mesh¶
Replace the tet mesh currently used for the selected tissue with a user-supplied tet mesh.
The tet mesh must be represented as a Maya triangle mesh, in the format described in the chapter “Meshing / Create Delaunay Tet Mesh”.
This is the same as executing ziva -cut;
Add a Field to the selected Tissue or Cloth bodies. Fields are used to add external forces to dynamic bodies. This will create a Maya Field of the specified type (Air, Drag, Gravity, etc.) and connect it to all currently selected bodies.
This is the same thing as creating a Maya field, selecting it and the target bodies, and executing ziva -cf;
Update Simulation Component¶
Tissue, Cloth or Bone¶
Updates the surface mesh of the selected tissue/cloth/bone by replacing it with the selected Maya mesh.
The tissue’s tet mesh will be regenerated. Any painted attributes (such as attachments) on the tissue will likely be lost.
This is the same as executing ziva -tm;
Swap Attachment Inputs¶
For the currently selected attachment(s), swap the source and target bodies in the attachment.
This is the same as executing ziva -sai;
Tissue, Cloth or Bone¶
Remove the selected tissues, cloth, and/or bones from the system. They will remain in the scene as normal Maya meshes, but will no longer be simulation bodies.
This is the same as executing ziva -rm;
Remove the selected Embedded mesh from its affiliated tet mesh.
This is the same as executing ziva -re;
Remove the selected collision mesh from the tissue.
This is the same as executing ziva -rcm;
Any selected subtissues stop being subtissues, making them into full simulation components again.
This is the same as executing ziva -rst;
User Tet Mesh¶
Stop using a user-provided tet mesh for the selected tissue, and revert to the default grid-based mesh. This command disconnects the zDelaunayTet node or user-supplied tet mesh from the zTet node of the selected tissue(s).
This is the same as executing ziva -dut;
This removes the entire Ziva rig in a solver, plus the Ziva solver itself. Any geometry that was rigged in this solver is now clean Maya geometry.
This removes the entire Ziva rig from the scene. You are now left just with clean Maya geometry.
Delete simulation Component(s) from the scene. The mesh(es) will be removed, as well as all corresponding Ziva accessory nodes that drive the simulation.
Use this command instead of just deleting the meshes using the ‘Delete’ key, which may leave the solver in an invalid state.
Add a Ziva cache to the solver (or selected solver in the event you have multiple solvers in the scene).
After creating the cache, the solver’s output will be saved, so that each subsequent time you run the simulation, it will be played back from the cache instead of re-solved. If you reach the end of the already-cached frames, the solver will begin simulating again, and the results appended to the cache. Once the cache is created, anytime you wish to re-generate the simulation result you will need to first Clear the cache.
The cache is implemented in Maya as a pair of nodes, zCacheTransform and zCache. Selecting these nodes allows for cache settings to be modified.
This is the same as executing ziva -acn;
Clear the Ziva cache. If more than one cache node exists in the scene, the selected cache will be cleared.
Once you add a cache, you need to call this command each time you want to generate a new simulation; otherwise, the old simulation will simply be played back from the cache.
This is the same as executing zCache -c;
Save a ziva cache file to the specified location on disk.
This is the same as executing zCache -s <filename>;
Load a ziva cache file from the specified location on disk.
This is the same as executing zCache -l <filename>;
Select the current cache node (or the cache for the selected solver, if there are multiple).
This is the same as executing zQuery -t zCacheTransform;
Return some information about the plugin, including the current version number.
This is the same as executing ziva -z;
Launch a web browser to open the resources page on Ziva’s website.
Ziva Tools Menu¶
For convenience, this is a copy of the “Interactive Playback” menu item from the FX➞Fields/Solvers menu.
It plays the Maya scene while retaining the ability to interactively modify the objects in the scene.
Toggle Enabled Bodies¶
Toggle the active state of selected bodies (tissues, cloth or bones).
Ziva Command Help¶
Prints the ziva command help to the script editor.
This is the same as executing ziva -h;
The plugin has a few demo scene built in. The menu options under “Run Demo” will create a new maya scene with the demo. The menu options under “See MEL Source of Demp” will print MEL source code to the script editor that’s capable of generating the maya scene.
- Anatomical Arm
- Goaling, Self-Collisions, and Spatially Varying Materials
- Self-Collisions, Ziva Cache, and Delaunay Tet Mesher
- One Of Each Attachments
- One Of Each Collision Types
- Spatially Varying Materials
- Cloth Demo
- Cloth Rest Scale and Pressure
- Isomesher Demo
Create Isosurface Triangle Mesh¶
Remesh the selected Maya mesh (or tissue/cloth mesh) into a quality triangular mesh.
Remeshing is achieved using a Delaunay surface meshing algorithm, implemented in the zIsoMesh node. The properties of this node are described in the Ziva Nodes section.
This is the same as executing zIsoMesh;
Create Delaunay Tet Mesh¶
Create a Delaunay tet mesh from the selected Maya mesh (or tissue/cloth mesh), using the zDelaunayTetMesh node.
Typically, this command should be run on the output of “Create Isosurface Triangle Mesh” (above). The meshing is implemented in the zDelaunayTetMesh node, the properties of which are described in the Ziva Nodes section.
The output Delaunay tet mesh is represented as a Maya triangle mesh. The vertices of this mesh are the same as the vertices of the tet mesh. Each tet is given by four consecutive triangles, specifying the four triangles of each tet. Triangles with indices [0, 1, 2, 3] make up the first tet, indices [4, 5, 6, 7] make up the second tet, etc. Such a mesh can then be used as a tet mesh for a tissue, via “Add Tissue Property/User Tet Mesh”.
This is equivalent to executing zDelaunayTetMesh;
Combine the selected meshes together into a single mesh using the zPolyCombine node. The zPolyCombine node and new mesh maintain a live connection to the input meshes, which are not destroyed.
This is equivalent to executing zPolyCombine;.
Create Line-of-Action Curve¶
Create a NURBS curve useful as a line-of-action driver. This is done for all selected tissues and fibers. The curve is not automatically connected to the fibers, which can be done through the menu with Muscle Line-of-Action.
This is equivalent to executing zLineOfActionUtil;
Run Mesh Analysis¶
Qualitatively test the selected mesh(es).
The command tests for poor quality triangles, non-manifold geometry and non-closed manifolds (meshes with boundary).
This is the same as executing zMeshCheck -select;
From a source/target pair of selected meshes, select any source faces that intersect the target mesh.
This is the same as executing select -r `zFindIntersections -xs`;
Find Self Intersections¶
From a selected mesh, select any faces that self-intersect.
This is the same as executing select -r `zFindIntersections -xo`;
Select all zTissue nodes connected to the currently selected maya mesh(es).
This is the same as executing select -r `zQuery -t zTissue;
Select all zCloth nodes connected to the currently selected maya mesh(es).
This is the same as executing select -r `zQuery -t zCloth`;
Select all zBone nodes connected to the currently selected maya mesh(es).
This is the same as executing select -r `zQuery -t zBone`;
Select all zTet nodes connected to the currently selected maya mesh(es).
This is the same as executing select -r `zQuery -t zTet`;
Select all zAttachment nodes connected to the currently selected maya mesh(es).
This is the same as executing select -r `zQuery -t zAttachment`;
Select all zMaterial nodes connected to the currently selected maya mesh(es).
This is the same as executing select -r `zQuery -t zMaterial`;
Select all zFiber nodes connected to the currently selected maya mesh(es).
This is the same as executing select -r `zQuery -t zFiber`;
Select in Hierarchy¶
Select all tissue meshes in the hierarchy under the selected node.
Select all cloth meshes in the hierarchy under the selected node.
Select all bone meshes in the hierarchy under the selected node.
Given a source/target pair of selected meshes, select vertices on the source mesh that are near the target mesh.
Paint Attachments By Proximity¶
Given a selected attachment, paint the attachment weight map on the source that falls-off smoothly between the prescribed min and max distance from the target.