# keyframe basics in maya
_This is a tutorial from the previous teacher (who took it from the teacher before him). It covers the basics pretty well._
[Download this Maya file to get started.](https://drive.google.com/file/d/1GwEac7cSx2UehKjLCRHDrDjtX7LevMzf/view?usp=sharing "opens in new tab") Open the scene file chessBoard.ma. This scene contains a chess board with chess pieces.
## move the pawn
You will animate the move of the white pawn from frame 1 to 60. Make sure the playback range is set from 1 to 400.
![[Pasted image 20230412110058.png|this is where the animation controls are]]
Using the Current Time field, enter in 1 to go to frame 1. Select the fourth white pawn from the left (in front of the king). In the Channel Box click on the **Translate X** attribute name. RMB on Translate X and choose **Key Selected** from the pop-up menu.
A red line will appear at frame 1 on the timeline while you have this object selected, to show that the keyframe exists. The value field in the Channel Box will also change color.
![[Pasted image 20230412110136.png|The pawn has been selected and keyframed.]]
Go to frame 60 in the timeline. Select the Move Tool from the toolbox (or press W and click-drag the pawn along the x axis to move the pawn two squares forward. In the Channel Box, click on the **Translate X** attribute name.
![[Pasted image 20230412110206.png|The pawn has been moved two squares forward.]]
RMB on the word **Translate X**, and select **Key Selected** from the pop-up menu. Another red tick will appear at frame 60 on the timeline.
![[Pasted image 20230412110309.png|Key the translate X channel for the pawn4 object.]]
![[Pasted image 20230412110401.png|Play animation by clicking on the play button.]]
Click on the **Rewind** button and then click on the **Play** button to watch your animation. Stop the playback.
## animate another pawn
Go to frame 90. Select the fourth black pawn from the left (in front of the king). Perform the same steps you performed on the white knight, except set your starting keyframe at frame 90 and your ending keyframe at frame 150. Playback your animation to see both pawns move and then stop the playback.
![[Pasted image 20230412110425.png|The black pawn has been keyframed in the same manner its opposing white pawn.]]
## animate the queen with multiple keys at once
So far you have been animating (keying) one attribute at a time. It is also possible to key multiple attributes at the same time.
Go to frame 180. Select the white queen. In the Channel Box, Select both **Translate X** and **Translate Z** by holding CTRL key to select multiple elements. Press RMB and choose **Key Selected** from the pop-up menu. You have just set a keyframe for both the Translate X and Translate Z attributes for the queen.
Go to frame 240. Using the Move Tool, move white queen to the square that would be at the end of the line of diagonal white squares. In the Channel Box, ensure that Translate X and Translate Z are selected and then RMB click and choose **Key Selected**.
![[Pasted image 20230412110516.png|Move the white queen diagonally and set keyframes in the same manner as before.]]
## animate the knight with quick-keys
You will now animate the knight jumping over the pawns using the **keyboard shortcut for keyframing Translate XYZ (Shift - W)**.
Go to frame 270. Select the black knight on the left side of the chessboard. Press **Shift - W** to set keys on Translate XYZ. (NOTE: You can set key for Translate, Rotate and Scale by using Shift - keyboard shortcut.)
Go to frame 290. Move the knight forward to go one square past the pawn in front and one square to the right. Set keys.
![[Pasted image 20230412110534.png|The black knight, when keyed, passes through the objects in front of it.]]
A minor problem occurs. The knight goes through the pawn, so the knight must be made to jump over the pawn. Go back to frame 280. Move the knight up the Y-axis in the + direction so that it jumps over the pawn. Press **Shift - W** to set keys on Translate XYZ. Playback your animation from the beginning.
## animate the camera
Now you are going to animate the camera dollying in to get a close up of the black knight.
First, you need to create a camera. Do not use the persp camera to render or to animate - use it only as a modeling tool. Click **Create > Camera**. A Camera appears in the center of the world (chessboard). (If cameras are hidden, click Show > Cameras.)
![[Pasted image 20230412110606.png|Create a camera.]]
You can also select the Camera in the Outliner window by clicking on the appropriate camera name. In this case you want **camera1**. It will be selected by default after you create it. Set the camera at an angle that you can see the chessboard from). In this example, I set the camera at more or less the same angle as what you've seen up to this point, but that is not strictly necessary.
The Attribute Editor is another way to set keys on attributes. Go to frame 340. Have the chessboard in view. Press **Shift - W** to set keys on the Translate channels. Press **shift - E** to set keys on the Rotate channels. Go to frame 400. Dolly the camera close to the knight. Tumble the view to see the front of the knight. Press **S** to set another key. Set the playback range from 1 to 500. Playback your animation.
![[Pasted image 20230412103627.png|Play the animation.]]
---
Learn more…
- [Introduction to Maya 3D Animation from EDUCBA](https://www.educba.com/maya-3d-animation/)
---
tags: #3d #maya #animation #resources
home: [[! 3d modeling- maya]]