I have been searching and searching for a way to get 3D sound in my games in Blender. Just this past week, I decided to ask my friends over at GameBlender.org how to do it, and they helped me out. Now, I am going to share the wealth of knowledge with you.
Step 1: Opening Blender
As always, you will need to open blender. Split the workspace however you want and open the Audio panel in one of
Step 1: Opening the sound and setting it up
Split the workspace and open the audio panel in one of the workspaces.
Now that you have the audio panel open, it is time to load a .wav file. It is absolutely imperative that you load only mono .wav files (Blender can only read mono .wav files when dealing with 3D sound). To learn how to convert stereo .wav files to mono .wav files, CLICK HERE. Now, load the mono .wav file, and continue. To load an audio file, click on the button in the following picture and browse for the audio file and click “Load”.
Now, select the object you want to apply the 3D sound to, and go to the logic brick panel (F4) Set up your logic bricks to play the noise. For mine, I am just going to have an always sensor, and controller, and a sound actuator (loop ping pong). Compare what you have with what I have here:
Now, go to scene in the buttons panel (F10), and click on the sound block button(). Open up the sound you are using, and push the 3D sound button. If the button is not available, then you are not using a mono .wav file. When you are done, you can mess with the range, doppler value, velocity, and any other values you want. Again, here is a picture of something similar to what you should have:
Now, make sure your object is close to the camera, so you can hear the sound (as the sound is determined by the distance of the object from the active camera). If you cannot hear your sound, then here are some things to check:
- Check your logic bricks to see whether you have the sound set to play (if everything looks okay, try using the logic bricks I used just for testing purposes.)
- Check volume settings in the sound brick tab (in the scene tab), and the volume for the sound in the Logic Brick panel (F6)
Here’s the completed .blend for you to compare to: Download 3Dsound.blend (NOTE: If you cannot hear the sound, turn up your volume)
I would like to thank Raider (from the gameblender.org forums) for showing me how it’s done.