3D Sound in Blender

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
the workspaces.

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”.

 

Logic Bricks

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:

 Testing

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)

.Blend Download

Here’s the completed .blend for you to compare to: Download 3Dsound.blend (NOTE: If you cannot hear the sound, turn up your volume)

Acknowledgments

I would like to thank Raider (from the gameblender.org forums) for showing me how it’s done.

About these ads

17 Responses to “3D Sound in Blender”

  1. ben Says:

    oh and ty ive been looking for a tutorial on this for ages i just couldent find 1 its great!!!!!!!! :-)

  2. Richard Perkins Says:

    You’re quite welcome. I’m glad you found what you needed :)

  3. Carl Says:

    That’s it. everything’s set up except for the 3d sound button under the scene audio panel – it doesn’t even show up. I d\led the sample file and it mysteriously appeared. Did I miss something?

  4. BGE Tutorials Says:

    It will not appear as so long as your .wav is a stereo wave file. You must convert it to a mono wave file (in which I have a tutorial on). If it does not appear, make sure you have that you have the right file opened(select it in the drop-down list in the audio window). If it still does not appear, make sure that the Sample is “Mono” (using my image as a reference.

  5. Carl Says:

    Heck yeah! It works great! BTW, that was a really fast response-thanks.

  6. BGE Tutorials Says:

    No problem :D

  7. McBain Says:

    Great. someone email me saying if this works with whole songs.

  8. BGE Tutorials Says:

    It works. I designed it from scratch, and tested it several times on different machines.

  9. Nice Says:

    thanks a lot for this tutorial, I tried .wav file and it didn’t work and now i know this is beacuase it was stereo, thanks, it helped a lot.

  10. Glauco Says:

    This did not work until I installed OpenAL which I found at
    http://connect.creativelabs.com/openal/Downloads/Forms/AllItems.aspx
    Then it worked fine.

    PS I use Win XP.

  11. dante Says:

    Awesome Thanks alot for this tut ;)

  12. Random T. Says:

    If you ever want to read a reader’s feedback :) , I rate this article for four from five. Detailed info, but I have to go to that damn msn to find the missed pieces. Thank you, anyway!

  13. zimroxo Says:

    cool tutorial, but the sound doesn’t work on your project file or mine…the volume is all the way up too…

  14. Joey Says:

    Seems as though sound output is buggy on OS X. I get no sound, though trust me, the volume is turned up.

  15. Van Says:

    Thank you so much!

  16. hi Says:

    some sound files cannot be run in blender 3d. I don’t understand why it doesn’t work


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: