This exercise will teach you some of the basics of 3D graphics and modeling in a free program called Blender. There are many alternative programs used for 3D modeling, but we will rely on the simplest and probably the most accessible solution. If you are still interested in a more professional option, it is recommended to visit the Autodesk website, where you can download commercial applications for free as long as you are a student of PJAIT.
In the beginning, we need to learn the basics of the UI and that can take a little time. Each 3D application has this characteristic that it is quite daunting to learn the basics, which can scare away potential users. Nevertheless, if you persevere and fight your way through that initial hurdle, things become much easier. That is, until you decide to do more advanced works - to create real art, you need a lot of practice and spends lots of time.
We will sadly not be able to afford an advanced lesson on this course, but hopefully this will be enough to inspire some. Just keep in mind, even if your career goal isn't related to 3D graphics in any way, having this skill will allow you to make a pretty picture with ease - whether it is for an application, a thesis, a document or just a simple Christmas card...
The Blender application can be downloaded from http://www.blender.org/. It is one of the most famous and probably most successful opensource projects. After going to the Download section of the website, it is best to download the ZIP version for your operating system and unpack it anywhere on the disk (e.g. on the Desktop). When you run blender.exe (or the file applicable for your version of the system), a welcome screen will appear which you can deactivate by clicking anywhere in the program window. Then, the main window of the program will be displayed as shown below:
This window is divided into several parts:
If you can't see all the tabs, you can scroll through them by dragging the menus using the middle mouse button.
The Blender interface is highly configurable. All of the above mentioned parts of the screen can be changed and moved according to your personal preferences. You can also change each view to a different one. If you look at the bottom left corner of any view, you will find a button with a drop-down menu containing different views you can put in its place.
If you move the mouse between two views, the cursor will change to one which allows you to adjust the size of the view. In addition, in the top left and bottom right corners of each view there is a small area (marked with diagonal lines) that allows you to add a new view. By dragging this corner with the mouse, we can create a new view by dividing the current one into two parts.
However, this must be done with caution! If you add too many views, you can try to delete some of them. If you move the mouse over the corner with diagonal lines located between the two views (one of which is to be removed), by dragging the mouse from this corner towards one of these views a large arrow will be drawn there, and when you release the button - the view with the drawn arrow will disappear:
If something goes wrong and you can't "undo" the interface, you can always select Load factory settings from the File menu. It is worth taking into account, however, that it will also delete everything you have done in the program!
Finally, it is worth noting that this interface is quite contextual. When you move between the views, you can see that the background of the view under the mouse cursor is temporarily slightly darker. This is because all actions (primarily keyboard shortcuts) work only within a view that is currently under the mouse cursor. This way you can have many views of the same type (e.g. 3D views), but pressing a keyboard shortcut will work only in that one which is under the mouse cursor.
Let's focus now on the 3D view and basic methods of moving in space. The main tool for navigating is the mouse. It is best to have a mouse with 3 buttons - without that, using Blender (as well as other 3D modelling applications) is much more difficult.
In addition to the mouse, you can also use the numeric keypad to quickly switch between different views:
What is perspective? In simple terms, perspective means that objects that are close to the observer are perceived larger and those that are far away look smaller. The orthogonal view, in turn, retains the size of an object exactly the same, no matter how far away it is from the camera.
Why is that choice useful? Well, orthogonal views are very important when we model individual objects. In order to determine the exact length of individual edges of a given object, we don't want the perspective to influence the delicate calculations. Therefore, technical and architectural drawings are usually drawn in an orthogonal view and in 3 projections (e.g. from the top, front and right) - thanks to that it is possible to accurately reproduce any object using a ruler on the drawing.
The orthogonal view is, however, quite unnatural for us and navigating in such a space is very difficult. If everything is exactly the same size, it is difficult to say what's in front and what's at the back. Therefore, if we want to determine the positions of different objects in 3D space, it is necessary to use the perspective view.
In the scene there's usually one or several cameras (we will usually work with one). The camera is an object that allows you to determine where and how a 2D image (or animation) will be generated based on the 3D scene. The process of converting a 3D scene into a 2D image is called rendering and the camera is an object that determines the point of view for the rendered image.
In order to position the camera, you can use the same transformation tools as with any object (we'll talk about it in a moment), but there is also a more convenient solution. By pressing the 0 key on the numeric keypad, we go to our main camera (by pressing the same key again, we return to the previous view). While in the camera view, you can press the combination SHIFT - F to switch to the walk navigation mode (it used to be a fly navigation, hence the abbreviation F). In the walk navigation mode we can use the W, A, S, D keys for moving, the mouse for rotating, and Q, E keys for going up and down. After placing the camera in a suitable place, we confirm its position by pressing ENTER key. You can also cancel the position by pressing ESC.
First, right-click the cube in the middle of the scene. We will try to change its position, rotation and size in the scene using simple transformations. If you look at the top left side of the 3D view, you will find the tools in the Transform section:
There are three basic affine transformations (as discussed in the previous exercise): translation, rotation and scaling. There is also one other named Mirror, which is identical to scaling with a coefficient of -1.
It's worth memorizing a few keyboard shortcuts, as they considerably improve the user experience:
After using the chosen transformation, for example translation (shortcut G), the selected object becomes "stuck" to the cursor and can be moved to the chosen place on the screen. The action is confirmed using the ENTER key or the left mouse button. It can also be canceled using the ESC key (or by starting any other action). By holding SHIFT while the transformation is being used, we can slow down the action, which helps with precise object location.
If we start a transformation, as described above, the object will change in all three axes at the same time. By pressing the X, Y or Z keys after starting a transformation, you can constrain its action to the selected axis only:
Similarly, it is possible to constrain a transformation to two axes at the same time:
In Blender, we usually don't use a specific unit of measure. You can set it in the Scene Options tab (on the right side of the window), but it isn't that important. However, the number of these unspecified units can be very useful in modelling. If you start an action, you can type on the keyboard a real number representing some value and this transformation will be carried out by the given value, e.g:
To add an item to a scene, you can use the Add menu. This menu can be found on the bar at the very bottom of the 3D view, or by pressing SHIFT-A on the keyboard. In this menu you can find many types of objects that can be added, but today we will focus almost exclusively on Mesh objects. Removing an object is just as easy - just press DELETE or X and confirm the action by clicking on the button displayed on the screen or by pressing ENTER.
If there are several objects in the scene, you can right-click them to select them individually. In combination with the SHIFT key, you can select several objects at once. By pressing the A key, you can select everything available in the scene, and pressing A again (as everything is already selected) will deselect everything.
In addition to these simple selection methods, it is also worth taking a look at the Select menu located at the bottom of the 3D view. The options Circle select (keyboard shortcut C) and Box select (shortcut B) are particularly interesting. Circle select allows you to select objects by "painting" them with a round brush (the wheel of the mouse changes its size), and Box select is a typical border selection tool, known from many graphic programs, used to select rectangular areas.
The word Mesh is another word for a grid and represents here a grid of triangles, from which all the solids in 3D graphics are composed. These triangles can create larger polygons, but the graphics cards in our computers will work almost exclusively on triangles. If you select a simple shape (e. g. a cube), you can edit it by accessing the so-called "Edit mode". Modes can be changed in the drop-down menu, where "Object mode" is currently written, located next to the Object menu at the bottom of the 3D view:
You can access the Edit mode either by selecting an option from this menu or simply by pressing TAB on the keyboard. In the Edit mode, you can modify only one object. The same applies to other modes, but we will not talk about them during this exercise. To sum up:
Each object consists of several levels in the hierarchy of shape description in 3D:
In Blender you can select any of the three basic levels (remember that you move the whole solid in the Object mode), using the corresponding icons in the menu under the 3D view:
After you have selected one or more of the above elements of the edited solid, you can transform it the same way as before, that is:
In the toolbox on the left side of the 3D view, you can find a lot of useful tools that can be used in the Edit mode. Today we will focus on three of them. The first one is Extrude, which means to press out, to squeeze out, to force out. This tool is often available in various 3D modeling packages and is very intuitive for users (e.g. in the free SketchUp program).
After selecting an object face, you can click the Extrude button or press the keyboard shortcut E and then pull the given face outwards. Try to do the following exercise:
After completing the above steps, you should get such a drawing:
However, you may often lack details to do the extrusion the way you want it. The Loop Cut and Slide is a useful tool for increasing the number of faces in an object. It can be found in the toolbox (slightly lower than Extrude) or by pressing CTRL-R on the keyboard. Initially, it draws pink lines where you want to place the loop cut, and the number of such loop cuts can be determined with the mouse wheel:
By confirming this action (using the left mouse button) you go to the next step, i.e. "slide", where you can determine where exactly this loop cut should be located. If you add two double loop cuts (as shown above), on the side and front of the above model, you will also be able to create a model as shown below:
This tool can also be used for edge extrusion, which results in two-dimensional "stripes" in 3D space, or for the extrusion of single vertices, from which we can obtain lines in 3D. The lines themselves don't have any visible form (just as single vertices), but by selecting a minimum of 3 lines or 3 vertices and pressing F on the keyboard, you can fill the shape with a wall enclosed within them.
The extrusion tool is very useful and can be used as a starting point for many different models. For example, a hand model is usually created starting with a simple cube and using extrusion to pull out individual fingers.
The modelling process often starts with the use of simple solids as the basis which are later modified to produce more complex shapes (such as the example with the hand above). To add more details to the edited solid, Loop Cut or Knife tools can be used. However, there is one much easier tool - the Subdivide tool (a button located directly above Loop Cut and Slide). It divides the faces of the solid evenly - each quadrilateral into 4 smaller quadrilaterals and each triangle into 4 smaller triangles. You can repeat this action by clicking the Subdivide button several times, but you should be very careful, of course, because as you can guess, the number of faces will increase exponentially and after a few steps your computer can overload and the program may crash!
To do the task for grade 3, do the following steps:
Right now, the majority of vertices are at our disposal and we can move them freely to create some interesting terrain, but it can be quite difficult due to the amount of work required. That's why there are several tools that make it easier to perform operations on many things at the same time (in this case vertices). A little bit to right from the selection icons between faces, edges and vertices, there is a button called Proportional Editing:
After enabling this button, an additional menu appears with the tool operating modes set by default to "Smooth". Another way to turn this tool on and off is by pressing the O key (the letter "O").
To finish the task, do the following steps:
Your goal is to create a hill as shown below. If you want to, you can try to use other methods of "interaction" from the menu above (e.g. random or sharp) to create bigger mountains in the background.
NOTE: I recommend saving the project after each task! The program can always crash! It is not necessary to save tasks in separate files. It is enough to show the last task solved.
This task is purely about aesthetics. We are going to talk in detail about materials and rendering next time, but it would be good if the objects were of certain colors so that they would look more familiar.
In order to color the object, you have to go to the panel of materials:
This panel will probably be empty, so in this case you should start by clicking on the "New" button. Without going into details of individual elements, the main color of the object is known as the "Diffuse" color. Change the diffuse color to green.
After changing the color, you will see that the whole object is of exactly the same color. Fortunately, you can assign several materials to the same object:
If you look closely, you can see small "squares" on the surface of the "meadow". This is a result of a "shading" method. Shading is a method of filling individual faces in with a color. In Blender we have two modes of shading:
In flat shading, the edges are visible and in the case of smooth shading they disappear. Why is such a choice useful? Some models require flat shading (e.g. faces of a building, each object with sharp edges) and some require smooth shading (e. g."organic" models such as faces, hands, car bodies), but many of them require both.
Exit the Edit mode and go to the Object mode. Click on the Smooth button in the Tool panel of the Shading section on the left side of the 3D view. To get a grade for this task you should get a multicolor image, similar to the following one:
The aim of this task is to practice how to add, position and edit different objects. To complete it, you have to create a convincing image of a house and place it somewhere on the hill:
In this task you must add your name (or any other original text) to the scene:
Now your own text is written in 3D. Note, however, that when you switch to the Edit mode, the way in which the faces are distributed on the letters is very "chaotic", because the faces have been arranged automatically from very complex curves. The distribution of faces on a solid is often called a topology and is a very important element of modelling. Objects with incorrect topology are difficult to model, can't be easily animated and it's hard to set textures on them.
Fortunately, Blender has a simple tool to improve the topology of simple objects like this one:
The Octree Depth parameter determines the amount of details in the final model. The more details, the nicer the final model looks, but it requires more memory. If you have completed the above steps and now enter the Edit mode, the model will have a much better and more consistent topology:
To get a 5, you should create a more complex model than a house. The suggestion is to create a model of a flower, but it can be something equally complicated (e.g. a tree, a bird, a well, etc.). The advantage of flowers and trees is the possibility to duplicate them in order to get an interesting scene. People who know Blender can even use the particle system to do this "automatically". The following are examples of how the task can be accomplished: