Tutorial: Animating a Speaker!

Speaker Effects

This is a tutorial that I’ve been wanting to write for a while. Now when a tutorial catches my eye, I will usually give it a read through regardless whether its a Maya or a Blender tutorial because I take the view that its the idea that is important not the software, 3D applications have their similarities and have their differences. The fun part is working around those differences, to produce a similar or maybe an even better result. One such tutorial was posted at computerarts.co.uk entitled “Sound and Vision”. Its deals with creating and animating a speaker with a matrix like visual effect added to it. Now up to certain point in that tutorial it is pretty easy to follow, it when we get to the rigging and animating that blender user may get lost.

Modeling the speaker is pretty straight forward and similar steps can be taken as in the original 3D studio max tutorial, by using the spin tool. What’s the spin tool? Following the link, and read the section on Spin and Spin Dub, its not long read and will most likely come in handy in future projects.

If you don’t want to model the speaker then you can use my speaker model, which can be found in “Scene”(you can download the file at the bottom of the page), I advise you to use my model firstly, so that we are all on the same page, after that you can go ahead and make your own. I would never model anything without first having some kind of general idea of how it works. I found this nice website that does just that http://www.bcae1.com/speaker.html. Now during the modeling process we don’t have to model every single component, all we need to do is model what will be seen, any thing else it just wasted polygons computations which will slow down rendering. There are three objects that make up the speaker and they are the cone, frame(includes casket) and spider. Its important to have the cone and spider as separate objects.

Alright lets begin the rigging. (if you get lost refer to Scene 2 in the project file)

First things first select the spider object, press Shift+S and select Cursor->Active(this will snap the 3D cursor to the spiders center point).

Press Shift+S in 3D view

Add an Empty your scene(hit your keyboards space-bar Add->Empty. We will use this Empty later on in tutorial). Name the empty something like uh… “link”(I’m terrible when it comes to naming objects)

Select the spider again and go into edit mode, select all the vertices(press “A” button twice)

Now hover the cursor of over the buttons window, Press F9 to show the editing options. Look for the panel that has Link and Material.

Under Vertex Groups click on New(this will assign a vertex group to the spider), change the name of the Group to something like “frame”, the default Weight: value should be 1.000 if not make sure that it is. Now press the Assign button.

Press Tab to go back to object mode, then press Ctrl+Tab to go into Weight Paint mode… your spider should now be red not blue.

Weight value of 1.000 assigned to the spider

There are two ways you can do the next.

Firstly click Tab to get you back into edit mode, all the vertices should be selected, press and hold Alt+shift then using the RMB(right mouse button) select the outer most edge loop. Press Ctrl –(minus), you’ll notice that selection area decreases to the next edge loop, continue pressing Ctrl – until you have unselected four edge loops.

Select the edge loop and press Ctrl -

Now the spider should be thought of as a spring, the outside is rigid and fixed to the frame, while the closer you get to the inside the more flexible it will become. Red colour(vertex weight value 1) being the most rigid while blue(vertex value 0) being the least. Go back to the vertex group weight settings, change the value to 0.8, and press “assign”(if you press TAB you’ll notice that the colour of the selected area has changed in weight paint mode).

Press Ctrl – a few times to reduce the number of edge loops, lower the value of the vertex weight a little more and press the Assign button then repeat. What you really want, is by the time you make it to the two inner most edge loops the weight value should be  0. The spider in weight paint mode should look similar to the following.

Frame weight paint

Now create a new vertex group called “movement”, select all the vertices’s of the spider and assign them the weight value of 0. Now believe it or not we will repeat the previous few steps but instead of going from red to blue(weight value 1 to 0) we will now do the opposite, blue to red(0 to 1). The “movement” group being the opposite of the “frame” group.

Movement Vertex Group

I did mention that there was another way of doing this and that is using the weight paint brush to paint in the values.

Once you have finished with the spider we will now move onto the cone object.

Select the cone and  do the same as you had done to the spider object assigning weight values to the object.  Its important to give the vertex groups of the cone the exact same names as the spiders.

Do the same for the cone as you did for the spider

Select the spider again, then using Shift+S to reposition the 3D cursor, add an armature to the scene. In edit mode select the tip of the bone and point it in the direction that the speaker is facing. Add another bone this one you do not have change its orientation this will make it easier to select one bone from the other. Select the center of the each bone and rename them, the bone that is pointing in the direction of the speaker is called “movement” and the other “frame“.

Naming Bones

Select the cone then the spider and lastly select the armature, press Ctrl-P(Makes the armature the parent of the cone and spider) ->Armature->Dont Create Groups.

Select the armature, Press Ctrl+Tab(enters Pose Mode), now select the bone called movement. In the constraint panel, add the “Copy Location” constraint. Where is says “Target OB(object):” type in the name of the empty, “link”(Remember that Empty we added earlier),  you will know if everything went to well if you the grab the Empty and move it back and forth, the speaker cone and spider should move as its supposed to.

The rigg is almost complete.

Now add a Plane object to the scene and place it  just behind the speaker, and then modify it like so, by subdividing the edge closest to the speaker.


Select the Empty, hold down the Shift button and select the Plane (both the plane and empty should be selected).

Hit Tab to go into edit mode and select  the center vertex.

Press Ctrl+P a message should come up saying”make vertex parent“, click on it.

So you may be wondering what the hell we just did, well in simple terms I want that one vertex to be the parent of the Empty, so if the vertex moves the Empty will move and if the Empty moves the speaker cone and spider will move too. You may or may not of known that a single vertex could become a parent to an entire object… well if you didn’t you do now.

Alright lets get animating

Select the plane and go into edit mode, now select that middle vertex again that controls the speakers movements and drag it back just a little along the Y axis. Go back to object mode, look in the edit options window for a panel with the heading “shapes“, click on it and add an a new key shape.

Basis Shape key

If you don’t know what shapes keys are I’ll try and explain. Shapes keys allow you animate the objects mesh(the vertices), if you can imagine it is extremely difficult to animate a characters facial expression just by using your the standard rigging system, think of all the bones you would use. It far simpler to model each expression or facial movement. For example a left eye wink as one shape key a right eye wink as another, and a smile key. If we combined those three keys we would get the face of someone smiling with both their eye’s closed. The great think about shape keys is that when you get your head around how they works it becomes and extremely useful and powerful tool during animating process. Read more about it here.

Add another shape key, name it beat, go back into edit mode and move that vert in the opposite direction as you had it before, return to object mode.

Beat Shape Key

I have created a layout specifically for this project. Look to the top of the screen you’ll see a drop down menu with the following “SR:2-model“, select “speaker“. In the sequence editor load the audio file called “bass_beat2.wav“(I made it with LMMS, there a link to the program on the left) that came included in the zip file speaker_animation. Make sure that the audio strip starts on the 0 frame position.

There’s a article on sync and scrub in the blender manual once you have read it activate the the sync and scrub options.

Now comes the time consuming part of this tutorial. Find action editor window, next to the “key” button, a menu shows the current mode which is “action editor” change that to “shape key editor“.

The shape key “beat” has appeared in the action editor,  click on that triangle that pointing right, notice the slider. Click on the slider, it will leave a key-frame. Now scrub across(click and drag to you right or left in the sequence editor, you’ll notice the vertical bar following your cursor) looking at the sequence editor you should see a visual representation of the sound file. So where there is a high spike chances are there will be a loud sound, click on the slider at value 1 for a load sound, then if there is little or no sound you click and drag the slider to value 0, and as you scrub through the sound file adjust the beat slider accordingly. Unfortunately blender doesn’t seem be an easier way of doing this.

Speaker screen layout

Once your finished with all the scrubbing, play the animation in the 3D view(Alt+A), you’ll notice that the speaker animation is in rhythm with the music.

In the IPO window, click on the Ipo curve in the window(squigly line with dots). There’s an arrow button which points downward towards a yellow-orange square in the menu bar, click on it(It acts just like a copy button for IPO curves).

The final thing we need to do is add some effects to the speaker

Add another vertex group called “shoot”(because it will shoot the particles), assign all the vertices a weight value of 0. Go into edit mode select the center most vertex of the cone. Assign that single vertex a weight value of 1.


Press F7 in the buttons window and find the particle buttons, add a particle system.
Copy the following settings its a fairly simple set up.

Particle settings

First setting we will change, can be found under Emit from: by default there is an option that says Faces change it to Verts. For the amount setting you can add more than 120  but at this value there will 1 particle generated for every frame. The end value determines when the particles system will stop generating particles. Life setting displays how long each particle exist for, 1 particle will live for 15 frames.

Next setting to be changed it velocity of the particles. We will use “Normal” here with a value of 5, but you can experiment with these settings. Make sure the Render: Emitter button is pressed in else the cone wont be rendered.

Lastly in the “extra” panel where it says Vertex group: select the density option and select the vertex group called “shoot”.(I want the particle to exit out of a single point, remember we created the “shoot” vertex group  and there was only one vertex with a weight value, this tells blender to only emit from that vertex).

Currently the particles will render out as halos, its really not the effect I was looking for. Instead I will use an object for the particles.

Lets add torus to our scene, use the following settings and scale it along the Z.

Torus Settings

Then change it orientation so that its facing in the same direction as the speaker. Find out what the objects name for the torus is,  torus.001 or torus. Go back to the particle settings for the cone, in the visualization panel select the menu option “Object”. And enter the Torus objects name for OB:

Tours settings

Now you should see another torus appear on the cone,  it may be off center but if you move the tours up towards the center of the 3D view(grid floor it should solve the problem), you will also want to move the torus a little bit in front of the speaker.

Now the last thing is to do is add a bit of variety to the particles because as they are now they will all be generated the same size and come out at the same speed.

Make sure that cone is still selected go back to the IPO window and change the “IPO type” to particles.  Add an new IPO Datablock to the scene(confused? its right next the those two arrows buttons, one pointing up and on pointing down). Now in that window on the write there a list of words(it actually a bunch of settings). Look for the word “size” click on it and press on the arrow button that point upwards (this will paste that IPO ccurve we made with the shape key beat. Repeat with E size and E speed.

Particle IPO

So what did we just do? Well we are simply using the information from the beat IPO to help produce particle animation, and applying it to the particles settings. In beat a large spike in the IPO curve would mean that there was a load sound and a load sound will have a large particle(size and E_size do that). Be aware though that you might have to scale the IPO curve along the Y Axis to produce bigger particles all round (just select them and scale as you do in the 3D view), the E_speed further adds variation to the particle(you might have to scale that too).

Last thing that needs to be done is going into the particle settings again, find for the bake panel and set the end settings to 150 and then bake the particles

And that should be it.

Just place the Plane, Armature and Torus object in another layer so that they wont be rendered.

Vector blur helps with the rendering effect of the particles. You can have a look at the render and material setting in the project file in Scene 2.

You can down load the project file here: speaker_animation.tar.gz , speaker_animation.zip

I hope you enjoyed this tutorial 😀


About this entry