A Blender Tutorial

Jaymz Campbell (jaymz@eviljaymz.com)

Blender is a very capable and full featured 3D graphics program which also lets you put together videos with sound, edit images and generate particle effects and 3D text very easily, and all for the cost of the time to download it. Blender is just one of a number of great (and totally free) software packages created by volunteers all around the world.

In this tutorial I'm going to show you how to create a pulsing “heart”. The aim isn't so much to make things realistic but to give people just getting to know Blender something a little different to follow along with and inspire them to explore the many features of Blender.

When I first opened Blender I was overwhelmed with what was in front of me and for many years I installed it as a curiosity, never getting beyond rendering a coloured cube, or a few coloured cubes if I was feeling adventurous. It's not until the past year that I've given over some proper time to learn it and it has been so much fun. I'm a developer professionally so 3D work is something I do to relax and have fun with and I've learned a lot from reading guides and posts at the blenderartists.org forums, YouTube videos and the blendernation.org news site. This is my attempt to add a little back after a year of 'leeching.

If this is one of your first tutorials I hope you learn a few new things. I'm going to look at lattice & wave modifiers, animating a texture and exporting and mixing in audio with a rendered movie in the sequence editor. Hopefully this is a little off the beaten track if all you've been exposed to so far is a bit of box modelling.

What I'm using

I am using the latest stable release of Blender as of this writing (2.49.2). Blender 2.5 is due out very soon and has a totally reworked UI but the underlying core and the majority of the buttons are still named much the same. However, if you're following this and running 2.5 you will have a different looking program to the screen shots you'll see but the button/setting/panel will be there. Somewhere.

I'm running Blender on Kubuntu 9 (again, a totally free operating system if you're interested in a change), as Blender runs on practically anything with a compiler, this won't be any problem if you're on Windows or Mac OS X etc but if you think my window border looks a bit weird that's why.

Lets Start

First off, everything by hitting A and then X and enter. You should have an empty window now with just the grid. Add an icosphere by hitting spacebar and then add>mesh>icosphere. The default settings are fine. You should have something like the following:




We're going to use this as the base for our “heart”. I'm calling it that because it should end up looking like a pulsing sort of lump. Not a cartoon style heart but a more anatomic one. It would be a nightmare to try and move each vertex of this icosphere, instead we're going to “mould” this using a lattice.

First we need to add a lattice object. Your 3D cursor should still be in the center of the icosphere if you haven't moved it by accident (if so you can get it back by selecting the icosphere with a right click and then shift+S to pull up the snap menu.

Hit spacebar to bring up the main menu and Add>Lattice (it's down at the bottom). If you didn't change the size of the icosphere your lattice will be a bit small. Scale it up by pressing S and then dragging your mouse til it encompasses the icosphere.


For a bit of control we'll change how many segments the lattice has. Switch to the editing panel using either F9 or clicking the square icon on the panels strip. One of the panels will say Lattice and there will be three rows, U, V & W. These are essentially the X, Y, & Z axis of the lattice and changing these will add more subdivisions to it. Set each to 3 will do. Your lattice will now look like a cube after its been subdivided once.


We'll come back to the lattice in a minute, first we need to link it to the icosphere. Select the icosphere and, staying in the Editing panel, click Add Modifier and select Lattice. In the Ob: box type the name of the lattice object you want to use. You'll see if you click on the lattice and look at the Links and Materials panel of the Editing section the OB:field with the name in it. By default it will be Lattice.


Our lattice is now linked to the icosphere and if we switch back to it and go into editing mode (by hitting Tab) we can move the vertices of the lattice and it will push and pull the icosphere mesh in a smooth way. There are plenty of benefits to this and one of them is that by animating and modifying the lattice and not the original mesh we can very easily change the shape without having to model every vertex.

You will probably want to move the view from flat to a more “natural” 3D view. Middle clicking in the 3D view will let you orient the objects as you want. Move a few of the lattice vertices slightly. You'll notice the mesh bulge and bunch up in response.


It doesn't look very natural so lets make it smooth. Switch back out of editing mode by hitting Tab and select the icosphere. Go to the editing panels and back to Add Modifier and add a Subsurf modifier. The default settings are ok. What this does is subdivide your mesh however many times specified (for display & a separate value for rendering) without you committing to that permanently.

Your underlying mesh is much simpler to edit and work with yet when you view and render it it becomes much smoother. Subsurf'd meshes are used just like normal meshes and modifiers will act on the subdivided mesh not your original geometry so you can use them to bump up detail easily.

Also on the Editing tab under Links and Materials is the Set Smooth button. Click that to have the faces smooth between each other rather than being harsh.


Select the lattice again. Now we'll see why using a lattice is such a convenient way to work with meshes. Make sure you are at frame 1 (shift+left arrow or via the Timeline top header menu) and in Front Ortho view mode (numpad 1).

Animating the beats

In the view window hit the I key to pull up the Insert Key menu. This tells Blender what you would like it to record the position of in that frame. We just want to work with the location so pick Loc.


Blender has now stored the location of our lattice at frame 1. Move to a few frames ahead, say 20 (up arrow twice moves 20 frames ahead). Using the manipulator (the blue/red/green axis in the middle), click and move the lattice. You'll notice that the mesh changes shape as it moves “through” the lattice. This very easily and quickly gives the mesh a pusling feeling. Move it slightly up, not too much to exaggerate the effect, and then hit I again and select Loc to key the position in.


You can get a quick idea of how it will look as an animation by hitting Alt+A to start the animation. I have set my end frame to 100 (you can change how many frames you have in the Render panel under Animation, there are other places too depending on your particular window layout and active view).

Our animation only moves the once. Which is nice but we'd really like it to repeat. Keying this manualy would be tedious, instead blender allows you to extrapolate IPO curves. An IPO is blender speak for a curve that describes how a particular variable changes over each frame. With your lattice still selected open the IPO editor. In your 3D view on the bottom left will be a grid icon. Click it and select Ipo Curve Editor.


You will see the movement of your lattice as a selection of curves on the graph. All the usual shortcuts work here, S will scale, G will grab, you can control+click to place new nodes etc. This consistency is one of the nice things about Blender.


Select all the curves by hitting A. The dots will turn white rather than black. We want the curve to repeat periodically. Hit E to bring up the IPO Extend Mode menu and choose cyclic. This tells Blender to repeat this curve over and over for the whole timeline. As we just moved the lattice up it will look like a series of slanted lines.




This makes the lattice jump back and to the beginning, we want a smooth repetition. Hit Tab to go into edit mode and right click to select the top node of the first cycle. It is a normal Bezier curve so we can edit it just like a curve we've added to model with. Right click the far right control handle and hit R to rotate it slightly. All your IPO's should “hump” over.


Click to accept the rotation and then right click the node in the center, not the handles and drag it down towards the tail of the next cycle by using G and the mouse.


Now switch back to the 3D view and hit Alt+A to view the animation. It should have a pulsing up and down motion with a slow then fast easing and for something so simple it shouldn't look too bad.

Using cyclic extrapolation and then editing the curves to line up is a easy way to get animations that run for many frames easily without keying them in individually. You could have a propeller object and simply rotate it 360 degrees in 10 frames. Then using the IPO Extend Mode menu you can have it continue forever into the future or bounce back and forth etc.

To show how to edit the curves I did a few extra steps. For complicated motions you should fully key in each “rough” segment and then go to the IPO editor and tweak & cycle the curves. Had we keyed the lattice moving up and then back down we probably wouldn't of needed to line the curves up.

For a bit of extra movement and realism we'll also add a Wave modifier to the isosphere so that its wobbling slightly also as it moves through the lattice. The settings I've used are below. You can play around with it. If you want to use the Wave modifier on other meshes remember it works best when there are plenty of vertices to move. So the default cube wont do much but subdivide it a few times and you can get great “jelly” effects without the expense of setting up the physics. Using Wave with a subdivided plane is a common way to setup a basic sea.



Adding materials and textures

Select your icosphere and in the click the round button on the panels menu or hit F5 and then click on the red ball icon to the right of the panels menu. In the Links and Pipeline panel click Add New. In the panels that appear, under Material click on the color swatch next to the Col button and set it to a darkish red.


To give the “heart” some lumpiness we'll add a texture. Hit F6 to switch to the textures panel (or click the leopard spot icon next to the red ball) and then click Add new. Texture Type will appear, click “None” and in the menu that appears choose Musgrave. The default settings are ok.


Switch back to the Materials area (F5/red ball) and you'll see that the preview sphere has splotches of pink on it. On the far right click onto Map To and you'll see the various parameters that this texture can influence on our material. We want it to change the height of the mesh so click on Nor. In amongst the settings sliders below those buttons adjust the Nor slider to around 2. Change the hot pink that blender defaults to something similar to the current material color.


Scene Setup

To see anything we'll need to add a camera. Switch to top view (numpad 7) and click somewhere a bit away from our mesh and then spacebar, add>camera. By default it will face the ground. Hit R to rotate and then hit X to rotate solely that axis and then type 90 to swing it up towards our mesh.


If you hit numpad 0 it will switch the view to that of the camera. An Alt+A here to view your animation so far is a good idea. Switch back to top view and now click just to the top left of the mesh and then add a lamp (add>lamp>lamp). This is a general lamp that will illuminate the scene. With the lamp still selected hit shift+D to duplicate it. Your cursor will have a copy of the lamp attached to it, click anywhere to place it. Do this again and position your lamps in a triangle around your mesh. I'm not going to concentrate on lightening much more than that, the 3 general lamps should light everything up enough to see it, lightening is one of the finer things and I could spend pages writing about just that.


Now we're ready to render! Hit F12 and if everything goes to plan you should have something like the following in a window in front of you:




Switch to the Render panel (the last button on the panels icon menu / the picture frame icon) and in the output panel's first field type the name of the file you'd like the animation saved as. Then on the far right on format choose FFMpeg and on the video tab that appears pick a format you have a codec installed for. AVI will probably work ok. When you click on ANIM in the center it will throw an error if it can't create the video file.

You should now have something like the following:

Congrats! You've covered plenty of ground so far!

Animating the Texture

Go back to the 3D view and choose the icosphere if it isn't already. Now open the IPO editor and in the menu saying Object click it and choose Texture.


The curves we define here will affect our selected objects textures. We'll only vary the one field, namely Nsize which will vary the noise size of our musgrave texture we added earlier to give our mesh a more lumpy feel. Click on Nsize on the right, a unfilled box will appear next to it to indicate it will receive nodes as you edit the curve. A value of around 0.1 to 0.2 gives a fine enough appearance for what we want so starting from frame zero control+click on the graph to add some nodes varying gently between these two values.

You might want to hold the middle mouse button down and drag the mouse somewhat to vary the resolution of the graph to get the control you need.


Now go back to Render and hit the ANIM button to re-create your animation. You should notice it has more detail as the noise size changes over time adding to the wave and lattice effect. You can imagine just how difficult creating something like this would be if you had to animate each face by hand.

With the non-animated texture we get the effect of the mesh having a solid “skin” which inflates in the animation. Having the texture animated, which remember is controlling the normal of the mesh in the materials map to setting makes the “skin” itself change over time and move as well as the overall motion. It helps to make it look a bit more organic.

Finishing off – The sequence editor

You can put together animations and other video & audio sources along with effects like wipes & glares with Blender very easily. Create a new file by hitting Ctrl+X and then enter. Switch to sequence view by choosing Sequence from the top header menu. Blender lets you save your window layouts in groups and this is the built in one thats suitable for working to composite our clips and audio together.

Click on Add>Movie and then navigate and select your video file you created earlier.


With your file it will be “stuck” to the cursor just like when you duplicated the lamps. Drop it down by clicking on the timeline when its aligned with frame 1.





Now we need a heart thumping sound. You can use google (try searching with .wav at the end) or a few special sound search engines like findsounds.com. Another way is to make your own. I used Hydrogen to create a small drum loop with just the kick sound exported to WAV. Hydrogen is a pretty addictive application to play with. It also has quite a number of drumkit libraries. If you're into music creation its definitely worth a look. Whatever sound you find go back to your timeline and click add and choose Audio (HD). Drop the audio file in just like the movie. You'll quickly get the hang of dropping in media and moving them around. They stack on top of each other just like layers in most graphics programs only you're dealing with sounds & movies.

You can grab and move items just like normal objects in the 3D view. Duplicate your sound a few times with shift+D and arrange them for the duration of your movie. You can preview it just like a normal animation with Alt+A. You can click and drag the sequence strip to update the top right preview image. Use that to position the heartbeat sound as the mesh is “inflating”.

Now to export it go to the Render tab and ensure you've ticked Do Sequence under the ANIM button. If you can't hear anything in your exported movie click on the Audio tab and ensure you have Multiplex Audio ticked and choose a format you have a codec installed for. Again if Blender cant export, it wont so try until it does work.

And there you have it, a pulsing heart from just a icosphere along with a quick tour around putting your rendered movies together with sounds. Blender really is an amazing piece of free software. If you combine it with Inkscape & GIMP you have a fairly powerful environment to make some very nice things with. If you're interested in making your own sounds definitely checkout Ardour, audacity, hydrogen and zynaddsubfx.

Download the blend file