Sunteți pe pagina 1din 81

T4 Bacteriophage Project: An Introduction to Blender

Iwan Kartiko Dept. of Computing, Macquarie University

Hardware Requirements1
Supported Operating Systems Windows (2000, XP or Vista), Mac OS X 10.2 and later, Linux 2.2.5 i386, Linux 2.3.2 PPC, FreeBSD 6.2 i386, Irix 6.5 mips3, and Solaris 2.8 sparc Minimal specs for Hardware 300 MHz CPU 128 Mb RAM 20 Mb free hard disk Space 1024 x 768 px display with 16 bit colour A three-buttons mouse Open GL graphics card with 16 Mb RAM Good specs for Hardware 2 GHz dual CPU 2 Gb RAM 1920 x 1200 px display with 24 bit colour A three-buttons mouse Open GL graphics card with 128 or 256 Mb RAM Production specs for Hardware 64 bits, Quad core CPU 8 Gb RAM 2 x 1920 x 1200 px display with 24 bit colour A three-buttons mouse and a tablet Open GL graphics card with 768 Mb RAM, ATI FireGL or NVIDIA Quadro

Taken from http://www.blender.org/features-gallery/requirements/ Last accessed in February 2010.

Software Requirements
Python 2.6.4
Website: www.python.org Python is a popular programming language. We will not do any python programming in this book. However, Blender requires a copy of Phyton installed to run certain scripts.

Blender 2.49b
Website: http://www.blender.org/download/get-blender/ Blender is a free and open-source application that can be used to create 3D models, animations, real-time content, and compositing. The latest version of Blender at the writing of this manual is 2.49b. The latest development version is 2.50 alpha1, which is not suitable for production setting. Blender 2.50 is the development branch toward Blender 2.6x and has many changes from Blender 2.49b. However, the method given in this book can be applied when Blender 2.60 is released.

T4_Bacteriophage_Project.zip
This le contains Blender les that are used in the production of this manual. These Blender les are provided to accompany this manual as worked examples to assist learning. Most importantly, this le contains the sketch le, which is needed in Chapter 3.

Contents
1 Introduction 2 Blender 2.1 User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Setting up Blender for rst time use . . . . . . . . . . . . . . . . . . . . . 2.3 Hotkeys and simple exercises of Blender . . . . . . . . . . . . . . . . . . . 2.3.1 Exercise 1. Orientation in 3D space, selecting and creating object. 2.3.2 Exercise 2. Transformations, deleting and creating primitives. . . . 2.3.3 Exercise 3. More on transformations and object selection. . . . . . 2.3.4 Exercise 4. Object editing, selecting and transformations. . . . . . 2.3.5 Exercise 5. More on object editing. . . . . . . . . . . . . . . . . . . 3 3D 3.1 3.2 3.3 Modelling Scene Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Modelling the shape of T4 Bacteriophage . . . . . . . . . . . . . . . . . . Modelling the background . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 13 13 14 16 16 19 19 20 21 23 23 25 36

4 Rigging 39 4.1 Setting up an Armature . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 4.2 Setting up Inverse Kinematics . . . . . . . . . . . . . . . . . . . . . . . . . 49 5 Shading 6 Lighting 55 61

7 Rendering 65 7.1 Placing the render camera . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 7.2 Evaluating and Finalising Render . . . . . . . . . . . . . . . . . . . . . . . 65 8 Parting Words 9 Troubleshooting 10 What next? 71 75 77

Contents

List of Figures
2.1 2.2 3.1 3.2 3.3 3.4 3.5 3.6 4.1 4.2 5.1 5.2 5.3 5.4 6.1 6.2 7.1 7.2 7.3 8.1 8.2 Blenders default User Interface with annotations. . . . . . . . . . . . . . . 15 User Preferences Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Research on Google . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Research on Youtube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The sketch of the scene. . . . . . . . . . . . . . . . . . . . . . . . . . . . . The sketch of T4 object to aid in modelling process. . . . . . . . . . . . . A render of T4 with no armature and plain material. . . . . . . . . . . . . The background, which is made out of a subdivided plane is shown in edit mode. The T4 object stands on the background object. . . . . . . . . . . 24 24 34 35 36 38

Blender displays the rotational limit of the joints in Pose mode. . . . . . . 53 A render of T4 with armature. . . . . . . . . . . . . . . . . . . . . . . . . 54 Shading menu in Buttons window with material button enabled. . . . . The head object with no material assigned to it yet. . . . . . . . . . . . The parameters to setup the transparency material, with Shaders menu detached from Mirror Trans and SSS menus. . . . . . . . . . . . . . . . . The material setup of the background object. . . . . . . . . . . . . . . . . 56 . 57 . 58 . 59

Three point light setup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 Shading menu in Buttons window with lamp button enabled. . . . . . . . 63 Render settings in Buttons window. . . . . . . . . . . . . It is recommended to do a small render at 25% size for a Authors render of T4 object with transparency material lighting applied in the scene. . . . . . . . . . . . . . . . . . . . . . . . . . . 67 quick assessment. 68 and three-point . . . . . . . . . . 69

An alternate purpose of T4 project, an advertisement of a jewellery shop. 72 Another possibility of T4 project, a poster of a talk. . . . . . . . . . . . . 73

List of Figures

List of Tables
2.2 6.1 Commonly used shortcuts in Blender . . . . . . . . . . . . . . . . . . . . . 18 Authors setting of each light. . . . . . . . . . . . . . . . . . . . . . . . . . 64

List of Tables

10

1 Introduction
This manual shows how to do 3D modelling, shading, posing, lighting, and rendering in Blender. You should download the publicly available software to your PC, see section on page 3, before you begin. The primary goals of this manual is to introduce the basics of creating high impact 3D images for publications or grant proposals, to students and sta, by using Blender. Previous experience in 3D modelling, texturing, photography, animation or programming is helpful, but not necessary. Because of the scope and the sheer amount of information that can be provided here, this manual only provides a brief overview of creating a simple 3D image. The author suggests going through the manual with a copy of Blender running on your computer. It is a good idea to read through a section before trying it on Blender. In this way, you will have a better picture of what you will carry out by the end of a particular section. As you progress through the chapters, less hotkeys will be mentioned. For example, Section 2.2 we read use [x] key to delete the box, as you progress, you will read only instruction, such as, delete the box. The next chapter begins with a short introduction to Blender User Interface (UI) and the hotkeys. Blenders UI might seem overwhelming at rst due to the number of buttons on the screen and little resemblance with other applications. However, this manual encourages you to memorise some of the shortcut keys to manipulate the scene, instead of locating all the control buttons one by one. While it is possible to click on the icons to perform actions, as you become procient in 3D graphics, youd rather use the shortcut keys. For example, to translate an object up 10 units you need to select the object, move the mouse to the translate button, click on translate button, move the mouse to the transformation handle, and pull the transformation 10 units upwards. These actions might take more than 10 seconds to complete. When you use the shortcut keys, these actions can be performed quickly; select object, press [g][z][5], and press enter to conrm. The reminder of the chapters follows with 3D modelling, rigging, shading, lighting and rendering. The last two chapters deals with troubleshooting and additional resources for further learning.

11

1 Introduction

12

2 Blender
2.1 User Interface
Blenders User Interface (UI, Figure 2.1) that comes with the default setting has two visible windows: 3D window and Buttons Window. You will often access these two windows throughout the book. This manual does not cover every components of the UI, only those that are needed for this project. Familiarise yourself with Blenders UI before moving on to the next section. Marker Description When you click this drop down menu, a few modes will be displayed on the screen. Texture Paint mode allows you to create drawings on the object. Vertex Paint mode allows you to create colour on the vertices, in conjuction of the colour to create additonal eect, such as shadows. Sculpt Mode allows you to do a 3D digital sculpting on an object. Only Object mode and Edit mode will be covered in the manual, the other modes are more advanced. By default, you will be in Object mode. In Edit mode you can change the subcomponents of the objects (vertices, edges, faces) to alter the shape of it. Weight Paint mode is commonly used to create or x deformation of 3D characters.

13

2 Blender This is a button that changes that way Blender display the 3D ojects on the screen, and it will not be mentioned much throughout the manual. However, from the given screenshots, you should be able to tell which mode the author used for the modelling process. Throughout Chapter 3 and 4, you are likely to switch between Solid and Wireframe display to assess the 3D shape of the object. Blender oers various pivot modes to assist you in moving around in 3D space and the modelling process. The actual use can be found later in chapter 3. For now, simply leave it on Median Point. Within the Button Window, there are other 6 panels: Logic (F4), Script, Shading (F5), Object (F7), Editing (F9) and Render (F10). Please leave the Editing panel enabled throughout Chapter 3 and 4. The content of the Buttons window will change depending on your actions or selection in the 3D Window. Blender oers many types of window, which will not be covered in this book. You can split more windows in Blender by moving the mouse cursor to the edge or border of a window and press MMB, and click on Split Area. You may explore what is in each Window type, however, please have the 3D window and the Buttons window ready for 3D modelling process.

2.2 Setting up Blender for rst time use


If this is your rst time running Blender on your computer, please read on. Otherwise, you may skip this section. When you launch Blender for the rst time, by default you will start with a cube, a lamp and a render camera (not visible by the default zoom level), looking from the top view-port as shown on Figure. 2.1). This section shows a

14

2.2 Setting up Blender for rst time use

Figure 2.1: Blenders default User Interface with annotations.

15

2 Blender conguration that enables you to orient yourself in 3D space easily. Move your mouse cursor to the border of the 3D window and the top menu bar, until your cursor becomes a two-headed arrow, then pull it down to see the user preference menu, see Figure. 2.2. Click on View and Controls button to bring up option for view rotation setting. Enable Turntable, Auto Perspective, Around Active and View Name buttons, as shown in Figure. 2.2). Now Blender is ready to use with the settings to make your work easier. You may slide the user preference menu back up. Importantly, save your setting with File, Save Default Settings or hit Ctrl + U. From now on, whenever you restart Blender you will not have to re-enable these settings.

2.3 Hotkeys and simple exercises of Blender


Table. 2.2 shows the list of commonly used hot keys in Blender. At this stage, please familiarise yourself with the keys listed in table (in given order), before moving on to 3D modelling. Please attempt the exercise at the end of this section before proceeding to the next. This exercise will help you greatly in manipulating objects in Blender. Before attempting each exercises, press [Shift][c], followed with [c] key to center the view-port and reset the 3D cursor at the origin (0,0,0). More hotkeys will be provided as needed throughout the manual. By the end of exercise no.5, you should have a basic idea of how to navigate in the 3D space, object transformations, and editing.

2.3.1 Exercise 1. Orientation in 3D space, selecting and creating object.


Do not proceed until this exercise is fully mastered. 1. Start a new scene by pressing [Ctrl][x] keys. 2. Select the box object at the origin with [RMB]. It will be highlighted with pink colour. 3. Drag [MMB] to dolly around the object vertically, 360 . 4. Similarly use [MMB] again to dolly around the object horizontally, 360 . 5. Zoom out until you cant see the box anymore, by using the mouse wheel. 6. Press [Numpad.] to focus back on the box. This focuses the view-port on the selected object. 7. Use MMB to get into perspective view, where the x-y grid touches the middle part of the screen with z-axis points up. 8. Pan the camera so that the box object touches the right side of the monitor, by using [Shift] and drag MMB. 9. Pan the camera so that the box object touches the left side of the screen. 10. Pan the camera so that the box object sits in the middle of the screen.

16

2.3 Hotkeys and simple exercises of Blender

Figure 2.2: User Preferences Menu

17

2 Blender

Key / Mouse action LMB click on view-port MMB drag on view-port Ctrl + MMB drag Shift + MMB drag g

Function Set position of 3D cursor. Dolly view-port. Zoom view-port. Rolling the mouse wheel does the same. Pan view-port. Translate tool. Type [g][x] to constrain movement in x-axis, [g][y] to constrain movement in y-axis, and [g][z] constrain movement in Z axis. For greater accuracy, you may add the value after specifying the constrain axis. For example, [g][z]-5 [enter], will move the object up along z-axis 5 units. Rotate tool. It has similar features to other transformation keys: g, r, and s. Scale tool. It has similar features to other transformation keys: g, r, and s. On selected Object, toggles between object mode and edit mode. Switch to top view. Switch to front view. Switch to right side view. Focuses the current view-port to selected object(s). Displays a compact menu in 3D window. Toggles select all or none. Rectangle selection. Ray-cast / Paint selection mode Table 2.2: Commonly used shortcuts in Blender

r s TAB Numpad 7 Numpad 1 Numpad 3 Numpad. Space bar a b bb

18

2.3 Hotkeys and simple exercises of Blender 11. Switch to right orthogonal view with [Numpad 3] key. 12. Switch to front orthogonal view with [Numpad 1] key. 13. Back to top orthogonal view with [Numpad 7] key. 14. Deselect the box object by pressing [a] key. You should end up with a view that is similar to what you started out with.

2.3.2 Exercise 2. Transformations, deleting and creating primitives.


Do this exercise slowly at rst and increase the speed gradually. Do not proceed until this exercise is fully mastered. 1. Start a new scene by pressing [Ctrl][x] keys. 2. Use [MMB] to get into perspective view, where the x-y grid touches the middle part of the screen with z-axis points up. 3. Select the box with [RMB]. 4. Press [x] to delete the box. 5. Create a monkey primitive object by pressing [space bar] key, select add, mesh, and click monkey. 6. Rotate the monkey to face you by, pressing [r][x]90, and [enter] key. 7. Make the monkey half the size by pressing [s]0.5 and press [enter] key. 8. Deselect the object by pressing [a] key. Now the monkey should be in the origin (0,0,0) and looks at you.

2.3.3 Exercise 3. More on transformations and object selection.


Do this exercise slowly at rst and increase the speed gradually. Do not proceed until this exercise is fully mastered. 1. Start a new scene. 2. Delete the box, the lamp, and the default render camera. 3. Use MMB to get into perspective view, where the x-y grid touches the middle part of the screen. 4. Create 2 monkey primitives. 5. Space them apart 5 units (from their centers). 6. Transform one monkey to be 2 times bigger along z-axis than the other. 7. Rotate both monkeys to face you. 8. Use rectangular selection [b] key to select both monkeys on the view-port. Alternatively, LMB on monkey and [shift] select the other.

19

2 Blender 9. Move them 1 unit along z-axis. 10. Deselect them by pressing [a] key. Both monkeys should be 1 unit higher than the previous position.

2.3.4 Exercise 4. Object editing, selecting and transformations.


1. Start a new scene. 2. Select all objects by pressing [a] key, then delete them. 3. Use MMB to get into perspective view, where the x-y grid over the distance approximately touches the middle part of the screen. 4. Create a monkey primitive object. 5. Rotate the monkey object to face you. 6. Use MMB to get into perspective view, where the x-y grid touches the middle part of the screen. 7. Get a good close look at the nose. 8. Press [Tab] key to get into the edit mode. Now, in edit mode you can change the appearance by modifying the vertices, edges or polygons. 9. Now we want to make the nose bigger by modifying the polygons. Press [Ctrl][Tab] key. This displays the selection-mode. Currently, we are in vertices selection mode. Select option number 3, faces. 10. All faces are selected by default on new object. Clear all selection by pressing [a] key. 11. Select 4 polygons at the tip of the nose. 12. Scale them twice the size and move them -1 unit along y-axis. The monkeys nose should be bigger, longer and points toward the screen. Use [s] key for scaling, and [g] key for translation. Take note here that all transformations keys ([g],[r], and [s]) are applicable also in the edit mode. 13. Deselect everything, by using [a] key. 14. Select everything by using box selection key, [b] key, draw a rectangle to cover the entire monkey. 15. Deselect everything. 16. Select all polygons on the monkey by using [b][b] key. This is the paint selection mode. The circle on the screen shows the radius of selection, and use LMB to start painting/selecting faces on the monkey. If the radius of selection too small, you may increase it by using the mouse wheel. Keep on paint-selecting until all the faces are selected. 17. Deselect everything.

20

2.3 Hotkeys and simple exercises of Blender 18. Press [Tab] key to leave edit mode. Do not create a new object in edit mode, that new object will be part of the object that you are currently editing. Always leave edit mode when you are done with editing.

2.3.5 Exercise 5. More on object editing.


1. Start a new scene. 2. Select all objects by pressing [a] key, then delete them. 3. Use MMB to get into perspective view, where the x-y grid touches the middle part of the screen. 4. Create a monkey primitive object. 5. Rotate the monkey object to face you. Select the monkey if it is not already selected. 6. Delete the other half of the monkey. Firstly, you must be in the edit mode, and select all the faces on the other half and press [x] to delete. To select the faces, you may use, [b] or [b]-[b], it is up to you, as long as you can do it fast. 7. Make the ear of the other half by 1/2 the size. Correct placement is not important at this stage. Make sure that it is smaller then the original size. It is up to you if you want perform the editing on the vertices, edges or faces. By now you should have a half-monkey on the screen.

21

2 Blender

22

3 3D Modelling
3.1 Scene Preparation
It has never been a good idea to plunge ourselves into a 3D software without knowing the object we are creating. Although scene preparation could take more time than the modelling process, this step is very crucial in terms of production time. The following are some of the important questions that we must consider carefully: What is the object? How will the object appear in the scene? How close will it be from the camera? What is the background for the object? How will the image appear on publication? What is the layout; landscape or portrait? What is the size; A4 or A0? 100% accurate model, or a simplied model? An initial research on the subject matter is important to get the idea of the shape and appearance of the object. Google (Figure 3.1) and YouTube (Figure 3.2) are good resources to search for example images. Familiarising yourself with the shape is very important before sketching and 3D modelling process. As familiarity increases, the 3D modelling process becomes easier. We will not be making a 100% physically accurate model, since that would be dicult at this stage. We will create a simplied model. Ill leave the creation of a 100% physically accurate model for your own exercise after walking through this manual. In this project, we have dened the object to be T4 Bacteriophage. For simplicity, Ive provided a sketch as shown in Figure 3.3 of how the scene would appear in a landscape format. In this manual, two objects will be created, the virus itself and a simple background object. However, depending on your familiarity with Blender at the end of this manual, you may improve the overall design of the scene. I would normally do sketches on paper. In this case I used Inkscape (www.inkscape.org) instead. Study the sketches as shown in Figure 3.3 and 3.4. In the scene that we are creating, the T4 will be shown as if it lands on at plane. In Figure 3.4, Ive identied the basic shapes that make up the shape of T4. You will use this gure as an aid to create the T4 object. The head part is an icosahedral shape. The tail resembles a cylinder shape. We will use only one 6-sided

23

3 3D Modelling

Figure 3.1: Research on Google

Figure 3.2: Research on Youtube

24

3.2 Modelling the shape of T4 Bacteriophage cylinder for the tail part, since all need to be the same objects. We will do extrusion along the tail part to create the whiskers and the bre tails.

3.2 Modelling the shape of T4 Bacteriophage


Please read through this section entirely before attempting it on Blender. If you are new to Blender, do not attempt this part without completing section 2.3. Throughout this section, even it is not explicitly mentioned, you will switch between perspective view (by dragging MMB around) and front orthogonal view (by pressing Numpad1 key) many times in assessing the shape that you are creating. Step no.

Screen-shots

Descriptions

Delete the default box in the scene.

Switch to front orthogonal view by pressing Numpad1 key and load the background image to help you in the modelling process by clicking View, Background images (a panel will appear on your 3D window), Use background images and load the background image sketch.png that is provided with this manual (T4_Bacteriophage_Project.zip). Change the Blend value to 0. Let the Background image panel oats on your screen for now.

25

3 3D Modelling Step no.

Screen-shots

Descriptions

Position the background image of the T4 object, so that the bottom part of it sits at the origin.

Create an icosahedron by pressing, [Space Bar], Add, Mesh, Icosphere, set the subdivision to 1. Move it to the designated place as marked by the background image. Create a 6 sided cylinder, by pressing [Space bar], Add, Mesh, Cylinder, enable Caps and set the number of vertices to 6. Scale and position this cylinder to the designated place according to the sketch. Rotate the cylinder -15 degrees along z-axis.

26

3.2 Modelling the shape of T4 Bacteriophage Step no.

Screen-shots

Descriptions The cylinder does not have sucient number of surfaces to work on. We must subdivide the cylinder along the length of the cylinder. While the 6-sided cylinder is still selected, enter edit mode by pressing [Tab] key. Switch to edge selection mode by pressing, [Ctrl][Tab], 2. By now, all edges of the cylinder are selected, press [a] key to deselect them all. Now, select only the vertical edges of the cylinder and press [w], click Subdivide Multi, set number of subdivision to 3. Now you have 3 new sets of edges on the cylinder. Move the new set of edges on top, to the top of the tail sheath, just below the whiskers.

27

3 3D Modelling Step no.

Screen-shots

Descriptions Move the new set of edges at bottom, to the bottom of the tail sheath, just below the tail bres. Lastly, the new set of edges in the middle, downwards, slightly above the tail bre. We will do extrusion on these newly created faces to create the whiskers and the tail bres. Let us now make the plates (or the disc shape). The rst one is for the whiskers, and the other one below is for the tail bres. Now, select the 6 faces on the top of the cylinder.

10

11

Now, we want to expand it along xy-plane. Press [e] key for extrusion menu and choose Region.

12

If you move the mouse, the extrusion do not appear correct, this is ne.

28

3.2 Modelling the shape of T4 Bacteriophage Step no.

Screen-shots

Descriptions Quickly press [Esc] then scale the newly created faces (which you cant see) along xy-plane, by pressing [s][x], input 2.5, [enter], followed with, [s][y], input 2.5, [enter].

13

14

You should have something similar to the image shown on the left.

15

Do the same procedure for the bottom part of the cylinder. You should end up with a dumb-bell shape as shown on the left.

29

3 3D Modelling Step no.

Screen-shots

Descriptions Let us make the whiskers by using 2 extrusions. Select the 6 faces of the top dumb-bell, and do extrusions on individual faces, press [e], and click individual faces. Extrude this one about 1/3 length of the whiskers. Switch the pivot mode to Individual Centers. Now press [s] to scale the faces individually. If the faces are not scaling in respect of their own centers, it is because you do not have the pivoting mode as Individual Centres.

16

17

Do another extrusion until it reaches the full length of the whiskers. Scale down the faces at the tip too.

30

3.2 Modelling the shape of T4 Bacteriophage Step no.

Screen-shots

Descriptions

18

Your model should resemble the image shown on the left.

19

Do the same procedure of creating whiskers in order to create the bre tails.

20

The rst extrusion should be just short, not more than the ball joint as shown on the background image.

21

The subsequent extrusion should reach only at the ball joint marked on the sketch.

31

3 3D Modelling Step no.

Screen-shots

Descriptions

22

Now create 3 extrusions at the joint for a better bending eect.

23

Extrude the faces from the joint all the way to the length of the bre tails.

24

Scale down the tip of the bre tails. If your scaling is messy, it is because you do not have the pivoting mode as Individual Centres.

25

At this stage you should have your object similar to image shown on the left.

32

3.2 Modelling the shape of T4 Bacteriophage Step no.

Screen-shots

Descriptions

26

Is it not entirely complete, we still need to create that teeth-looking object at the bottom of the cylinder.

27

Select 6 faces at the bottom of the cylinder as shown on the left. Switch the pivot mode to Individual Centres, if you happened to switched into dierent pivoting mode . Press [e] to extrusion, and select individual faces. Extrude them down, and scale them down. Remember, if the faces are not scaling in respect of their own centers, it is because you dont have the pivoting mode as Individual Centres.

28

29

At this stage, you should have created the T4 object as shown.

Save your work frequently. This is the end of the 3D modelling phase. The T4 model is at its default pose. So why did the author specify the default pose as such? Why

33

3 3D Modelling

Figure 3.3: The sketch of the scene.

34

3.2 Modelling the shape of T4 Bacteriophage

35 Figure 3.4: The sketch of T4 object to aid in modelling process.

3 3D Modelling

Figure 3.5: A render of T4 with no armature and plain material. not all bre tails up or down, or even bent? The reason was that the modelling process and rigging would be simpler and visually nicer. Rigging is a term to signify a process of setting up an armature, which contains bonesto pose or animate a 3D object. In the next section, we will prepare an armature, which enables us to pose the T4 object as shown in Figure 3.3.

3.3 Modelling the background


Modelling the background or the 3D environment is as crucial as the main object itself. Normally, stage or world design is separated from character design. Many books on the market treat these two subjects separately. However, the background of the T4 object is simple enough to be included in this chapter. Why do we need a background? To create and support the atmosphere of the storyline, which the director has in mind. For example, to show o the piloting agility of the main hero, the director would pick a dicult terrain to portray the scene, such as; narrow canyons or underground caves.

36

3.3 Modelling the background In this project, we want to accentuate the 3D presentation of T4 object. For this reason, we will use a dark-coloured background. This background will receive lights and shadows, which will enhance the depth of the image (otherwise it will look plain and boring). To create the background object as shown in Figure 3.6, follow these steps: 1. Create a plane 2. Position the plane to touch the bre tails of the T4 object 3. Switch to Edit mode 4. Switch to Edges selection mode 5. Select the edges where the bending will occur 6. Press [w] key to bring up the special menu 7. Choose Subdivide Multi, and set the number of subdivision to 6 8. Translate one edge at a time to obtain the backdrop shape 9. Switch to Object mode Once you have the background in your scene, click [smooth] button in Buttons window. Bear in mind, this button DOES NOT smoothen out objects, it only change how the lights will act on that object. By enabling this button, this object will appear smoother. You should be able to make this easily after completing the previous section.

37

3 3D Modelling

Figure 3.6: The background, which is made out of a subdivided plane is shown in edit mode. The T4 object stands on the background object.

38

4 Rigging
Rigging is the process of setting up bones for posing or animating objects. Think of it as bones and muscles in your body. Bones are 3D objects that deform other objects. In this chapter we will learn how to create an Inverse Kinematic (IK) setup. Why IK and not using Forward Kinematic (FK)? If you have a robot arm with 8 joints, with FK, you have to rotate the joints one-by-one to get the robots hand to reach a point in space. With IK systems, you put the robots hand where it would be in a space, then all joints will be automatically calculated. Thus, IK simplies posing objects greatly. We will create a simple rig to pose the T4 objects as shown in Figure 3.3.

4.1 Setting up an Armature


Step no.

Screenshots

Task descriptions If the 3D cursor is not at the origin, please reset the position of the 3D cursor. Create subdivisions along the vertical shaft of the T4 object, with 3 cuts. This can be done by selecting the edges in Edit mode and press [w] key to bring up the subdivision menu. Switch to right orthogonal view. Lets add an armature by pressing [Space Bar] key and pick Armature. Press [TAB] to enter into edit mode.

39

4 Rigging Step no.

Screenshots

Task descriptions Extrude the bone twice towards the icosahedron. This can be done by RMB click on the tip of the bone, and press [e] key to extrude. You may press [e][z], to extrude the bone vertically along z-axis.

Now, extrude a bone to cover the entire length of the head of the T4 object.

40

4.1 Setting up an Armature Step no.

Screenshots

Task descriptions Now you should have an armature of four bones. Please name the bones properly to distinguish which one is which. RMB click on the body of the bone and there should be an Armature Bones menu in the Buttons Window, underneath your 3D window. Name them as (from the bottom) tailSegment1, tailSegment2, tailSegment3, and head.

Select the bottom node of tailSegment1 bone, and extrude towards positive y-axis. This will be the root bone, which all other bones will be attached to either directly or indirectly.

41

4 Rigging Step no.

Screenshots

Task descriptions Click the body of the root bone, and under Armature Bones menu, change the name of the bone to root. Move this bone out of the way, which enables us easily to grab the bone later when needed to pose or animate the object. Since this bone will not deform anything, disable the Deform button and make sure that the bone is a child of [] (choose blank).

On the other hand, you must set the tailSegment1 bone as child of root bone. Since these two bones are not attached, enable the O (set) button. The bones in the armature should be in this hierarchy: root 9 tailSegment1 tailSegment2 tailSegment3 head

42

4.1 Setting up an Armature Step no.

Screenshots

Task descriptions

10

Your armature should now resemble the image on the left.

11

We will now begin enveloping process by specifying how much the bones will inuence the vertices of the T4 object. Switch the bone display from octahedron to envelope.

12

Enter the edit mode, if youre not in that mode, and start modifying the envelope by RMB click on the bones node, followed with [s] key.

43

4 Rigging Step no.

Screenshots

Task descriptions Please make sure that the head and the tail segments are covered within, at least, the white envelope. Beyond the white envelope, the inuence value is 0. Within the white envelope towards the bone is between 0 and 1. As for the whiskers part, make sure that they are covered by the white envelope of the lower node of the head bone (or the upper node of the tailSegment3 bone). Now, let us set the icosahedron and the cylinder object to respond to the envelope, which you set up earlier. Switch to Object mode. Select the icosahedron, then click Add modiers button and Armature from the pull-down menu. Now, enter the name of the armature object in the Ob: eld as Armature.

13

14

Repeat these steps for the cylinder as well.

44

4.1 Setting up an Armature Step no.

Screenshots

Task descriptions Now, lets test the deformation by selecting the armature, and switch to Pose mode.

15

Posing with the bones drawn as octahedron or envelope will obscure the view a lot. Changing the drawtype to Stick (in Buttons window) is recommended at this stage.

Rotate the bones one at a time and examine the deformation. If youre not happy, go back to edit mode and modify them there.

16

Inspect the deformation from all angles.

45

4 Rigging Step no.

Screenshots

Task descriptions

17

Switch to front ortho view and place the 3D cursor with LMB at the base of the bre tail as shown.

18

First extrusion, extend it up to the ball joint as shown on the sketch.

19

Extrude the bone again to the tip of the tail bre. Make an angle between the rst bone and the second bone. A slight bent will assist Blender to deform the bone in the correct direction as we want the bre tail will bend in a hat (^) shape, not a V shape..

20

Still in edit mode, switch the bones visualisation to Envelope and adjust the envelope of the bones.

46

4.1 Setting up an Armature Step no.

Screenshots

Task descriptions Since the bre tails are very thin, scaling down the envelope would still leave a big envelope. Simply change the distance value , under Armature Bones menu in Button Window, to 0.1.

21

22

Now, you should have an armature resembling to the image shown on the left.

23

At the tip of the bone that deforms bre tail, extrude another bone towards x-axis. We will use this bone as an IK handle.

47

4 Rigging Step no.

Screenshots

Task descriptions Under Armature Bones menu, disable deform button, as the IK handle will not deform the object. Give it a proper name, such as tailFibre1_IK, and make it to be child of nothing. This is how to setup a bone to act as an IK handle, which you can use to animate a chain of bone easily.

24

25

Before we move on, make the tailFibre1a bone to be the child of tailSegment1 bone. This way, when we move the root bone in Pose mode, the tailFibre bones will be moved as well.

48

4.2 Setting up Inverse Kinematics

4.2 Setting up Inverse Kinematics


Step no.

Screenshots

Task descriptions

Lets continue from the previous section. You should have an armature resembles to the image on the left.

Switch to Pose mode. Select the IK bone, then hold down [Shift] button to select the tailFibre1b bone, and press [Shift][i] to add an IK constraint. The tailFibre1b bone is now marked with yellow colour, which signies that it has an IK constraint in place. Change the value of Chainlen(gth), under Constraints menu, to 2.

49

4 Rigging Step no.

Screenshots

Task descriptions Now you should test the IK setup by moving around the IK bone/handle. Does it deform properly? If it does, switch back to edit mode, and duplicate these bones (tailFibre1a, tailFibre1b, tailFIbre1_IK to other tail bres. Do this by switching rst to top ortho view, select the bones, and then use [Shift][d] to duplicate 3 bones at a time. Translate and rotate these duplicates to other bre tails that has no bones yet, until all bre tails have bones in them. Name these duplicates properly, e.g., breTail1a...breTail5a, and so on. After correcting the names of all the bones, select all the bones and press [Ctrl][n], and click on Clear Roll (z-axis up) to reset the roll position of the bones. After extrusions, bones may have dierent roll value. Before posing, always reset bone rotation by doing [Ctrl][n].

50

4.2 Setting up Inverse Kinematics Step no.

Screenshots

Task descriptions Check if the z-axes of the bones (of the bre tails) point up by enabling the Axis button. When nished, switch back to Pose mode.

If some axes do not have z-axis upwards, bring up the transformation panel by pressing the [n] key, select the bone with z-axis that points downwards, simply change the roll value to 0. This step is important for the bones of the bre tails as we will be setting their rotation limits. As for the bones on the tail sheath, you cant have the z-axes to point up due to the orientation of the bone. For tailFibre1a ... tailFibre5a, set the bone rotation limit as shown on the image below.

51

4 Rigging Step no.

Screenshots

Task descriptions For tailFibre1b ... tailFibre5b, set the bone rotation limit as shown on the image below.

Lastly, you need to setup an IK to control the head bone, which is attached to tailSegment3 bone. For the heads IK, use chain length value of 4.

This concludes the rigging process of the T4 object. If youre still in Pose mode, and press [a] key to select all the bones, Blender also shows the rotational limit of the joints as shown in FIgure 4.1. To change the pose of your T4 object you must be in Pose mode, then select and transform the IK handles one at a time, which you set up earlier. To reset the pose, select all the bones in Pose mode, hit [Alt][g], and [enter], to clear the position. Immediately perform [Alt][r], and [enter], to clear the rotation value of the joints. You have now learnt a lot in modelling, rigging and posing in Blender, but there are plenty more to discover in Blender. Please refer to Chapter 10 for links to others tutorials to see other techniques in modelling and rigging. What does the T4 object resemble? If we look at Figure 3.3, 3.5 and 4.2, a number of things come to mind: a microphone, a mace, a starship, a carousel (without the horses and the top canopy), an octopus, a cactus, a spider, an ant. Do you know any others? By now, you should be able to create these objects with the modelling and rigging skills that you acquired thus far.

52

4.2 Setting up Inverse Kinematics

Figure 4.1: Blender displays the rotational limit of the joints in Pose mode.

53

4 Rigging

Figure 4.2: A render of T4 with armature.

54

5 Shading
Shading is a separate subject on its own and many studies have been dedicated to produce a realistic looking material in Computer Graphics (CG). Shading is a process of creating surface information of objects. Milk and metal are two dierent materials. These two reect and refract light dierently (also depending on their thickness). These two have dierent transparency and specularity. For example, in a prison scene, you will strive to create a worm-out metal look on the bars and having a milk-looking material would not suit the scene at all. Blender is able to simulate the surface appearance of many materials, metals and non-metals. In this short chapter, we will look into setting up a simple transparent material. To bring up the settings of the material in Buttons window, simply press [F5] key, and click on the material buttons, which is to the right of the lamp button (Figure 5.1). To create the material for the T4 object, simply follow these steps: Select the head part of the T4 object Bring up the Shading menu and enable the material button (red ball). If it is a new object, you wont see any settings for the materials, as shown in Figure 5.2 Click on Add New button and Blender will assign a default white material Give the material a proper name, dont leave it as material.001, mat.00a or material.002. Who can tell what an item is where there is poor naming in the scene? Use the material settings as shown in Figure 5.3 for the T4 object Select the tail part of T4 object (which includes all the bre tails) Dont click on Add New button, instead, click on the pull down menu, and use the material that you created previously for the head. Use the material settings as shown in Figure 5.4 for the background object. If you press [F12] key to render your scene, it might not look good at this stage. Lighting setup will be explained in the following chapter. If the render camera does not render at the appropriate location, quickly take a look at Section 7.1.

55

Figure 5.1: Shading menu in Buttons window with material button enabled.

5 Shading

56

Figure 5.2: The head object with no material assigned to it yet.

57

Figure 5.3: The parameters to setup the transparency material, with Shaders menu detached from Mirror Trans and SSS menus.

5 Shading

58

Figure 5.4: The material setup of the background object.

59

5 Shading

60

6 Lighting
If you press [F12] to render a scene in Blender without a light, you will get nothing but a black render. Similarly to the real-world, we need lights to see things. Lighting is also a separate subject on its own, and a form of art. A great looking 3D model with poor lighting would make the object seem dull. A proper lighting setup enables artists, or even producers to create and convey the mood of the scene. For example, a tomb scene would have dim lights to accentuate the eerie feeling. Now, if you increase the intensity of the lights in the cave to a bright white colour, it will feel like being in a hospital. Many books have been written on this topic and further discussion of complex light setup in Blender can be found on the following links: http://wiki.blender.org/index.php/Doc:Manual/Lighting http://dl.dropbox.com/u/1393798/tutorials/lighting/general/general.html http://dl.dropbox.com/u/1393798/tutorials/lighting/interior/interior.html http://wiki.blender.org/index.php/Doc:Books/Essential_Blender In this chapter, you will create a three point light setup, which is a basic light setup as shown in Figure 6.1. There are also many kind of light objects in Blender, however, we will deal mainly with the point light object. If you think that this light setup is too boring, there is room for improvment. Feel free to do so. Three point lighting simply refers to a technique to light up a scene by using only three light sources. The setup is relative to your render camera. Key light is the main light in the scene. This light has higher intensity than ll and back lights. Fill light diminishes any strong shadows or contrast caused by the key light. Back light simply adds the contrast between the background and the object itself. To setup a three point light in your scene, simply follow these steps: To add a light, press [Space Bar], Add, click on Light Position the lights as shown in Figure 6.1 Add the key light rst, then the ll light, and back light. To change the properties of the light: Click on the button with a light bulb icon on it, as shown in Figure .6.2 Press [F5] key to switch the panels in Button window from Editing to Shading There are ve types of lights in Blender as shown in the Preview panel (Figure 6.2), only enable [Lamp] button. This is Blenders point light

61

6 Lighting

Figure 6.1: Three point light setup.

62

Figure 6.2: Shading menu in Buttons window with lamp button enabled.

63

6 Lighting Type of light Key light Intensity 1.25 Location x=-4.3 y=4.6 z=6.9 Fill light 0.65 x=9.6 y=4.4 z=3.5 Back light 0.5 x=-5.6 y=-7.5 z=9.7 Colour r=0.792 g=0.837 b=0.993 r=0.985 g=0.875 b=0.744 r=0.831 g=0.858 b=0.902

Table 6.1: Authors setting of each light. The light settings, which the author used is in Table 6.1. You may use these settings or you may wish to be more creative. If the key light is orange, how would you complement it with the ll and the back lights to make the T4 image stand out? To see the results, you can press [F12] key to render your scene. If you dont like what you are seeing, simply change the lights attributes and render it again. If your camera location is awkward, and can not see the scene properly, quickly take a look at Section 7.1.

64

7 Rendering
Rendering is a process of generating an image by computing the parameters dened in the scene. What we see in the 3D window is the polygon view of the object. Sometimes, we change the display type from at to wireframe, however these views are computationally not intensive. These views are commonly known as real-time rendering. The non-realtime rendering, or known as pre-rendered scene, is computationally very intensive. With realtime rendering you may get a smooth interaction, up to 100 frames/sec. With a nonreal-time rendering, you may have to wait up to a week for 1 frame (depending your system conguration). When the render button [F12] is pressed, Blender computes the polygons, the lights, the shading, camera, sky, armature, along with their interaction in the scene to produce the resulting image. Blender is a 3D suite with its own renderer. There are many other renderers out there that do more intensive calculation than Blender and gives life-like scenery, such as: Sunow (sunow.sourceforge.net), YAFRAY (www.yafray.org), and LuxRender (www.luxrender.net). These three programs only render, but they take 3D scene made in Blender. Please see their website for further information. In this manual we only use Blenders internal renderer.

7.1 Placing the render camera


Blender starts with 1 render camera when you start a new scene. However, this default location is not the desired one at all times. You can place a render camera by moving your perspective view (to capture the scene as you like it) and press [Ctrl][Shift][Numpad0] to move the render camera to your location. You can move the render camera by using [g] and [r] key to rotate. To see through your render camera, after moving around in the scene, simply press [Numpad0].

7.2 Evaluating and Finalising Render


There are various settings for rendering in Blender, simply press [F10] key and you will see the menus as shown in Figure 7.1. In Format panel (rightmost), you can see the default size of the render in pixels. You may change these values depending on your need. For a half-page illustration, the values are sucient; 1280 x 1024 pixels. For an A0 publication, you want to render at approximately 15,000 x 20,000 pixels. Another setting

65

7 Rendering that you must pay attention to is the percentage value in Render panel (with the big Render button). This percentage allows you to render smaller than the predened size, in this case lower than 1280 x 1024 pixels. Depending on your system conguration and the complexity of your scene, you may have to wait for a long time to see the render window. It is always a good idea to do a small render to evaluate your scene before doing a full Render (see Figure 7.2). Occasionally, you might change the light parameters, the orientation of render camera, or the background colour. It might take quite a while to get a nal render. You might adjust the lights position or the properties to make the image stand out when you render. You might also change the position of the camera to get a better shot at the T4 object. Once you are happy with the result shown at 25% or 50% size, you may do a full-size render. Please render your scene. If your scene is dierent from Figure 3.3 and 7.3, thats ne. To save the rendered image, click [File] on the top menu, then click on Save rendered image. The type of image compression can be dened from the Format panel and the default format is JPEG at 90% quality (Figure 7.1). If your publications require a le format that Blender does not support, simply save as Targa (.tga) format, and use GIMP (www.gimp.org) to convert it to another format.

66

7.2 Evaluating and Finalising Render

Figure 7.1: Render settings in Buttons window.

67

7 Rendering

Figure 7.2: It is recommended to do a small render at 25% size for a quick assessment.

68

7.2 Evaluating and Finalising Render

Figure 7.3: Authors render of T4 object with transparency material and three-point lighting applied in the scene.

69

7 Rendering

70

8 Parting Words
This chapter concludes the T4 Bacteriophage Project, which introduced the basics of Blender modelling suite. However, your journey in 3D graphics begins here. You have learned the basic skills to create a simple 3D image. Creating an artwork requires problem-solving skills and patience. The author introduces a general ow of a 3D image creation using Blender: sketching, 3D modelling, shading, posing, lighting, and rendering. Do not attempt to create any form of 3D artwork without sketches, you will be wasting valuable times in doing unnecessary modications. The author has only presented the basics of Blender in creating a 3D artwork. Additional resources to learn Blender is provided at the end of this manual. The author wishes you all the best with your endeavour in making 3D graphics, for whatever purpose it may be: visual arts, technical reports or even scholar publications. Figure 8.1 and 8.2 show alternate endings of this T4 Project. So, what are you making today?

71

8 Parting Words

72

Figure 8.1: An alternate purpose of T4 project, an advertisement of a jewellery shop.

Figure 8.2: Another possibility of T4 project, a poster of a talk. 73

8 Parting Words

74

9 Troubleshooting
This section provides some general troubleshooting if things do not seem to work properly. Problems The scene is black when I press F12 to render. Possible solutions Make sure that you have at least a light in your scene. Check if the light is in the same layer with the object. The lights intensity and distance value might be too low. Check if the layer where the light set is enabled. Check if the render camera is inside any object or put away in another deactivated layer. I cant switch to top/right/front orthogonal view I cant dolly the camera easily, the view-port tumbles around. I dont have perspective view when I dolly the camera, only orthogonal view. On the exercises 1-5, I see no cube when I create a new scene. Make sure that the Numpad Lock is on.

Please see section 2.2. Press [Numpad5], and please see section 2.2.

It seems that the default conguration has been changed on your computer. Firstly, switch to top orthogonal view by pressing [Numpad7]. Secondly, press [Shift][c], then [c] to reset the location of 3D cursor at the origin and centers the view-port. Lastly, create the cube by pressing [Space bar] key and select, add, mesh, cube.

75

9 Troubleshooting

76

10 What next?
The author has provided some links at the end of this manual for advanced topics in Blender. Blender is not limited only to 3D modelling, posing and rendering. You can use Blender to create physical simulations, such as re, smokes, rigid body, soft body (hair and clothes) and uid. In addition, Blender is also a 3D engine that allows you to create interactive 3D simulations and presentations. Blender has been used extensively on various open projects such as Elephant Dream and Big Buck Bunny (http://www.blender.org/features-gallery/blender-open-projects/). Open projects allow you to download the entire production set in Blender le format for learning purpose. Thus, you can learn more about setting up scenes from the experts. The next place to learn about advanced topics in Blender is: http://www.blender.org/educationhelp/tutorials/. The author also recommends to look in other 3D softwares tutorials. Although you may not be able to replicate the steps in Blender, you can replicate the method by using Blenders features. You might nd a particular method that would be more ecient to create your scene. After browsing the links at the end of this manual, you would have more ideas of your next 3D projects and how to accomplish many tasks in Blender. However, as previously mentioned, you must begin with sketches. There are are many approach to set up a 3D scene, but a careful planning will greatly cut the production process.

77

10 What next?

78

Acknowledgment
The production of this resource was supported by the Australian Research Council Nanotechnology Network Early Career Book Project.

79

10 What next?

80

Appendix A: Additional Resources


Blender tutorials:
http://www.blender.org/education-help/tutorials/ http://wiki.blender.org/index.php/Main_Page http://www.blenderartists.org/forum/ http://www.blenderart.org/

Blender materials:
http://www.blender-materials.org/ http://matrep.parastudios.de/index.php

General 3D tutorials in lighting, compositing, shading, texturing and rendering:


http://www.3dtutorials.sk/ http://www.subdivisionmodeling.com/blogger/ http://www.3dm3.com/ http://www.cgsociety.org/ http://forums.3dtotal.com/ http://www.3dlinks.com/

81

S-ar putea să vă placă și