Blender

Blender is a complete and very complex 3D solution to work with 3D https://www.blender.org/. Blender can create animations, complete videos, has a game engine and physical simulations. Blender has a python interface to automate tasks in modifying objects and all other things. Blender comes with lots of tools to do video processing. Those tools have a complexity of other standalone tools.

Since it is a very complex program, with a not very intuitive but efficient user interface, and lots of tools that are not obvious to know what they are about, it is recommended to read a book as the following:https://www.blender.org/manual/ and then look at some video tutorials.

https://www.blender.org/manual/getting_started/index.html The manual gives a good description but might be a lot to read to do know what it is about.

There are also very nice videos on youtube.

3D Objects to be downloaded can be found at http://www.blender-models.com/

Blender is available for many platforms and there are many ways to install it.

Under Linux a trouble free way is to download and un-tar.bz2 it and then run directly from the directory without the need to install anything. Obviously it can also be installed as the distribution has foreseen it. For windows there also portable version that run from Memory stick without installation.

If there is an issue with the graphics card of the PC try User Preferences (Ctrl+Alt+U) then Window Draw Method in the drop-down menu in the center column and LIBGL_DRI3_DISABLE=1.

The Blender windows

Blender has its own windows called areas (other synonyms window frames, frames, windows, workspaces or editors) inside the desktop window where it runs. Those areas have their own behavior that differs from the regular behavior of the windows on your desktop. The areas can not overlap.

Since in those areas an editor runs, the term editor is often used. So everything is an editor even the Info editor that pops up on top and allowing you to do the common stuff as save a file and open help.

As with any desktop environment, when having too many windows or in case of blender areas opened, the overview gets lost, especially to blender novices. When too many areas are open in blender all can be seen, but are simply too small. Having a big screen helps.

The areas have a triangle on one edge to easily identify them. The triangle edge is usually on top right but can also be on bottom left of the areas. Shift + LMB and drag this triangle creates a new new desktop window containing a copy that can then be moved as to a second monitor or virtual screen.

Some areas contain sub-areas, also identified by the triangle edge. Next to the the triangle edges there can be a area header.

The areas, not the sub-areas have on the left an icon showing what blender editor type resides in the area and allows selecting an other one. Multiple blender editors of the same type can be opened at the same time.

When hovering over the edge of an area a double arrow appears. Right clicking opens the Area Options menu where Split Area or Join Area can be selected. Split Area splits an area into two areas and therefore creates a new area. Join Area makes out of two areas one area and therefore deletes an area. Left clicking on the double arrow allows to adjust the size. An other indication that the blender user interface is simple is that just blender editors can fit into a area. Which editor it is can be selected by the icon on the area. Knowing this, the blender desktop is quite intuitive and easy to be used.

A good way to start working with blender is to have 4 areas open and select the following editors inside the areas:

  1. The info editor (blender calls everything editor) shows a pull down menu with the commonly used commands as save and quit.

  2. The 3D view editor is the most used tool showing the 3D objects.

  3. The Outliner editor shows you what objects have been put into the 3D space and allows to select them using their names. Once selected the objects can be modified.

  4. The Properties editor contains all settings for the renderer plus physical settings.

Just one Area (the one where the mouse cursor is) is active and takes the key strokes.

The 3D view editor

When Blender is started a 3D cube inside the 3D view editor appears. There are important commands to know, since those get very often used. Using the pull down menu is possible, but will be slow due to the many steps necessary and is therefore not the preferred way for the often used commands. However the pull down menu has the logic to group commands so similar commands can be found.

Important

Use a mouse with 3 buttons since the middle mouse button is used often!

Important

When importing stl set the blender units to millimeter and check with Num0 if the camera render distance is enough to get the complete part. If not increase the clipping end in the properties editor (not the 3D view editor) by selecting the camera and clicking to the Data icon (not the camera). Under Display there is also the limit checkbox, when checked a line appears that shows how far the rendering works additionally it gives the direction. A good method is adding an empty mesh and selecting the camera and then the mesh and have the camera tracking it.

To get familiar practice with the 3D cube:

Note

There are abbreviation for some keys as Num5 means the key 5 on the number keypad.

Caution

Don't mix it up with the 5 above the alphabetic keys, since this would select layer 5.

The buttons of the mouse have also abbreviation as MMB the middle mouse button

Note

The MMB is used for viewing, therefore avoid pressing LMB and RMB.

Table 11.1. Basic viewing commands

Ctrl + X 3D View> Object > Delete Erase all selected. Info > File > Load Factory Settings will Get the default cube
Ctrl + Z 3D View > Object > Undo Undo last step
Shift+Ctrl+Z   Redo last step
ESC   Cancel selection before it does anything that requires undo
A   Toggles between selecting all and nothing
Middle mouse button MMB (or press the scroll wheel) and move the mouse. An alternative is: Pressing Alt plus left mouse button (LMB) and move the mouse.   Rotate the view (2 Axis horizontal and vertical screen axis)
Press Shift + middle mouse button MMB (or press the scroll wheel) and move the mouse   Top pan (shift) the view
Turn (SCROLL) the mouse wheel   Zooms in and out
Num5 (5 key in numerical key block) 3D View > View > View Persp/Ortho Toggles between orthographic and perspective view
Num1, Num3, Num7 3D View > View > Right/Front/Top Views used as for technical drawings (select View Num5 to Ortho) .

Important

The grid can be seen when looking with 90° to the planes.

Num0   Camera View

Important

The camera has a clip distance. Everything beyond will not be visible.

Z   Toggle back and forth between solid mode and wireframe mode
Ctrl + Alt +Q   Toggles quad view X,Y,Z and camera, this allows especially for beginners to see waht is going on but for an more advanced user it occupies too much screen area
Shift + S   Opens Snap menu to snap cursor or selection to grid
Ctrl + up   Full screen of current window
Ctrl + down   Exit full screen
Shift + Space   Toggle full screen


Note

If the keys do not behave as described, then you might have a conflict with the window manager, that has the same key stroke combination assigned to other things.

Figure 11.5. 3D cube

Blender


The 3D view editor shows the cube, the camera and a light source. The camera is the eye of the render.

The red-and-white striped circle with black cross-hairs is the 3D cursor that points where 3D actions will happen.

Be aware that a right click affects just 2 coordinates work happens on a 2D computer screen. This can be best observing when alter different views Num1, Num3, Num7. Shift S (Object > Snap) opens the snap menu and the cursor can be place to what is selected. Or Shift C to snap it to the origin of the coordinate system.

With the outline orange highlight the cube selected, the orange point is the pivot point and shows the center of rotation and scale. The gray circle belongs to the blue, green, and red arrows showing the coordinate system. Be aware there are different coordinate systems, the global one and every object has its local one.

There are two sub-areas (tool shelf on the left and a properties shelf on the right), they can be made visible either by: View > Tool Shelf or View > Properties, the hot keys T or N or by dragging the horizontal area in and out. A little + icon appears when the areas are hidden.

The object mode

The object mode is the standard mode of the 3D view editor.

In the object mode a scene can be created where different objects can be placed.

To get an overview about the objects on the scene it is advisable to have an additional area open containing the editor Outliner.

Blender has up to 20 layers, this is quite useful in many ways. It allows to group and hide what you don't like to see, but also prevents from selecting unwanted objects. The regular number keys above the alphabetic keys (not the ones on the numeric block) selects layers. The M (Object > Move to Layer) button lets move an object from a layer to an other.

To insert an object place the 3D cursor there where you want the object. Then info > add > mesh > monkey

Press Delete or X to delete objects.

The pull down menu groups the commands in:

View > commands that do not edit anything on the scene
Select > selects objects
Object > modifies the selected object

To select an object RMB click on it or click on its name in the Outliner. Shift + RMB allows to select more then one object.

The A key (Select > Select/Deselect all toggles between select all and select nothing.

Then press tab that toggles between Edit and object mode until you are in object mode, or just select the correct mode in the user interface.

G goes to grab mode to move an object (Object > Transform > Grab/Move)

R goes to rotate mode (Object > Transform > Rotate)

S goes to re-size mode (Object > Transform > Scale)

Once in G, R, S mode values can be entered. This can be done with moving the mouse, using the arrow keys, typing in a number (the blender units) where Tab selects the next number field or using the properties sub-area View > Properties (hot key N) to get the transform panel where the values can be entered. The values can be limited as for G mode to an axis by pressing either X,Y ,Z or a by snapping to a grid by either pressing Ctrl or activate the magnet icon. It is very important to know if those values refer to the global or to a local coordinate system.

Easier is it to use the 3D manipulator where grab, rotate and scale can be selected. grabbing click on the axis you want and drag the mouse, the object will follow staying on it.

Figure 11.6. 3D manipulator

3D manipulator


The orange pivot point is the center of an object, scaling, rotating and other functions are based on where the pivot point is.

In Object mode the pivot point follows the object when it gets moved. However the pivot point can also be moved. First place the 3D cursor then Object > Transformation > Origin to 3D cursor.

Creating objects

A good and fast way of creating objects is using the standard objects as cube and cylinder and modify them. After adding the tool shelf in the 3d window holds parameters of the mesh you added. If it is a cylinder you can modify those parameters and create a 6 edge prism. There is the Properties sub-area of the 3D view editor the dimension can be changed and its rotation and position.

Very important to know is that the object still remembers its original values as size, location and scale. Some operations refer to that and not to the actual values. Once happy with the object, the command Object > Apply will take the current values.

Similar as on mechanic tools the object can be modeled. Using the blender boolean modifiers allows to glue two objects together or dill a hole.

Figure 11.7. Object

Blender Object


When objects are created they should have the center (orange pivot point) of their local coordinate system on an corner. Per default it is in the center, this point is the original of the local coordinate system and determines the position of the object in the scene. Additionally they should be rotated correctly and having scale set to 1.

Figure 11.8. Putting boxes and cylinders together

box


For technical drawings the blender unit must be linked to millimeters. This is done in the properties editor after clicking the scene icon. For objects in the size of a hand, 1 blender unit = 100mm = 10cm gives a good result.

Figure 11.9. blender units

Blender untits


When taking care about the grid, coordinate system, sizes and having snap activated, blender can be used as a mechanical 3D CAD tool. Some python scripts would be handy to automate sequences as to drill a hole. See http://blendermama.com/precision-work-in-blender.html

Blender comes with a measure add on that can be enabled to get distances:

Figure 11.10. Measure Add on

measure


To work with it go in edit mode and select two vertices, then press on the update selection button and the distance between those points is shown.

Hierarchy between objects

Different objects can put into a hierarchy so moving or rotating the parent object makes the child object to follow and therefore the constellation does not break apart. However the child objects can still be selected and modified individually.

To create a hierarchy you might change to wireframe mode Z to see better what gets selected. Then select the child objects first RMB (or Shift + RMB to select multiple ones). The last one appearing yellow will become the parent when pressing Ctrl + P

The outliner will nicely show the hierarchy. Alt + P frees the objects from the hierarchy. Sometimes not a clear parent node can be selected among multiple candidates (as two cameras form a stereo camera). A clean way out of such situations is using an empty and make it to the parent. An empty is an invisible point in space and has not even a single vertex (but it has rotation).

An other way is creating object groups. There is not really a view where it can be seen what objects belong to a group. However if selecting a group member then its line become green and no more orange. In the properties editor the group or groups can be seen where the object belongs. As an example grouping is used for the Tool shelf > Rigit Body Tools to assign parameters for the physical simulation (when not doing the old fashion way using the Game engine to create key frames).

The edit mode

The edit mode of the 3D view editor is to modify the mesh of the objects.

The pivot point therefore does not move when the object gets moved.

A blender novice can easily get lost when ending up with it. Many times especially for square or cylinder shaped technical objects it is not require to use it, since the objects can be modified in object mode with commands as resize, rotate and then issue the Object> Apply command. In object mode objects can interact with other objects using modifiers and when clicking on apply a permanent change is made.

However the edit mode has to be used to edit complex shaped objects as used in computer art.

Important to notice is that everything you do you do to one single object, even if you add a second mesh, this second mesh takes part of the first one. If you want to create a object from scratch you can add a cube go in edit mode and delete it and then start.

The edit mode has 3 sub modes selectable by buttons to choose if you want to work with vertices, edges or a faces.

The pull down menu groups the commands in:

View > commands that do not edit anything on the scene
Select > selects objects
Mesh > modifies the selected vertices, edges or faces

As in Object mode many commands as the grab/move, rotate and size can be applied and are therefore no more discussed.

Working with vertices edges and faces

Working directly with vertices, edges and faces should be avoided, since more efficient ways exist. But it is a good exercise to understand what is going on. And to create profiles it can be quite helpful.

RMB selects (or de-selects) a vertex

Ctrl + LMB click creates a vertex and an edge is created automatically between it and the last selected vertex. To close a loop, Shift + LMB to select the two vertices and Mesh > Edges > Make Edge/Face ( or F or Alt+ F fills larger holes).

Now go to edge mode and select all edges using Ctrl + LMB then do again Mesh > Edges > Make Edge/Face to create a face.

In edge mode select extract and create a profile with the shape of the area.

To create a 3D object other faces might be created in a similar way. If the Mesh gets messy Dissolve can clean it.

Caution

Be aware when making objects out of faces, that faces have an inside and an outside. Edit mode View Point Shading > Texture shows it nicely when it is wrong and Tool Shelf Normals > Recalculate fixes it, alternatively the faces can be selected and flipped.

Figure 11.11. Mesh display

Mesh


When in Edit mode the properties panel shows the normals, one face is intentionally flipped in ant therefore missing the blue line and other face is selected to show its angles.

Every mesh could be done this way, but this would be really painful therefore blender offers many more efficient methods.

A simple way to create a 3D object is creating a face with the desired form and then selecting it and extrude (pulling out) see extruding.

There is the Limit selected to visible button, this allows to just select visible items as vertices. This might cause problems when in orthographic mode since vertices overlap and are therefore not visible.

There is B box select to select all vertices inside a selected box. Similar works C the circle select, where the mouse wheel changes the diameter of the sphere.

Mirror editing should be used on things that are symmetrical. Since most of things are symmetrical, this is a very nice feature to work efficient and precise. The concept is you do one side and the computer using the mirror modifier does automatically the other side for you. To select this mode go to the properties window and select the button with the wrench. Then add the modifier Mirror. Don't forget to press apply when in object mode to get the mirroring permanent. For mirror copy objects, set the pivot in the middle then Shift D to duplicate the object and press ESC to not moving, then pressCtrl+ M to mirror it. You will be asked what axis.

Instead of using the pivot point also an object can be used as the mirror. If no object make sense to be used as mirror add an empty object, rename it like center of the universe and use it just for the mirror purpose.

The spin mode allows you to copy objects multiple time on a circular curve.

The subdivision surface modifier, makes a rectangular object smooth. There are to parameters the view and the render, to adjust rendering and viewing separately. To make it even smoother you can press to smooth (or flat) in the 3D window tool shelf.

To clean up meshes there is Mesh > Vertices > Remove doubles and Mesh > Faces > Tris to Quads might reduce the faces significantly.

Extruding

Having selected a face press E for extrude, the vertices get copied and edges are put between the newly created vertices and the originals. To pull out using the mouse works, but better is the use of the arrow keys or just type in a number (the blender units).

Note

Extruding works in two steps, first vertices on top of the selected are created and then they got pulled. If the pulling step gets canceled the newly created vertices remain on top of the originals and might cause confusion.Ctrl + Z removes them.

Extruding can be combined with scale. Extruding works just on the axis of the original face, if you want extrude in an other angle, extrude first and than drag. Or select extruding region from the Tool Shelf (Press T) then a lot of options can be set as the axles and x,y,z coordinates.

Note

MMB click while extruding gives you freedom to extract in different angles

Subdivide

A good working method is to keep the surface of an 3D object always intact and extract new things out of it. To do that an big area must be divided into smaller areas. Subdivide does this with edges but also faces.

An un-subdivide does not exist. Too get rid of too many polygons the decimate modifier exist. The ratio 0.5 should give a good result without distortion of the objects shape.

Spin

The spin command Alt + R (or via Mesh tools) allows to spin a 2D curve (adding vertices to form edges in edit mode) and creates an object like the ones manufactured on a lathe (turning machine).

Special menu

With vertices selected press W and the special menu pops up. Commands are:

Merge that merges all selected vertices so all move into a single one.

Subdivide creates new edges when applied to a face and therefore the area is divided. If it is done on an edge, then a vertex is added and the edge is divided.

Creasing

In reality edges are not as sharp as the computer draws them. Rendering such objects would look therefore unrealistic. Instead of modeling not very sharp edges manual the crease method can be applied. In the button window, you find the button Add Modifier in the sub-window having the Modifiers tab. Select Subsurf and increase the level from 1 to 4, the default cube becomes a sphere. In edit mode you still see the original cube. Shift + E and mouse click lets you transform the sphere in a creased cube.

Modifiers

Modifiers as the the array or the mirror modifier copy your work. This is quite efficient when similar thing are used more than once. So avoid drawing too much and let the modifiers do that for you. You can apply more than one modifier to an object, in this case the modifier are put on a stack and are operated in this sequence.

Note

Avoid clicking apply to the modifiers, since this will freeze the effect (as create multiple objects that have to be handled as individuals later on). Mostly you do not want to do that. Without clicking to apply, the the modifiers keep the copies synchronized, so you change something and the modifier changes all derived objects accordingly.

Note

If the object gets resized they still remembers its original scale. The array modifier will then be based on the original and not actual size, so it will not get the expected distances. Using the command Apply Scale will set the new scale to 1.

Some modifiers are easy to understand others need some more explanation:

Decimate reduces number of polygons

Subdivison Surface makes an object less sharp by adding more faces. In an extreme situation it transforms a cube into a sphere

The array modifiers makes a copy, it can be applied twice to create an 2D array of objects.

Mirror does mirroring around the objects origin, so place the origin there where it causes the desired effect.

The modifiers can also do much more as nice mesh operation as cutting a hole into an object. Stick a cylinder inside a cube, then select the cube. Add the modifier boolean with the operation difference and choose the cylinder. The press the apply button and you can delete the cylinder and a hole remains.

Blender Text

Text is not as a mesh, since when in edit mode it can be edited by typing text with the keyboard. In the property editor fonts and others as extrude it to make 3D text can be selected. However text can be converted to a 3D mesh (Alt + C or Object > Convert to).

Making holes

Modifiers allow easy to make holes in objects. Create a bolt (cylinder), consider its segments 16 is mostly ok to drill a small hole. Once happy with length and diameter (blender allows also to drill rectangular holes) execute the command Object > Apply > Rotation & Scale so it takes current scale and direction as default and no bad surprises happens. It is good to keep it on the scene and have it invisible and excluded by the render.

Now stick it into the object on the desired location.

Select the object and add the Boolean modifier and select differences and as object select the drill. Click then to apply to make a permanent hole.

Note

A hole is not round, it contains many faces and therefore a lot of triangles and quads are created. After creating a couple of holes a mesh appears that is too messy. It is therefore wise to subdivide a face of an object first to get a face a little bit bigger than the hole. Then drill the hole in this rectangular face. So all faces and quads created inside.

When more than one hole has to be to drilled then some steps should be done to get easy coordinates for the additional holes. Do again Object > Apply > Location and if you have turned it Object > Apply > Rotation . In the 3D view Editors sub area Properties set Transform Orientation to Local, so the local coordinates of the drill are taken and no more the global ones. You should see now that its location is 0,0,0 since you applied the current position. When done with drilling put the new coordinates and drill the additional holes.

If instead of a hole the drill appears, then it might be that the object has upside down faces. this means you are inside like under water and you are looking in to a air bubble. In this case you need to flip the faces.

Making one object out of two

This is done by RMB clicking the first object and then the second one with Shift + RMB. Ctrl + J with then Join the two and making the first object disappearing from the outliner. Join is just basic it copies on mesh to the other. So some ugly result could happen as internal faces.

An other option is selecting the first and then give it a modifier from the boolean type and select the object to be joined using the boolean operation union. Pressing Apply will modify the mesh of the first object permanently. A difference to join is also that the second object does not disappear from the Outliner and can be reused again.

An other way would be not melting them together but form a hierarchy between objects.

Outliner editor

The outliner editor shows the contents of the blender files and the relation ships between different objects that have a parent child relation ship. Object can be renamed there easily and be selected, made visible, hide modifier results, ....

Create child parent relation ship. Select the object that should become a child, then select the parent and press Ctrl + P.

Every object has three icon buttons to hide, lock and render it.

Properties editor

Every object, camera, light, ... has it properties that can be set here.

Blender Camera

With camera selected go in properties editor and click object data. A lot of camera settings can be found.

The 3D view editor defines a view point but this is usually not what the camera sees, to make it happen go to perspective view (it is assumed that the camera has perspective view setting Num 5 ) and then Ctrl Alt Num0 . Then adjust what you like to see as position, direction and zoom. Use the property window for things as lens angle.

Num0 switches to camera view. If you are not happy with that what you see you can go into camera fly mode by pressing Shift F.Then you can move and zoom using the scroll wheel of your mouse. Pressing CR accepts and exits.

With camera selected and in camera mode R and G work as well

The camera (but also lights) can be forced to look at an object. A good object for that is an empty object that can be placed wherever desired and since it is empty, it is invisible. Select the camera, then the object and then Ctrl + T a menu pop up where you select Track to Constraint.

User Preferences editor

The colors and style and behavior of blender can be configured. When working intensive with the grid, it is advisable to get a brighter color for the grid lines.

Rendering

Position the camera, so it sees what is desired, then press F12 to render view and change to the UV/Image Editor where the result can be seen. F3 saves the image.

In the properties window there is a lamp icon where the light properties can be set as spot light. The withe button is actually a color picker press on it to change the color of the light. Adding a second light above the camera is recommended Add > Lamp > Hemi with intensity 0.2

Since rendering is time consuming there are some things to know to either get a faster preview or to get the desired output. Fast previews can be done with the OpenGL rendering. The picture size is just as expected when 100% is selected. In the Properties area there are world properties that have impact to the render in quality and also render time.

In the property window there is a camera icon this gives the render panel. Blender has its internal renderer, the game engine renderer and the new Cycles Renderer (that allows also some rendering options while in 3D View editor) but it also supports other renderer that can be installed when desired: YafRay, sunflow, PovRay and luxrender

For future releases of Blender it is planned that the Cycles Renderer will replace the Blender Renderer. This change also effects the material properties, the cycle renderer has a less complex material property settings, since it point using the Node Editor for it.

The Blender Renderer supports also Freestyle, this is making just lines and therefore suited for black and white illustrations used in manuals. When Freestyle is enabled than other rendering as Property Editor Scene>Passes Combine and Z should be deactivated. Different line styles can be assigned to edges to differentiate between lines seen and lines not seen. Many lights from different sides are recommended, since it sometimes can not detect edges. Alternatively edges can in the 3D View Edit mode be selected as freestyle edges and then be shown.

Material

In the property window there is the small ball button that opens the material properties.

Materials are assigned to an object. The can be seen in the preview, but new blender version have Cycles Render that is an interactive renderer and allows to see in 3D View editor the effect, this makes the material preview view outdated, since size of textures and so on can be better seen on the object.

The material has 3 colors. Diffuse is its color and specular is how shiny it is (bright spots appear). Mirror can be enabled and defines how it reflects and alters the color of incoming light rays.

Materials created but no more used stay in blender and can not be deleted. However when quitting blender they get deleted automatically.

An object can have different materials on its surfaces. First add a material used to the object, then in edit mode select the face and then the material, assign makes then the job to link the material to the face.

The material can also be applied to the edges, the volume of the object or its vertices that is called halo.

A texture can be an image or even a movie loaded from a file that is added to an object.

Other textures are procedural, that can be described mathematically. Different procedural texture can be selected. When selected a panel pops up that allows customizing the texture. The procedural textures can influence different parameters as intensity, colors, geometry to make fake bumps and many more. This explains it can make sense to apply different textures at the same time.

UV editor

The UV editor is mostly used to show the rendered pictures, but it can be used also for UV unwrapping.

UV wrapping map 2D pictures with the coordinate axis U and V (has noting to do with ultra violet, it can simply not use x and y since this is used in the 3D) to the 3D object with its X,Y,Z coordinates. UV wrapping is preferably used for fast renderings as in the game engine and animations.

Blender has the screen layout UV editing that opens 3D view and the UV Editor. Going in edit mode the Mesh > Unwrap (or U key ) unwraps the object to 2D in the UV editor (as you see there are many different un-wrappers that try their best). The UV editor can generate a UV grid and color Grid test pictures or you can directly use an other picture.

To see in the 3D view editor what is going on, open the properties sub panel (N key) and go to Display and check Texture Solid.

To not start complicated an image can be loaded on a cube and the result is that it appears on all sides of it. In the UV editor the image can be resized and moved around and its effect can be seen in the 3D View.

If the object or the image is a bit more complex then seams can be added to edges in the 3D object. Then the unwrapping uses then those seams. The edges of the 2D image can also be moved and modified.

UV> Export UV Layout lets you export the 2D file as empty mapping drawing just showing the edges ready to be used on an other 2D picture program as gimp. You could also use it to cut out and bend and stretched to do something as a paper model.

Now the image must be brought to the object, a material has to be assigned and then a texture to this material. The texture is the image file. To have the render understand how the image is mapped Properties>Texture>Mapping Coordinates has to set to UV

Particles

An object can send out particles. There are two types the emitter and hair.

The emitter can send out particles that can be configured with all kind of options. Particles can be objects and can have material and halo effect. It is also configurable how they behave among each other and how the physical effect influence them. The outcome can be objects that look as mud, gas or liquids.

Hair are probably not everywhere so select faces and create a vertex group with a name then select the vertices and click to assign. Go in object mode and add now a hair particle system select the vertex group so it does not get too hairy. The 3D View editor has a Particle mode, where you can act as hairdresser and use the comb and cut it. Finally there can be a lot of physical effects assigned so the hair moves when its object moves.

Movie

A simple movie can be done with the default cube. Press Num0 so you see what will be in the movie. Open the Timeline editor and go to frame 1, select and position the cube and then pressing the 3D view editor the key I.The insert key frame menu pops up where it can be selected what will be stored.A yellow line indicates a key frame

There is also the red record button (Automatic Keyframe insertion for objects and bones) that inserts keyframes automatically each time something gets modified at the green line location.

Note that the Timeline Editor belongs to the selected object (or in case more than one is selected then to the selected objects), so you could add an additional object (or use camera or light) and edit there the Timeline.

Move the cube and create other keyframes until you are happy. Check the start and end frame. You can now play the movie.

You can also render it, select as output avi jpeg and not png, otherwise you will get a series of png pictures.

The way how it behaves between the keyframes can be modified using the graph editor. It shows the object properties (not just position, rotation and scale) as time graph. The curves can be edited graphically but there is a side panel where the values can be edited. This side panel has also modifiers as adding noise to the movement.

If the keyframes can not be deleted with Alt + I go into the Graph editor and to it there.

There is also the DopeSheet Editor where keyframes can be moved in the time axis and other operation can be performed

For animation and games there need to be more flexibilities how objects move and change than the Timeline editor allows. The DopeSheet editor includes the Action Editor where sequences can be stored as actions and be used in different ways no longer be fixed linked to the time scale.

The NLA editor lets then combine such actions and have them repeating. There are option to smooth in movements as shaking a hand and start walking.

Adding bones

Bones can be added to form an armature. The armature will become the parent object of the body and not vice a versa. Adding bones is done in object mode on the place where the body is. This way two objects exist. Additional bones will be added in the edit mode, so one armature with multiple bones exist. If a bone is selected in edit mode, chaining bones is easy, put the cursor where the chaining bone should end and click Ctrl+ LMB. Usual beings have all bones chained together. Blender does not have the restriction that bones are linked together, so a body might end up with more than one skeleton.

Armature and Body are created as separate objects but to work the armature must be set as parent objects of the body. This is done by selecting first the body and then the armature (bones are yellow, and body orange) and followed by Ctrl+ P and set in the parenting menu Armature Deform > With Automatic Weights. The result can be observed in the outline window.

There is an armature and a bone context in the properties window. When having selected a bone, the armature context shows properties to the armature where the bone belongs (including the name of the armature) and the bone shows name of the bone and it properties.

Now you can go in posing mode where you can select the bones and then rotate R, drag G the bones (S works as well). The center of the rotation is the pivot point of the armature. If it is too much twisted Alt+G and Alt+R brings the selected bones back.

To make a movie you need the Timeline editor and set 1 for the first frame. Go in posing mode and bend the bones and do the key frames.

Video sequence editor

The video sequence editor can be considered as a standalone program, where different movie files (strips) can be put on different tracks and be blended in and out. If present on time then they overlap in a hierarchical order (high tracks are on top). It is also possible to just add pictures for a certain number of frames as on the lowest track a background picture.

With two strips selected Add > Effect strip can will blend into the other using an effect.

Node Editor

The node editor is used to manipulate videos. Things as video in video can be made.It has something as logic blocks (the nodes) that can be connected with each other to get the desired effects. The source of the video is the movie clip node and the destination the Viewer node (or composite node to save it).

Figure 11.12. Node Editor

Node editor


Using the node editor anaglyph stereo pictures can be created. Two cameras are added. Since just a camera can be active per scene, two scenes are created, but one is linked to the other. The two cameras are attached to an empty (object without a mesh) and form a stereo camera. An other empty is used as focus point, so both cameras look at it, this is done by adding a constraint to the cameras to track it. Ones this works, the node editor comes in place. The two cameras go to a color mix mode that multiplies a colored picture with it. Then both colored picture (red and cyan) go to a mixer mode that adds both pictures. The output goes to a viewer node (to view) and a composite node (to save).

Figure 11.13. Anaglyph stereo

Anaglyph


Having an image can be expanded to having a video, this works straight forward. Alternatively two videos could be recorded and then merged together. Obviously the videos or imaged could be created by a real camera.

Movie clip editor

This is quite new in blender and allows to put animated 3D object onto a movie that has been recorded using a regular camera. The challenge is the video moves and the animated object has to follow,. The technique is therefore called motion tracking and makes use of blenders Movie clip editor.

Coordinate system

Blender uses a right hand coordinate system:

thumb red x
pointer green y
middle blue z

Each object in blender brings in a new local coordinate system that might have an offset to the x,y,z coordinates of the global coordinate system. Additionally the local coordinate system can rotate the axes. The rotation sense also follows an other right hand rule. When the thumb points the rotating axis, then all other fingers point in the positive rotation direction.

Objects can have child objects that will bring their own coordinate systems as well.

There is actually also a coordinate system of your PC screen or window. This is called the view point. It is the way how you look at the blender 3D view windows. This is a 2 dimensional coordinate system: Horizontal and vertical axis. You make use of it when you rotate a view, moving the mouse vertically, rotates over the horizontal axis moving horizontal rotates over the vertical axis.

Blender game engine

It should be noted that Blender game engine can also be used to make interactive animations that are used for things other than games. Ones created they can be exported to a Linux or windows executable.

Since the game engine is a render it has to be changed from the default: Blender Render to Blender Game. This indicates that the game engine is an other renderer and since it has to be fast it can not render as nice as the Blender Render with ray tracing. In Blender changing the renderer has also effects of the property editor, since there a lot of render options as for rendering surfaces and material are located.

Real-time rendering in a game must be fast. Therefore games make use of UV mappings to give a better look. The files for those textures can be packed to the exported runtime executable. This explains why you might be disappointed when your wonderful created surfaces do not appear.

The camera might must follow the game, this is best done by having the camera a child of a vertex of an object. Since vertices do not rotate the camera points always to them. The camera might also be assigned to an object in object mode Ctrl + Num0 assigns it to the selected object. It could also be assigned to a ghost that follows an other object.

After the Blender Game renderer has been selected, the Game menu item with a Start Game Engine command can be started. But a user interface and a behavior needs to be configured.

The logic editor allows to add logic blocks to individual objects, so select the object first. Then a signal has to be created using a sensor block. A common sensor block is Keyboard. The output of the sensor is passed to a controller block that makes in case of one single signal many time nothing else than passing the signal to its output where an actor block can be feed (this is done using an and block with just one input). A common actor blocks is Motion. The actor block Game allows to exit.

A big monitor helps to see the fonts, otherwise Shift + Space toggles into single view or Shift + LMB on a Area triangle and drag out a new desktop window to be placed on a second monitor or virtual screen.

Figure 11.14. Logic Editor

Logic Editor


Note

How the connection lines can be deleted is not so intuitive. They are drawn by LMB on a start point and drag to the other point and they are removed exactly the same way.

There is also a game properties panel, this serves to have game variables stored (as score of the game). The timer data type is a number that is counting up as long the object exists.

With every frame the game engine calculates the logic this is also called logic ticks. Sensors trigger everything, so their common features are important.

Figure 11.15. Sensor

Sensors


Usually an event as a key pressed gives a pulse (an event) and is then evaluated by the controllers and passed to the actuators. The ''' button however repeats this pulse as long (in this case) the key is pressed. The ... button does the opposite it creates pulses as long the key is released. When repeating the Freq: parameter can be set this is the number of frames (logic ticks) between two event pulses. The invert button inverts the sensor output. If Level is pressed then a pulse is created when the state of the object changes. The tap button seems to make just a one time pulse.

Sensors can give just digital outputs, but some sensors as the joystick can give accurate position. Blender can not handle that directly. It however can set a threshold when it triggers, so multiple Joystick axis sensors with different threshold levels could be added.

Actuators can send out messages, the message sensor can react to such messages. Similar things can be produced using properties since there is a property actuator and sensor.

Multiple sensor can be connected to a single controller input (For electronic circuitries this would not be allowed since the sensor outputs are not allowed to be connected in parallel). Controllers have a preference button to have them operated before others.

The game actuator allows to quit the game or start a game from a blend file. A dummy game could load the blend file. This might be interesting for changing scenes or separating game data from executable data to solve licensing issues..

Every object can have a state (a number between 1 and 30) in the game this information is stored in the controller blocks. If the state of the controller does not match the state of its object then the controller is disabled. Simple games don't use states and have all running in state 1 the default. States are changed using the state actuator.

Since python is heavily used in blender controller blocks can be programmed in python. Actuators can not be programmed in python, but the controller block using python can actuate (e.g. move objects directly). Python controllers can get Sensor events from sensor block and act on them end exit. Loops in Python controller blocks should be avoided since if they take very long time blender might crash. Acting on Sensor events and exit immediately once work is done solves this cleanly. Acting on things that can not be found as sensor event (as arrival of a TCP/IP packet) a timer mechanism (Editor > Python > Templates > Operator Modal Timer) can be set up, that checks so every 0.1 seconds if there is need to do something and if not exits.

To create an executable runtime without the need of having blender, you must first make sure that in the User Preferences > Addon > Game Engine is checked. Then File> Export gets the option to create the binary. For Linux ldd <name of the game> shows you dependencies to libraries that needs to be on the system for the game to run.

If blender runs on windows, then a windows exe file and the necessary dll's can be created. Creating those files on a network drive might fail, so do it on drive c:\ and do it as administrator. MacOS and there is Android Blender Player https://www.blender.org/manual/getting_started/index.html is in development.

Such files contain parts of blender and need to be GPL. This might be a problem when the artwork in it would like have a different license. A way out is creating a dummy game that makes use of the Game Actuator to loads in and starts your blend file that is non GPL

Simulate physics

Depending on the renderer used the physic simulation has different settings.

For the Game engine the physical effects to an object are enabled by selecting the objects first and in the properties editor under Physics the Physics Type has to changed from static to something else as rigid body. Start the game engine and if there is no ground plane the object falls down. Add a ground plane that is not perfectly flat and add a sphere. The cube will roll down as well but interferes with the ground plane. This can be corrected by setting collision bounds to box (mesh would work as well but will give more calculation work). It is some work to calculate how it is rolling down, on smaller object doing this work might slow down the system so per default it does not doing this calculation.

The game engine has the record function (stopped by Esc) this creates key frames. The key frames can then be rendered using the regular renders. To create animations like this, requires therefore two steps.

When not doing a game using first the game engine to create key frames and then switch back to the render (Blender or Cycles) to render the animation is cumbersome. In the new blender version physical simulation can be done directly. When having an object selected the 3D View Tool shelf shows the menu Rigid Body Tools. Pressing Add active will add the object to a object group and mark it green. Alt + A (Playback Animation) will then have it falling down.

The Rigid Body Tools can also put constraint to objects in the group as connect them, so something as a chain or rope can be created.

Fluid simulation requires at least two objects, one serves as boundary of the fluid simulation plus the material properties of the fluid, its simulation parameters and has the type domain, the other object serves the object where the fluid comes out and must reside inside the domain object. The type of this object needs to be selected depending on the desired effect. Common types are fluid or inflow (for inflow a speed and direction must be set). This object can be made invisible by moving it to an other layer.

The simulation is started by selecting the domain object and then pressing its bake button.

Scripting Blender

Python 3 is used as scripting language of blender. Open the (editor type) Python Console where you can type in commands as print("hello").

The contents of your blender file is the python object bpy. To know what all is inside this object can press after bpy Ctrl+Space to get the options and to learn about the structure of the bpy object. Select different objects and print(bpy.context.active_object) or/and print(bpy.context.active_object.location) modify the location with bpy.context.active_object.location[0]=1

The following code produces 5 cubes:

add_cube = bpy.ops.mesh.primitive_cube_add 
for locX in range(0, 15, 3):
    add_cube(location=(locX, 0, 0))

Instead of reading the manual you can also made the (editor type) info a bit bigger so you see python commands when you perform some actions using blenders gui. However bpy.context.object.rotation_euler[0] = 0.1523599 needs to be changed into bpy.context.active_object.rotation_euler[0] = 0.1523599 since you loose focus when going into the shell.

A real script is best copied and then executed in blenders Text Editor integrated in blender where you need to

import bpy 

As with any other multitasking environment loops to wait for an action can not be done in in the script since it would probably crash blender. The way out is a modal function that might be called periodically by a timer or by an event. It can then execute and exit and then have blender calling it again. In the text editor there are templates (Code snippets) for modal functions. Loading modal_timer_operator.py in blender text editor and run the script calls bpy.ops.wm.modal_timer_operator() periodically and does change the scene background. With the ESC key it stops. Using the line

self._timer = context.window_manager.event_timer_add(0.1, context.window)

A timer that will be expire in 0.1 seconds is started. When the timer expires the

modal(self, context, event) method is called and the event is usually a TIMER event, so the if event.type == 'TIMER': code will be executed a print("Hello") can be added there and is then put on the console where python is executed from. Adding something as print("Bye") to the cancel method shows how it is stopped.


Linurs startpage