Ziva Pre-Roll / Run-Up

Ziva Tutorials | 

BROAD STROKES

When building character assets in Ziva,  it is customary to choose a neutral pose (typically an "A" or "T" pose for bipeds). Once your character is ready for shot work, however, it’s important to smoothly transition this neutral stance to the new location and pose used at the beginning of your shot. To do so, you must follow a simple 2-part Run-Up process to get your Ziva character from the origin and standard pose to your arbitrary new location and stance.

Part 1: Animation Setup :

Any animation driving your character must account for the Ziva run-upn/pre-roll requirements. To do this, you must ensure that your character animation starts with a standard/known pose and is located at the origin of the Solver. If your start frame is 990, then it should be in standard post and location at frame 990.Then, over the course of the next frame, the Joint Hierarchy can transition to the new spot. So, by Frame 991, your Joint Hierarchy will be exactly where you wanted for your scene space.

Next, you’ll want to set the animation to begin over the span of the following 10 frames. If you’re working on a team, all of the roll-in may be the animator's responsibility. You can also use a run-up script that automates this process whenever new animation is published. Then, as per usual, you’ll want to bake out the bones and they will follow the joints, as animated.


Part 2: Dynamic Run-Up

To properly set up your dynamic anatomy, start by opening the muscle scene file with your standard muscle rig. Then, import the animated Joint Hierarchy from earlier along with the cached bones that you just created.

  1. Switch the Solver off.
  2. Set the Start Frame to 990 on the Solver window.

Since dynamic objects are solved relative to the Solver position, you must relocate the Solver and the rig simultaneously to match the location of the imported Joint Hierarchy.

  1. Select the root joint of the rig in the Outliner window
  2. Shift-select the Solver in the Outliner window
  3. Select ‘Constrain’ in the upper toolbar → “Parent”
  4. Make sure “Maintain Offset”, “Translate”, and “Rotate” boxes are all checked
  5. Apply.

Then, to stop the Solver from following your character around the scene, bake keys accordingly.

  1. Edit → Keys → Bake Simulation → “start = 990” + “end=991”
  2. Delete the parent constraint.
  3. Set the subsets at Frame 990 to 1 (but don’t forget what the original setting was). If you attempt to use any higher substep count than 1 during your run-up, it will cause the simulation to break.
  4. Set frame 992 back to whatever substep count it was before.

At this point, you can test to see if it’s all working by jumping 1 frame ahead and seeing the Bones and Solver move, then jump more frames and see just the Bones move, while the Solver remains stationary.

Now, lastly we can connect our driver bones, that we imported earlier, to the Ziva bones. Once you have the driver bones imported, you have to give them all the same suffix (_driver for instance). Then, select all the newly renamed driver bones and run the following script:

def drive_bones_with_blendshapes( driver_list, s, e, driver_suffix ):        

 for driver_mesh in driver_list:     

   driven_mesh = driver_mesh[:len(driver_suffix)*-1]

   if mc.objExists( driven_mesh ) and mc.objExists( driver_mesh ):

     mc.select( [ driver_mesh, driven_mesh ], r=True )

     blendshape = mc.blendShape( n=driven_mesh+'_blendShape')[0]

     mc.setKeyframe( blendshape, attribute=driver_mesh, t=s, v=0 )

     mc.setKeyframe( blendshape, attribute=driver_mesh, t=e, v=1 )


The script loops through each selected object. It tries to find the corresponding object, so if the script is working on r_humerus_bone_driver, it will look for r_humerus_bone. It will automatically make a blendshape between those two objects

Lastly, you can turn the Solver back on and you see that everything move from origin to your shot position immediately. The process is the exactly the same if you’re working with skin and fat – simply bring in the animated muscles as well as the alembic cache for the bones and the Joint Hierarchy to parent with the Solver.


January 5, 2018

Now I have another question. Is it Ok for Ziva to use Negative frames as start frames?

And while on this subject, the proper use to apply Animation Data from elsewhere (and that starts out on a different pose than the Bind Pose) on Ziva would be to have all joints be initially on the same positions as the Ziva Meshes and gradually blend the positions over N frames, right?

December 18, 2017

It dawned on me that the muscle wouldn't be following the animation anyway. It needs attachments to bones to inherit animation. But I still wonder, what if say down the line we want to do something to the cube upstream from the ziva nodes. If this was nCloth, we could tweak the IN cube and it would affect the DEFORM shape, it seems like with Ziva that's not possible. Am I mistaken?

And please enlighten me, you say that you don't recommend anything running into muscle geometry, what would, in your eyes be the ideal workflow between animation and cfx?