Dynamic Training Process

ZCPʙᴇᴛᴀ docs | 

Real-Time Plugin

If you haven’t already attempted to create a static real-time character, we recommend going through those steps first. The Static Training Process will help highlight an entire category of potential issues before compounding the process with the addition of dynamics.

Inputs: Character bakes, joint hierarchy with with the same animation used to generate the character bakes, character mesh with skinning weights, neutral character mesh, tetrahedral meshes that overlap portions of the character where dynamics are required, a single constraint mesh - which constrains the tets that intersect it’s triangle mesh.

(n.b. All character representations must share the same topology. Character bakes are ideally quasi-static or if dynamic, should be solved at 3 fps or less or remove most of the dynamics)

Output: Interactive character that closely resembles the bake, and can be articulated with the skeleton and has dynamic behavior.

Step 1: Import your Range of Motion character bake, your skinned character with animation applied to the skeleton,  the neutral character model, your tet meshes and your constraint mesh.  All meshes should share the same start pose.

Step 2: Set your timeline to match the length of the bake and animation.

Step 3: Execute the following MEL:

fz -m 128 -t -w <skinClustered mesh> <character bake> <root joint>;

fz -m 128 -t -c <constraint mesh> -w <skinClustered mesh> -D <bake> <root joint> <tet1> <tet2> <tet3> . . .;

Here are the meanings of the arguments:

-m = maximum number of training poses - for clarity, these are not literal poses as they appear in the training bake, but instead represent a best fit from a statistical standpoint (this can be conceptualized as something akin to spherical harmonics applied to shape reproduction)  - in practise, you can likely reduce this to a much smaller number. We typically use 16, 32 or 64. The higher this number, the better the shape reproduction, but the slower the performance.

-w = specifies the mesh that holds the skinCluster whose weights you would like to copy.

If this flag is not specified, the weights will be automatically computed based on the correlation of skeletal poses to bakes. In practice, better results are currently produced with a nicely painted skinCluster.

-D = specifies that we are training a dynamic solver.

Step 4: After the training has finished, execute the following MEL:

fz -d <zFastSolverFactory node> <the target mesh to deform> <root joint>;

Step 5: Delete the zFastSolverFactory node

Step 6: Tune the real-time dynamics - There are parameters on the zFastSolver node for this purpose. Both global and local “liveliness” and “frequencyScale” attributes exist for you to adjust the physical properties of the resl-time dynamic simulation.