|This document is available in: English Castellano Deutsch Francais Italiano Nederlands Russian Turkce|
by Katja Socher
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
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.
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 :)
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:
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).
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.
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.
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).
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.
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).
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.
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).
Webpages maintained by the LinuxFocus Editor team
© Katja Socher, FDL
2004-08-21, generated by lfparser version 2.47