Animating Weapons for Counter-Strike Source/Draw Animation
Appearance
Important!
Please save your work periodically.
Creating the Scene
[edit | edit source]- Open css-lr300-idle.exp.
- Go to File>Save As. Save it as css-lr300-shoot.exp.
- Match the scene's FPS with the QC's shoot1/2/3 fps. (You should already know how to do this from the idle animation page.) The fps for the sg552 draw animation is 37.
- Match the scene's end frame with the SMD's end frame minus one. (31 - 1 = 30). The end frame is 30 for the sg552 draw animation.
- Find the null Frame. Below the Parent button, there is a CnsComp button. Press it.
- Click the word Constrain above the Parent button, and click Pose.
- Click the left hand null. Now whenever you rotate or move the hand, the gun will follow it.
- Now constrain the right arm to the left hand.
Animating
[edit | edit source]- Set keys for rotation and translation (hint: VKCK) at the last frame for every null in the scene. This ensures that the gun is in its idle position after it is drawn.}}
- Set the current frame to 0.
- Set a key for the left hand and left arm at where you want the gun to begin drawing out.
- Review the animation in the Camera viewport.
FCurve Editor
[edit | edit source]- Press 0 to bring up the FCurve Editor.
- Select a null such as the hand.
- Click one of the rotation items. (rotx, roty, rotz)
- At the bottom there is an animation marker that you can move around.
- On the left and right there will be keys. Keys are represented as little colored squares in the FCurve Editor.
- Click one of them.
- Now a little black handle will pop out of the key. Drag it around to edit the interpolation.
- Some shortcuts:
- Shift+Z: Rectangular zoom
- A: Frame curve
- S: Multi-purpose navigation tool (Similar to using S in a viewport.)
- Now you can edit the interpolation (in between frames) of the draw animation as a curve. Experiment and have fun with it.
- There are also plenty of buttons and fields.
- One useful button is the Linear Interpolation button. This will straighten out a curve's interpolation. It is useful when you have two keys at two different places and you want them to stay and not move.
- Another useful button is the Add Key button. Its icon has a picture of a key with a plus sign on it. Click it and then click on somewhere on the FCurve plane to add a key. To exit Add Key mode, click the button with the picture of a cursor on the far left.
- Toward the top of the FCurve editor are text boxes for Frame and Key values. To use these, select a key and set the values using the text boxes.
Adding an Inverse Kinematic Controller
[edit | edit source]Tip: | A forward kinematic controller is useful for changing the pivot of a null. |
---|
- A controller is an object used to control another object from a different location. See Questions if you don't know what inverse kinematics are.
- For this animation it is useful to add an inverse kinematic bone to the supporting arm. The supporting arm supplies some of the force that brings out the weapon.
- Press 2 to bring up the green animation panel on the left.
- On the left hand panel under Create, select Skeleton>Draw 2D Chain.
- Click on any two points on any viewport. Then right click.
- Make sure all three elements that you have just created are selected. Press Control+Shift+R to reset their positions.
- Select each object individually and reset their locations again.
- Press Control+J to bring up the Move Joint tool.
- Put the root on the elbow area of the supporting arm.
- Put the effector on the wrist joint.
- Rotate the bone so the effector's axes properly line up with the rotation of the arm.
- Right click any part of the chain (root, bone, or effector) to select its components.
- Click Transform on the right panel and click Set Neutral Pose.
- Setting keys for an inverse kinematic chain using the shortcut K is ambiguous in XSI. It is better done in the animation editor.
- Using what you have learned about the FCurve editor animate the root and effector in the FCurve Editor. Try to think about how the root's and effector's movement are represented in real life.