Visualize Audio with your Music
Blender 3d tutorial
One of the more fun effects that I have discovered was the use of sound to animate different things in Blender. Basically, if it can be animated, it can be controlled by sound.
To create a visualization for sounds or music in Blender 3D, we will set up some basic text and materials, animate our text using the sound of your choice in the F-Curve editor, and go over how to tweak the result with F-Curve modifiers.
To start, let's delete everything in our scene except for the camera. Our final scene will consist of a camera, some text, and a plane to act as the backing wall.
Let's position our camera before moving on. You can do this by changing the Location and Rotation settings in the right hand toolbar in the 3D View window. You can access this panel by pressing N. Since we are going to go for a top down view, we'll change the settings to those shown in the image to the left.
So that we will be able to see the glowing effect that we are going to add to our text, we need to add a plane for the glow to shine on. Once you have added the plane (Add -> Mesh -> Plane), scale it up by a factor of 10 or so, plenty enough to fill the whole view of our camera.
Now we can add some text to our scene (Add->Text). Feel free to edit the text to say whatever you would like. When ready, go to the Object Data panel in the Properties window.
There are two things you will definitely want to change with your text. The first is changing the extrude value in the Geometry section and the second is changing the Align setting to Center in the Paragraph section.
As you can see, I have also changed the font of my text, changed the word and letter spacing a little bit, and made a small positioning change. Of course, what you do is up to you. Feel free to use whichever font you like and whichever other changes you'd like to make with the text.
Making it Glow
To create the glow effect, we are going to add a simple material to the text. With the text selected, go to the Materials panel in the Properties window. Then add a new material for our text by clicking on the 'New' button.
For now, we only need to change the color. The color can be anything you like, just make sure that the color you choose is bright or it will not glow very well. I decided to go with blue.
While you may be tempted to change the emit setting, there is no need to. Instead, right click on the Emit setting in the Shading section and click on Insert Keyframe. The field should turn yellow. We do this so that we are able bake sound to that setting, which we will do a little later.
For glowing to work, we need to turn on Indirect Lighting. You can find this setting in the World panel. Simply check the box in the Indirect Lighting section to activate it.
Even though we've just turned Indirect Lighting on, it may not work yet. In order for Indirect Lighting to work, we also need to change the Gather method from Raytrace to Approximate. Indirect Lighting only works with the Approximate setting.
Now we are ready to move on to animating the glow.
Animating the Glow
Before we start animating, let's change the screen layout. You can find this setting at directly to the right of the Help menu. Just click on the drop down button and choose Animation. Your screen should look similar to this.
You should also be able to see the F-Curve editor on the left side of your screen. In there is listed all of the objects and their settings that have keyframes assigned to them. We should only have our Text object with the Emit setting show up here.
Animating our Emit setting to some sound (or music!) is quite easy from here. Make sure the Emit setting is selected in the F-Curve Editor, then go into the Key menu and you should be able to find 'Bake Sound to F-Curves'. After clicking on that, just choose the sound file you want to use and Blender will do the rest!
Animating the Scale
Now that we have the basic glow animation complete, lets do the scaling of our text. This is nearly the same process as with the Emit setting, so I'll go through it a little quicker.
First, select your text. For the scale setting to show up in the F-Curve editor, we need to add a keyframe for scaling. To do this, press I in the 3D View window and select Scaling. You should see it appear in the F-Curve editor.
Then, for each of the scaling directions, X Scale, Y Scale, and Z Scale, bake the same sound you chose before by going to Key -> Bake Sound to F-Curves. Watch out though! The sound will bake starting at the frame you are on. So if you need them to start at the same time, be sure to double check the frame before baking your sound.
If you do a test run of your animation (Alt-A) you'll see that the scaling is pretty ugly. To fix this, we'll use an F-Curve Modifier. To view modifiers for F-Curves we need to open up the Properties sidebar, by pressing N.
In that sidebar, there should be a section labeled Modifiers. With one of the scale settings selected, click on Add Modifier and select Envelope. This modifier allows you to create an envelope to fit your F-Curve into.
What we want to do is shrink the range of values that our sound curve cover. In the modifier click on Add Point and change it's minimum value to 0.80. You should see the curve shrink in height and two white dots marking the bounds.
After that, use the copy/paste buttons next to the Add Modifier button to apply the same modifier to the other scale settings.
There isn't anything major to do now other than tweaking and adding materials as you see fit. I won't go over that, for fear of making this tutorial too long, however, what we do have is some text that has some glowing and scaling that matches the beat of the sound or music you chose.
Also, don't forget to add the sound in the sequencer and make sure your output includes audio or you won't hear anything after you render!
You can what I did in this video, after quite a bit of tweaking. Sorry, no sound!
No single tutorial will cover everything, so if you want to dig deeper, here are some resources for you to check out. If you have other resources you think I should add to this list, feel free to let me know!
- Audio Visualizer with Python, CGCookie
- "Monstercat" Audio Visualization, sirrandalot
- Creating an Audio Visualize, Tahemus