Today we’ll make a simple music visualizer. I’ll be using the 2.81 version of Blender.
You will find the final animation, the blend file and the audio file music.wav on Github. Use the Github – Blender link at the top of the sidebar or, for a direct link to this project’s repository, click here.
Using the displace modifier and a texture we’ll make a plane dance to the rhythm of the music. We’ll be using the following elements and techniques:
- video sequencer
- add soundtrack
- stucci texture
- displace modifier
- graph editor
- bake sound to f-curves
- align camera to view
- output properties
- file format
- encoding
- render image
- render animation
If you want to watch the video first, here it is:
And here are the steps:
Table of Contents
Step 1 – Preparation
Delete the default cube and save the file as Music Visualizer.blend.
Open a new window by dragging down the + sign that appears when you hover your mouse cursor over the upper right corner of the 3D View editor. Set the editor in the new window to Video Sequencer. You can do it in the upper left corner.
Step 2 – Open File in Video Sequencer
Download the music.wav file and save it on your computer. Here’s the link : music.wav
Open the file in the Video Sequencer : Add -> Sound
Step 3 – Set End Frame in Timeline
On the green soundtrack you can read that the soundtrack consists of 741 frames (A). Set the end frame in the Timeline editor to the same number (B).
Step 4 – Add a Plane – the Base of the Music Visualizer
In the 3D View editor add a plane and scale it : S 10
Step 5 – Subdivide the Plane
Go to edit mode. Subdivide the edges : Edge -> Subdivide. Set the number of cuts to 100.
Step 6 – Create a Texture for the Music Visualizer
Go to object mode. Go to the Texture tab and create a new Stucci texture. Set Noise Basis to Cell Noise (A), Pattern to Plastic (B) and Type to Hard.
Step 7 – Add a Displace Modifier
Go to the Modifiers tab and add a Displace modifier. Set Texture to the Stucci texture you just created.
Step 8 – Keyframe the Strength of the Modifier
Now we are going to animate the strength of the modifier. First go to the first frame in the Timeline if you’re not there (A). Then keyframe Strength in the Displace modifier by hovering your mouse over it and hitting I on your keyboard (B).
Step 9 – Graph Editor
Switch the Video Sequencer to Graph editor. Make sure Strength is selected on the left.
Step 10 – Select the File to Bake to F-curves
Now we’re going to bake the sound to F-curves. Go to Key -> Bake Sound to F-Curves and select the audio file music.wav.
Step 11 – Bake Sound to F-curves
Hit the Bake Sound to F-Curves button. This is what the Graph Editor now looks like:
Step 12 – Play the Animation and Watch the Music Visualizer in Action
Play the animation to see how the displacement works:
Step 13 – Add a Material
Add a material and set its base color to hex E78F2F (A). Go to Rendered shading (B).
Step 14 – Change World Color
In the World settings change the color to black.
Step 15 – Set the Light
Go to front view. Select the light and position it above the plane (A). Change its type to Point if necessary (B) and set its power to 5000 W (C).
Step 16 – Align the Camera
Now it’s time to position the camera. Around frame 130 the displacement reaches one of its extremities. Go to that frame and orbit in the 3D View editor until you’re satisfied with what you see. Then align the camera to view (View -> Align View -> Align Active Camera to View.
Step 17 – Make a Test Render
Still at frame 130 make a test render (Render -> Render Image).
Step 18 – Output Settings
If you’re satisfied with that, you are ready to render the animation. First some settings: In the Output Properties select an output folder where your animation will be saved (A). Change File Format to FFmpeg video (B) and under Encoding change Container to MPEG-4 (C). We’re going to add the audio in Blender, not in an external software, so set the Audio Codec to MP3 (D).
Step 19 – Render the Animation
Save the file and then render the animation (Render -> Render Animation). This will take a while. You can see the progress in the upper left corner.