[LinuxFocus-icon]
LinuxFocus article number 305
http://linuxfocus.org

[Photo of the Author]
by Katja Socher
<katja(at)linuxfocus.org>

About the author:

Katja is the German editor of LinuxFocus. She likes Tux, computer graphics, film & photography and the sea. Her homepage can be found here.

Going 3D with Blender: Very first steps

[tux penguins on sphere and cube]

Abstract:

This is the start of a series of tutorials where we will discuss some modeling (and later perhaps also some animation) techniques to get you started with Blender, a phantastic open source tool for going 3D. In this first tutorial we will just touch the very basics and build a stage setting that we will then use as a starting point for our next articles.

_________________ _________________ _________________

 

Going 3D with Blender: Very first Steps

A while ago Blender has finally become open source! Time to explore this phantastic tool. You will see that it offers you lots and lots of possibilities to create almost everything you want! At first however if you have never used Blender or any other 3D graphics tools before you are probably rather overwhelmed and confused by all those different buttons and options. So let's start from the very beginning:

In a way 3D graphics can be compared to photography (and cinematography if you animate your graphics). A photographer chooses a model, places it into a scene, sets up the lights, takes the picture with her camera and as soon as the photograph is developed you can look at it. The same is true for the 3D artist: she also needs a model that she places into her scene and also needs lights and a camera. Finally to develop her photograph she makes a render. Rendering means that the computer processes all the data and creates the picture from the view point of the camera.

The big difference between the two is of course that the 3D artist is using the computer all the time and makes the models herself (virtually on the computer).

There are many tools and techniques available in Blender that help you to create your models easily, e.g. there are many "basic" forms (often also called "primitives") that you can use and "remodel"...

Well, enough "theory". Time to take our knowledge to practise and dive right into Blender: Curtain up for this wonderful tool! (you may open it now :)

 

The Blender screen

When you start Blender (the latest version as of this writing is 2.27 which you can download from http://www.blender.org) you will probably get a screen with two windows in it:

[Blender screen]
Fig.1 Here is a screenshot of the default Blender screen.

In the window at the bottom you see a lot of buttons while the window on top is almost empty because we haven't started modeling any object yet.
In the menu bar below this upper window you can see a button with a capital T. This tells you that this window is supposed to be a top view. To get to a front or side view you can just go to this button and change it to F and S respectively.

For modeling it is inevitable that you know how your objects look like in these different views. Therefore we split this big window into 3 windows, each of them displaying a different view. To do this go with the mouse over the line between the window and the menu bar (on top or bottom). A double arrow will appear. Click on it with the middle mouse and a little menu is popping up asking you if you want to split or join the areas. As we want to make 3 windows out of this one we decide to split the area (left click). But you already know how to reverse your action in case you feel more comfortable with another window design. Then arrange it so that the two windows have the same size by dragging the mouse to the desired position and then left click again. (Note that somehow in this Blender version (2.27) to arrange the windows in a different way afterwards doesn't seem to work properly.) By now you should have divided your big window into two smaller ones. On the left we leave the window untouched but we will divide the window on the right side another time. This time we will divide it horizontally though: Put the mouse over the line dividing the two almost empty windows until the arrows are displayed and move the arrows so that they are a bit more to the right, then click on the middle mouse button and "Split area" and arrange it as you can see in Fig2. Now you have three windows but all display a top view. So change the orange button of the left window to F (front view) and the orange button right and below to S (side view).
[Blender screen]
Fig.2 The Blender screen with three windows

By the way the menu with the orange and other buttons is called header for the modeling window. By right clicking on a free spot in that menu a small menu will pop up and you can choose between having the header on top, at the bottom or no header. If you have decided to have no header for this window but finally wish to have it back just move and click as if you wanted to split or join your different windows again. There should be a third entry "Add Header" in the pop up menu now and clicking on it will return your header.

Now we have already customized our working environment a little bit. But let's leave the screen design now and start with our first little project: a stage with floor and background that is illuminated by some lights. We start with the camera to give us some orientation in our 3D space:

 

The camera

If you haven't deleted the camera (the object that looks a bit like a triangle) accidentally it will already be there (see Fig.2). Otherwise in front view hit Space, Add-->Camera and place it (click g to move the camera) where you can see it in the picture (Fig.2).

 

The stage

 

The floor

With the mouse button over the top view hit Space key and a menu pops up, press Add --> Mesh --> Plane. The plane will position itself centered around the red-white cursor. Whenever you add a new object like this into Blender the object will always position itself where the cursor is. This way you can already define where a new object will be added to your scene. You simply move the red-white cursor to the desired place by a left click on the mouse.

Okay, the plane is there now and in edit mode (it is highlighted in yellow) which means that you can edit every single point. For now we want to increase the size of the whole plane and as edit mode isn't necessary for this action we leave it by pressing tab (you could of course scale it in this mode but it is just more convenient the other way). The plane is still selected (it is highlighted in pink). Press s now and move the mouse away from the plane. You will see that it becomes bigger. If you have reached the desired size press the left mouse button to make the change effective.

There is no real undo button in Blender. If you want to go back to the old position press the right mouse button before you hit the left one. The plane will jump to its original size. But if you have already hit the left mouse button it's too late. So if you are unsure if your next operation will make your model better or worse it's always saver to save the image first before you continue (see below how to save your work in Blender).

Now in side view press g and move the plane a bit lower so that it is lower than the camera.

Next let's give our floor a green colour. Select the material button (the one with a red sphere) in the header of the window below with all those different buttons. Then click on the white button and press "ADD NEW" to add a new material (see Fig.3 to locate the two buttons). Now suddenly the window doesn't look so empty anymore. You can see the sliders with RGB (to the left). Move the R slider to 0, G to 1 and B to 0 (with the left mouse button) to give the floor a green colour.

[Blender buttons]
Fig.3 Some important buttons

Note that you might already have a plane on your screen when you open the default screen in Blender. In that case select it by right clicking on it and then press x to delete it.

 

The background

To add the background is similar to adding our floor of course. Just hit the Space key again but this time put the mouse button over the front view and press Add --> Mesh --> Plane. Press tab to leave edit mode and with the plane still selected press s to scale the plane up to the desired size. In side view press g and move the plane a bit further to the right to get a bigger distance from the camera.

To give it a blue colour select the material button (the one with a red sphere) in the header of the window below with all those different buttons. Then click on the white button and press "ADD NEW" to add a new material. Move the R slider to 0, G to 0 and B to 1 (with the left mouse button) to obtain a blue colour.

[Blender stage]
Fig.4 That's how our Blender stage should look like
 

Let there be light

Light really is very important as it can create very different moods and atmospheres and also is responsible for our shadows. Here in this first article we can't talk about it in great detail, let's just shed some light onto our scene.

We use kind of a standard three-light setting: Put the mouse over the front view and hit Space, Add--> Lamp. Click on the lamp button (the button with the bulb). You can see that there are 4 different types of lights available in Blender. By default the light is set to lamp. But for our first light we want a spot light because it is the only light source in Blender that can create shadows. So click on it. Then go back to our modeling window and rotate and move the spot light to the position you can see in the picture (Fig.5): In side view click g and move the spot light up and to the left. Then click g again in top view and move it to the right. Now click r and rotate it to the left. Finally go to side view again, click r and rotate it downwards. It should now be placed in front, above and to the right to the center of your stage.

Next we need some back light. Place the cursor as you can see in the picture (Fig.5): above and behind the center of your stage. Then hit Space-->Add-->Lamp.

Finally you need a third light to fill in the dark spots. This is usually placed behind the camera. Click there with the red-white cursor and again hit Space -->Add-->Lamp.

You can also play a bit around with the brightness of the lights by changing their energy level (just change the value of the energy slider in the lamp menu).

[Blender stage with lights]
Fig.5 That's how our Blender stage with camera and lights should look like


 

Rendering

Now that we have our default scene complete it's a good idea to make a render to see how your scene looks like: Go to the Display Button (the button with the picture on it or press F10) and change the size of the picture. I usually prefer SizeX:640 and SizeY: 480 while working. It is big enough so that I can see the details of my models clearly enough but the rendering time isn't too long. If you want your models to make shadows make sure that the shadows button is pressed. Usually while modeling a complex object you are not interested in the shadows right away as it makes your rendering slower so I only press this button when I am interested in seeing the shadows. At the moment there is nothing in our scene that could have a shadow though. Now for seeing the stage you can either press the RENDER button or press F12. A new window opens and displays your stage. To get it to the background press F11 (while keeping the cursor over the render window). If you hit this button again the image reappears without being rendered again.

 

Saving your work as .blend file

Now that you have successfully created the stage I suggest that you save it as we will always use this setting as a starting point for our next articles in this series.
To do this simply go to File in the menu on top--> SAVE AS and save your scene as default.blend (or however you want to name it, just make sure that the extension is .blend).

 

Adding a ball and a cube to your stage

It's time to practise your new skills a bit more. Therefore look at the illustration image for this article and imagine it without the Tux penguins. We are going to add the sphere and the cube to our stage.

To add the sphere hit space (in front view)--> Add-->Mesh--UVSphere and leave the numbers of the segments and rings at their default value of 32. Click tab to leave edit mode. Give it a red colour by selecting the material button (the one with a red sphere or press F5), then click on the white button, press "ADD NEW" to add a new material and move the R slider to 1, G to 0 and B to 0 (with the left mouse button).

Place it on the center of our stage. Then press the Edit buttons (or F9). In the column with the field that displays a red colour you see a button with "Set Smooth" on the bottom. Press it to give your sphere a smooth surface.

Next add the cube by hitting space in front view -->Add-->Mesh-->Cube and give it a yellow colour (R=1, G=1, B=0).

To get it to look like on the illustration image you have to rotate it a little bit: Press r and in front view rotate the cube a bit to the right. Then in side view press r and rotate the cube a bit to the right again. Finally in top view rotate the cube a bit to the left until it looks like on the illustration.

In 3D graphics you have three possible transformations, you can move an object, scale and rotate it. You can choose different centers around which the scaling or rotating will take place. For example with the first button (see Fig.6) pressed the object rotates or scales around a center that would be there if you put a bounding box around all objects. With the third button pressed you rotate or scale around the red and white cursor.

[center of transformation]
Fig.6 Buttons for different centers for scaling or rotating

By the way if your Blender screen is too small and only part of the window menus are displayed you can move it to the right and left by holding the middle mouse button down while moving the mouse in the menu.

Now make a render (press F12) to admire your work! Make sure that the Shadows button in the Display buttons menu (F10) is pressed to see the shadows the sphere and cube create!

 

Saving your image as .jpg

Perhaps you want to save your image in a format so that you can put it on a website or print it out. To do this return to the display button menu (F10) in Blender. Left where /render/ or something similar is displayed you have to specify the directory and the filename where Blender should save the image. Make sure that the directory exists as otherwise Blender just won't save it without necessarily giving you an error message. Next press the OSA button and press one of the numbers below. The higher the number the higher the quality. The OSA button is like antialiasing in 2D programs. It improves the qualtiy a lot but also slows down the rendering process. If you want shadows the Shadows button should also be pressed. In the next column change the End:250 field to End:1 as our picture is a still picture and no animation. Then choose the size your image should have in the next column and change the format to jpeg (or whatever of the available formats you want your image to be saved in) and also decide how big the quality should be. Now press the anim button and your image is saved as jpg ( note however that when you search for it e.g. in the Gimp it is not shown there with the extension .jpg but with a number at the end).


[final image]
Fig.7 The result

I hope you enjoyed your first trip through the world of Blender. Next time we are going to build a little toy train.

Have fun and happy blending! :)
 

References



Webpages maintained by the LinuxFocus Editor team
© Katja Socher
"some rights reserved" see linuxfocus.org/license/
http://www.LinuxFocus.org
Translation information:
en --> -- : Katja Socher <katja(at)linuxfocus.org>

2005-01-14, generated by lfparser_pdf version 2.51