3D Gallery | Blender Tutorials | Dance Workshops | Essays | Letters | Quantum Entanglement | Technobabble | Contact

Blender Tutorial

by Dave Jarvis
Last Updated: (none)
Blender Version: 2.43

Thunder and Lightning

This tutorial shows how to use the Audio Analysis tool to automate lightning flashes from a thunder-infested sound file.


You will need:

The Audio File

When you save the storm's audio file, put it in a known location. For the purposes of this example, the location of the audio file will be:


Audio Analysis

Use the Audio Analysis tool as follows:

  1. Change the Buttons Window to the Scripts Window:

    Revealing the Scripts Window

  2. Scripts » Misc » Audio Analysis

    Audio Analysis Menu Item

  3. Review the default options for the Audio Analysis tool:

    Audio Analysis Tool Buttons

  4. Click Open to find and select an audio file to analyse.
  5. Click Power to graph the Power Levels (volume) in the audio file. The canvas area should display the wave form data corresponding to the audio. For example:

    Example Power Levels

    The progress meter at the top of the main window will update during analysis.
  6. Change Power Min: and Power Max:.
    Only audio data between the two lines will become part of the Ipo curve.

    Adjusted Power Threshold Values

    Volumes will differ from file to file. You will have to play with these numbers to find the correct volume range for your purposes. For loud sounds, increase Power Min. For quiet sounds, decrease Power Max. You can see their effect on the canvas: the top line (red) represents the maximum threshold value; the bottom line (green) represents the minimum threshold value.
  7. Click Plot.
    The progress meter at the top of the main window will update during analysis.
  8. Optional step: View the console for error messages.

Assign the Ipo Curve

By default, the Audio Analysis tool creates an Ipo curve for light source (Lamp) energy (Energ). Assign it to a Lamp in the scene as follows:

  1. Click SR:2–Model and change it to 1–Animation.

  2. Click RMB to select the lamp.
  3. Change Ipo Type from Object to Lamp.

  4. Change the IP: datablock name to WavIpo.

  5. The curve might appear similar to the following:

    Audio-based Ipo Curve - Visually Chaotic

  6. Press CTRL-MMB and drag the mouse make the curve human-comprehensible:

    Audio-based Ipo Curve - Visually Appealing

Lights and Sound

Reduce the amount of time it takes to render the animation.

  1. Change the Scripts Window back to the Buttons Window.
  2. Press F10 for the Scene's render buttons.
  3. Setup the Render panel as follows:

    Render Settings

  4. Render » Render Animation
  5. Click Play.
  6. Create video via mencoder:
    mencoder mf:///tmp/*.jpg -mf type=jpg:fps=25 -ovc lavc -oac copy \
      -audiofile /home/blender/audio/storm.wav -o storm.avi

THE END - Download Video

3D Gallery | Blender Tutorials | Dance Workshops | Essays | Quantum Entanglement

Copyright © 2007-2008 by Dave Jarvis