Presentation is loading. Please wait.

Presentation is loading. Please wait.

Assignment 8 Chess Game.

Similar presentations


Presentation on theme: "Assignment 8 Chess Game."— Presentation transcript:

1 Assignment 8 Chess Game

2 In this assignment, we will create a simple scene consisting of a chessboard, a few pawns and a few move of the chess games. Creating a pawn To create the pawn we use a technique called 'Spinning'. We 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 Switch to front view ([NUMPAD-1]) and make sure you are in object mode. Now add a new Bezier curve (SPACEAddCurveBezier Curve)

3 Step 2: Select the curve and rotate it (press R twice) to see the curve better Move to edit mode (Tab) and add 7 or 8 extra points to the curve by selecting an endpoint, holding down[CTRL] and press the Left Click on the mouse Shape the curve as shown below, and pay special attention that the endpoints on the left are located on the blue axis (the Z-axis). We will be using the Z-axis as the axis of rotation later.

4 When you want to create a rotation object, you must indicate the location of the rotation axis with the 3D cursor. We want to place this somewhere on the Z-axis. While still in front view, LeftClick on the blue Z-axis to place the 3D cursor there. Note that the rotation axis is always perpendicular to the screen. Now switch to object mode and go to the side view If the curve is not straight as shown in the next slide rotate it to look like what is shown in the picture.

5 Move the center of the curve to be in the middle if it is not there already.
To do that press the editing button (F9). From the “Curve and Surface” panel click “Center” button. Switch to top view, the curve should be as what is shown below: a simple straight line Move to the front view and move the center of the curve to the intersection of the z and x access Top View Side View

6 We are almost set to create the pawn
We are 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. Being in front view, leave the editmode ([TAB]), select and press [ALT][C]. Select 'Mesh' or press [ENTER]to perform the conversion. Move to edit mode and in the” Mesh tool” of the Editing Panel (F9) set the Screw degree to 360 and spin steps to 21 This value determines the resolution of the resulting object higher values increase the smoothness.

7 Now select all vertices with [A]
Switch to the top view with [NUMPAD-7] Click on the center point of the curve which should be right in the intersection of y and x access as shown in the picture. Now Press the 'Spin' button and watch the result. The curve has been extruded and rotated, leaving behind a complete pawn as you see in the picture

8 All is not ready yet, though
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 surface. To take care of this, while still in edit mode, select all vertices in your object with [A] press [W] to bring up the Specials menu 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 it.

9 As a finishing touch, smooth the pawn by clicking on 'Set smooth' in the “Link and Materials” panel of the Edit window (F9) Go to object mode, and being in the front view, switch to solid view (Z). Now The pawn is ready. You can make the pawn small by scaling it down if you want because you are going to make several copies. First create a duplicate of the pawn (Shift D) Then make one copy black and the other copy white Next make 7 copies of the black and another 7 copies of the white You should now have total of 8 pieces of black and 8 pieces of white

10 Creating the Chessboard
To create a chessboard, we start by adding a new plane to the scene. In front view, add a plane (space Meshplane) first. Move to edit mode (Tab), select all the vertices and extrude the vertices upward a bit ([E]) Then with the vertices still selected, scale them down (press S) somewhat to create beveled edges (see the top picture) Finally scale the entire thing to fill up two units as shown in the top picture. Also check it in top view and align it with the lines in the units as shown in the bottom picture. Front view Top view

11 Still in edit mode, and being in top view, duplicate the square (Shift D), hold down [CTRL] for snapping and move the copy 2 grid units sideways down and sideway and snap it with original copy as shown in the left picture Now select both copies and duplicate it and attach them to the other two similarly as shown in the middle picture. Keep on doing that to get the first half of the board. Again make sure that every time you make a copy and move it hold the control key to snap it perfectly to the other squares. You should end up with the picture shown on the right.

12 Before you give it any color, move to object mode and make a complete duplicate of the board (Shift D). Now make the first copy red and the other one white or glassy white Rotate one copy 90 degree (press R and type 90 and press return) and place it on the top of the other copy as shown below Select box (B) around the two copies and join them into one piece (Ctrl J)

13 Placing the Pawns on the Board
Being in top view and object mode, you may scale the board down to make it smaller and then place the pawns on the board as shown in the picture. Add a camera and make the camera to track the board to be able to see the board and pieces in camera view Before we start playing chess, this is how the board should look like in all views Side view Camera view Top view Front view

14 If the camera view does not show the board as shown in the above picture, move the camera around to set up the view as shown. Also before you start setting up the frames and playing chess, I recommend you to do the following: Create two windows, make one a top view and the other camera view. Then move each pawn around in the top view and inspect it in the camera view to make sure the pawns are moving on the squares as expected. If this is not the case, check the position of the pawns on the board in all views to see if they all have been set up the same as what is in the pictures shown in the previous slide

15 Lets Play Some Chess Although we did not create all the pieces, we can just make a few moves to generally see how a chess games can be animated. To start with, make sure you are in the top view. click F10 to move to editing panels and from the ANIM panel click on “Do Sequence” to turn it on. Start from frame 1 and in the top view, press A to select everything press the I in the keyboard select “LocRotScale” to set the starting keyframe

16 Move to frame 10 and move the third black piece from the right two squares up as shown in the pictures on the right Press the I in the keyboard and select “LocRotScale” to set the keyframe Move back to frame 1, and move the black piece back to its original position, if it is not there already Press I and select “LocRotScale”

17 Move to frame 20 and move the third white piece from the right two squares up as shown in the pictures. Press the I in the keyboard and select “LocRotScale” to set the keyframe Move back to frame 10, move the white piece back to its original position, if it is not there already Press I and select “LocRotScale”

18 Move to frame 30 and move the second black piece from the right two squares up as shown in the pictures. Press the I in the keyboard and select “LocRotScale” to set the keyframe Move back to frame 20, move the black piece back to its original position, if it is not there already Press I and select “LocRotScale”

19 Move to frame 40 and move the forth white piece from the right one square up as shown in the pictures. Press the I in the keyboard and select “LocRotScale” to set the keyframe Move back to frame 30, move the white piece back to its original position, if it is not there already Press I and select “LocRotScale”

20 Attacking time Move to frame 50 and move the black piece on the top of the white as shown in the picture Press the I in the keyboard and select “LocRotScale” to set the keyframe Move back to frame 40, move the black piece back to its original position, if it is not there already Press I and select “LocRotScale”

21 Move to frame 60 and move the attached white piece out of the game as shown in the picture
Press the I in the keyboard and select “LocRotScale” to set the keyframe Move back to frame 50, move the white piece back to its original position, if it is not there already Press I and select “LocRotScale”

22 White wants to revenge. So move to frame 70 and move the white piece on the top of the black piece as shown in the picture Press the I in the keyboard and select “LocRotScale” to set the keyframe Move back to frame 60, move the white piece back to its original position, if it is not there already Press I and select “LocRotScale”

23 Move to frame 80 and move the attached black piece out of the game as shown in the picture
Press the I in the keyboard and select “LocRotScale” to set the keyframe Move back to frame 70, move the black piece back to its original position, if it is not there already Press I and select “LocRotScale”

24 Testing your Animation
To make a simple test of your animation, In the ANIM panel set the start to 1 and end to 80 Press Alt A. You should see the movement of the pieces If the Animation is not as expected, it might be possible that you have forgotten some steps.

25 You can remove the frames and start again. To do that:
Go to frame 1 Set up the pieces on the board Switch to NLA Editor window from the window menu as shown in the following picture Box select all the yellow points and press x to delete them all Switch back to 3D view window again This removes all the frames and allows you to start setting up the keyframes again

26 You can now move to the side view and set up lights and camera and plane as shown below. Add a sun and a spot light.

27 The Result 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 of the output panel. 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 C:/render.

28 Set the correct file format
Set the correct file format. Selecting 'AVI raw' here will cause Blender to store your animations not as single images, but as an AVI file. Press F10 and in the ANIM panel turn off the “Do Sequence” Press Animation to create the slides of the movie After this is done you can press Play to play your video. This opens a new window – pressing [ESC] stops playing.


Download ppt "Assignment 8 Chess Game."

Similar presentations


Ads by Google