I did not make this tutorial.  All the credit goes to www.blendernation.com

 

A Pawn in a Hurry

Introduction

You have already seen that you can use Blender to create interesting images. Adding objects, materials, lights and a camera allows you to set up a scene in exactly the way you like. Blender will calculate the correct lighting and shadows automatically for you.

But there is more! There is a complete animation system inside Blender. Making an object move is as easy as defining its beginning and ending position. Blender does the rest for you - calculation of all the frames between beginning and end are done automatically.

In this chapter I will create a simple scene consisting of a chessboard and a pawn. The pawn will jump happily across the board and it will deform a bit when it hits the ground.

Creating the Pawn

To create the pawn I use a technique called ‘Spinning’. Using this, I will only need to draw an outline of the pawn and then Blender will calculate how the object should look based on this outline.

Start with a new Blender scene, delete the default cube and switch to front view ([NUMPAD-1]). Add a new Bezier curve from the toolbox: press [SPACE], select ‘Curve’ from the right button bar and then select ‘Bezier curve’ from the list:

You can add extra points to the curve by selecting an endpoint, holding down[CTRL]and LeftClicking. Try playing with the curve a bit before going on - also pay attention to the way the ‘handles’ affect the direction of the curve in a particular point. Shape the curve as indicated below, and pay special attention that the endpoints on the left are located on the blue axis (the Z-axis). I will be using the Z-axis as the axis of rotation later.

When you want to create a rotation object, you must indicate the location of the rotation axis with the 3D cursor. I want to place this somewhere on the Z-axis. While still in front view, LeftClickon the blue Z-axis to place the 3D cursor there.

A nice trick to align the 3D cursor or objects is to use the snap function ([SHIFT][S]). With this, you can do four things:

  1. Align a selection to the grid. For example, when in editmode you can place vertices exactly on grid corners with this.
  2. Align a selection to the cursor. This moves the currently selected object or vertex to the 3D cursor location.
  3. Align the 3D cursor with the nea- rest grid corner. Useful in our current case to match up the cursor exactly with the Z-axis (place the cursor somewhere near a grid corner and activate this option).
  4. Align the 3D cursor with the curr- rently selected object or vertex.

The rotation axis is always perpendicular to the screen. Switch to top view with NumPad [7]. You now see the 3D cursor, indicating the position of the rotation axis and our curve which will move in the direction of the arrow in the illustration.

I am almost set to create the pawn. There is only one more thing to prepare: the spin function only works on meshes, and not on curves. So first convert the outline curve into a mesh by leaving editmode ([TAB]), selecting it and pressing [ALT][C]. Select ‘Mesh’ or press [ENTER]to perform the conversion.

Now switch to the Edit Buttons screen. Enter Edit Mode ([TAB]); in the Mesh Tools panel you see a button labeled ‘Spin’:.

Underneath it are inputs for ‘Degrees’ and ‘Steps’. Set degrees to 360 and steps to 21. (This value determines the resolution of the resulting object - higher values increase the smoothness). If you SHIFT-Click in the number panel, you’ll be able to manually enter a value.

If you wanted to create only half an object, you would set the degrees value to 180.

All set? Now first select all vertices with [A]; next switch to the top view with [NUMPAD-7]. Press the ‘Spin’ button and watch the result. The curve has been extruded and rotated, leaving behind a complete pawn.

Hint: If you have set up your screen to work with multiple 3D windows, Blender will need to know in which window you wish to perform the spin operation. The cursor changes into a question mark and you must click in the top view window to proceed.

All is not ready yet, though. It may not be obvious, but there is still a seam in the object where the ‘beginning’ meets the ‘end’ of our spin sur- face. I have found an easy trick to close it: while still in edit mode, first select all vertices in your object with [A]. Next, press [W] to bring up the Specials menu and use the ‘Remove Doubles’ option to weld the double vertices together.

After performing this operation, Blender reports on the amount of vertices that have been deleted. Just confirm this requester.

As a finishing touch, smooth the pawn by clicking on ‘Set smooth’ in the EditButtons window:

There is a good chance that the buttton on your screen will say ‘et Smooth’ because of the way the user interface is scaled on your screen.

Try holding down [CTRL] and dragging with the MiddleClick to modify the size of the interface elements. (And, yes, [SHIFT] and MiddleClick will move the interface panels instead of resizing them).

Show time! Switch to solid perspective mode by pressing [Z] and NumPad [5] and drag around with the MiddleButton to look around your object.

Making it Move

The basic idea behind keyframe animation is to define objects properties like position and rotation for given moments in time. These definitions are called keyframes or keys. If you have defined at least two keyframes, Blender can interpolate their values (calculate the transition between the keyframes) and create a smooth animation for you.

I will now define five keyframes for the pawn in different positions, rotations and sizes. The end result will be the pawn making a hop.

The first thing you need to know is how to navigate to other frames in your animation. Take a look at the header of the Buttons Window. The current frame number is always displayed here. There are a number of ways to go to another frame number:

To change the current frame:

  • LeftClick and drag in the frame number indicator. This will change the frame number.
  • Hold [SHIFT]and LeftClickin the frame number indicator. You can now enter a new value for the frame number.
  • Use the keyboard:
    [CURSOR RIGHT] - frame +1
    [CURSOR LEFT] - frame -1
    [CURSOR UP] - frame + 10
    [CURSUR RIGHT] - frame - 10
    [SHIFT][CURSOR RIGHT] - start of animation (default=1)
    [SHIFT][CURSOR LEFT] - end of animation (default=250)

I will now set up the first keyframe of the pawn. Go to frame 11 (the easiest way is to press [CURSOR UP] once). Start the rotation mode [R], hold down [CTRL] to constrain the rotation to multiples of five degrees and give the pawn a rotation of -30 degrees.

Next, move it ([G]) so that the bottom is on the height z=0 the brightly colored horizontal line). This height will later be used for the floor:

Now you have to set a keyframe to make Blender ‘remember’ the objects position and rotation at frame 11. To set a keyframe, press [I]. This will bring up a requester with a lot of options - these are the different key types that you can set. In this tutorial, I will only use the types (or channels) ‘Loc’ (Location), ‘Rot’ (Rotation) and ‘Size’. You can select one of the first three options to set only a Loc, Rot or Size key. If you wish to define multiple keys at once, select LocRot or LocRotSize.

For this frame, I want to set the location (make sure Blender remembers that I want the pawn exactly at z=0) and the rotation (the -30 degrees I just defined).

Later, I will also define a Size key on another frame. Because of this, I have to make sure Blender keeps the pawn’s size on my current frame intact. For this reason, insert a key for Size too.

Take a look at the pivot menu at the bottom of the 3D Window. There are five options that define the behavior of the scaling and rotation tools. By default, the ‘bounding box center’ is selected as the center of all scaling and rotation operations.

We want to have more control over the exact center of rotation though, so select ‘3D Cursor’ as the pivot point.

Go to frame number 16. Because the base of the pawn is already resting on the ‘floor’, I want to rotate the entire object around this point, and not around the object center.

Move the 3D cursor to the base of pawn, start the rotation mode [R], and rotate the pawn +30 degrees. It should be perfectly vertical now.

Insert a new locRotSize key to define this position.

For the next key, go to frame number 21, move the 3d cursor to the right base point. This is the new center of rotation. Rotate the pawn +30 degrees and insert a new LocRotSize key.

Go back to frame 1. Translate the pawn up and to the left a bit. This will be the position in which in comes flying into the animation. Insert a new LocRotSize key.

And for the final key, go to frame number 31. Like in the previous step, translate the pawn upward and to the right a bit. Insert a new key.

If you want to see all the keys that you have defined for your animation, select the pawn and press [K]. You can now select a different key with [PAGE UP]and [PAGE DOWN]. Selected keys are drawn in yellow. The selected key can be edited directly and the new key values are stored in the animation system immediately. If you want to change the entire animation at once, simply select all the keys with [A] and move, rotate or scale them.If you want to see all the keys that you have defined for your animation, select the pawn and press [K].

(An alternative for editing key values is to go to a frame for which you have defined a key, change the object properties and then re-insert the necessary keys).

To hide of the keys, press [K]again.

If you want the object on frame 1 and 31 to have the exact same height, press [N]. This brings up the object properties screen in which you can enter numeric values for position, rotation and size. LocZ controls the object’s height.

You are now set to play back the first frames of your animation with [ALT][A]. Press [ESC]to stop playing. (In the image below I have composed several frames of the animation together.).

Squashing the pawn

To give the pawn a comic-like character, it should appear to be soft. When it hits the ground, it must be squashed a little bit. This can be achieved by changing the size of the pawn on frame number 16.

On frame 16, Place the 3D cursor at the base of the object. Enter scale mode and start decreasing the object’s size by moving your mouse vertically. Next, click the MiddleButton to indicate that you only want to change the objects Z size.

Change the size to about 0.7 (this value is printed at the bottom of the 3D Window while you are sizing).

To make the squashed pawn look more convincing, it should not only get shorter, but also a bit wider. After all, its volume should remain the same.

Repeat the previous step, but now move the mouse horizontally before you constrain the sizing process. Increase the object’s width to 1.3.

Switch to top view and repeat the scaling to increase the object’s Ysize to 1.3, too.

To finish this part of the tutorial, insert a new LocRotSize key for frame 16. Take a look at your animation now - did you expect it would be this easy to create elastic-looking objects?

Creating the Chessboard

Of course, this scene would not be complete without adding a chessboard. I will use a simple extrusion technique for this.

I start by adding a new plane to my scene. In front view, enter editmode ([TAB]), select all vertices ([A]) and extrude the vertices upward a bit ([E]). With the vertices still selected, scale them down somewhat to create beveled edges.

Still in editmode, I now duplicate the square, hold down [CTRL] and move the copy 2 grid units sideways and upward.

Press [A] to select everything and repeat this step. This time you can copy two fields at the same time. This way, you can create an entire chessboard in 5 steps!

In the previous step you have actuallly created half of the fields of the chessboard. Now leave editmode and copy the entire board. Rotate it 180 degrees (hold down [CTRL] again) and move it so that the copy ‘fills the holes’ that were remained in the original. You now have a chessboard that consists out of two objects: one for the white fields, and one for the black fields.

Add some material colors (I chose blue instead of black to make the board look more interesting) and take a peek at your new object in solid perspective mode.

The Result

To finish your animation, set up some lights and set up your camera. Since your camera is just another object like the pawn, you can animate it, too. Try making it rotate slightly from left to right (insert rotation keyframes only). A few degrees is already enough to make your final animation a lot more dynamic.

To render a single frame of your animation, go to the desired frame and press [F12] or click the ‘Render’ button.

Usually you will want to render an entire animation to disk, either as a series of images or as an AVI file. To set this up, first enter a filename in the filename box. For a series of images (not for AVI files), this name will become the base prefix of the filesnames. For example, entering ‘/render/pawn’ will result in a series of images called ‘pawn0001, pawn0002, …’ stored in the directory /render.

Set the correct file format. Selecting ‘AVI raw’ or ‘AVI jpg’ here will cause Blender to store your animations not as single images, but as an AVI file. AVI jpg is the most compact way of storing your anima- tions, but it comes with a slight quality loss. Change the ‘Sta’ (Start) and ‘End’ values to match your animation. For the current animation, values of 0 and 31 should be entered.

Press the ‘Anim’ button to render the entire animation.

Play it back from within blender by pressing ‘PLAY’. This opens a new window - press [ESC] to stop playing.

A Little Extra

There is an extra rendering option called ‘Motion Blur’. Motion Blur simulates the effect of a shutter time - fast moving objects will become a bit blurred. Motion blur takes a lot of time to calculate, but in some cases it really adds to the realism of your scene.

Before rendering, select the button ‘MBLUR’. Leave the ‘Bf’ (Blur Factor) on 1.0; this value represents the shutter time. Ahigher value corresponds to a longer shutter time.

Here is the result of the same image as before, but now motion blurred.