Puppeteering

From Valve Developer Community
< SFM
Jump to: navigation, search

Puppeteering means making changes to controls during playback. You can do this with any kind of manipulator: control sliders, the viewport, or a 3D manipulator. Using a manipulator while playback is running automatically records your modifications into the floating modification layer.

To puppeteer an animation:

  1. Select the control(s) that you want to puppeteer.
  2. If you want the new animation to start at the beginning of the shot, press to move the playhead there.
  3. With the screen manipulator, set the control's rotation the way you want it for the beginning of the shot.
  4. Press and hold the left mouse button inside the screen manipulator.
  5. Without releasing the button, press Spacebar. The shot will start playing back.
  6. Drag to create the real-time movement you want. When you're done, press Spacebar again to stop the playback.

Now that you have puppeteered an animation, you can adjust and manipulate that animation as you would any other in the Motion Editor or the Graph Editor.

You can repeat the puppeteering process as many times as you like.

Tip:Because puppeteering is recorded via mouse movement, it can be low-resolution and a little jerky. You can smooth it out with the Smooth preset.

Using One Model to Puppeteer Another Model

Another form of puppeteering is transferring the animation of one model's sequence to another. For example, transferring the walking sequence animation of the Dr. Breen model from HL2 to the Heavy model in TF2. This can either be done via Doc/Revzin's Puppet Script or manually. The puppet script will remove the puppet's Animation Set so it might be preferable in some cases to do it manually if editing the puppet's facial expressions and other non-transferable animations is desired.

To do it manually, import two models. Adjust the "master" model so that it has a similar pose to the "puppet" model. Leave a second or so out of the Motion Editor so that the master starts in reference pose. Then Import the desired sequence to the master.

Select the master's pelvis bone then the puppet's pelvis bone (must be in this order.) Right click the puppet's pelvis bone in the Animation Set Viewer and select DAG utilities menu > constraint_orient. Do the same thing again, and this time select DAG utilities menu > constraint_point.

Choosing only DAG utilities menu > constraint_orient, do the same for every bone of the spine, neck, head, arms, hands, legs, and feet of the puppet.

The puppet will now adopt the movement of its master.

To remove the master without affecting the puppet's animation, lock all of the bones in the puppet that have the constraints which were just added by clicking the checkbox to their left. After they are all locked, right click the puppet's whole animation set and select constraints > remove constraints. Then the bones can be unlocked and the master can be deleted. Alternately, you can also hide the master's animation set if further puppeting is needed.

Animation sequences that have been transferred to the puppet can be saved as a .dmx for later use by right click the puppet's Animation Set and going to Export>Animation; if it's grayed out, check to see if all the bones are unlocked.

See also