Important! Please read the announcement at http://myst.dustbird.net/uru-account.htm
Also! Please read the retirement announcement at http://myst.dustbird.net/uru-retirement.htm

Difference between revisions of "Basic Sounds"

From UamWiki
(Created page with ' ==Sounds In Uru== First you need to understand that there are several kinds of sounds in Uru. You have Background Music, NPC Voices, Sound Effects, and Ambient. There are volum…')
 
 
Line 1: Line 1:
 
 
==Sounds In Uru==
 
==Sounds In Uru==
  
Line 76: Line 75:
 
you can use:
 
you can use:
  
   bacgroundmusic
+
    
 +
backgroundmusic
 
  ambient
 
  ambient
 
  SoundFX
 
  SoundFX
Line 91: Line 91:
 
You can use a program like Audacity to make ogg or wav files. It's easy, and it's free. Here is a link to download it:
 
You can use a program like Audacity to make ogg or wav files. It's easy, and it's free. Here is a link to download it:
  
[url=http://audacity.sourceforge.net/download/ Audacity]
+
[http://audacity.sourceforge.net/download/ Audacity]
  
 
If you are going to use one of Cyan's sound files, you can, but you can only point to it in the script. You can convert it to a wav file too if you need to but:
 
If you are going to use one of Cyan's sound files, you can, but you can only point to it in the script. You can convert it to a wav file too if you need to but:

Latest revision as of 13:26, 4 January 2011

Sounds In Uru

First you need to understand that there are several kinds of sounds in Uru. You have Background Music, NPC Voices, Sound Effects, and Ambient. There are volume controllers for all 4 different sounds.

Then, you can break it down even further if you wanted to, based upon what the sound in for or what it does:

Ambient Sounds : these are sounds that play as soon as you link in, and continue to play.

Triggered Sounds: these are sounds that play due to an action the avatar performed. That action may be as simple as: walked into an area. These sounds may or may not keep playing.

Putting in sounds can be very simple, or very complex. What determines that, depends on what it is you are trying to do. I'll start simple, and work my way harder and harder with the tutorial.

Sound Files: Ogg or Wav????

Okay, there has been confusion about this topic. Questions ranging from "What is a ogg file?" to "Why can't Blender read an ogg file?"

An Ogg file is basically a very compressed Wav file. To give you an example, the ogg file that plays the music we hear in Er'cana is only 6.4 MB big. If you convert it to a wav file, it's over 52.2 MB big!

Uru's game engine, Plasma, uses the ogg files. Yes, you'll see wav files in a folder called Streaming Cache, and those are made by Uru during the install process. They get used for special situations that I'm not going to cover here. During normal game play, the ogg files in the SFX folder are what get's used instead, and when we make our Ages, and include our own custom made sounds, we include ogg files as part of the files that we upload to the ULM. This makes the uploads smaller and much smaller files for you to download.

However, there is a problem. If you are using the official PyPRP Plugin of 1.5.0 or earlier, you will have to use a wav file to tell Blender about the sound. The other problem with this, is that if the filename of the wav file is more than 12 characters, Blender chops the name off, and will give you a export error.

The reason that last part is important, is that Cyan has given us permission to USE their sound files (just don't copy and upload them). However, 90% of the sound files have very long filenames.

The next version of the plugin will be getting around this problem, and I will change this tutorial to reflect that. For now, I'll stick with how it's done for 1.5.0 and earler.

NOTE: YOU MUST BE USING PLUGIN VERSION 1.0.0 OR HIGHER IN ORDER TO USE SOUNDS.

Okay let's get started........



Just adding a background sound.....

Okay, let us say that you have some wind in your Age. Just a quiet light sound in the back ground.

We need to put in something called a Sound Emitter. A Sound Emitter is simply a marker put in your Age that tells Plasma that sound will be emitted from this point. So let's do that.

Place your cursor in your Age where you want the sound to go. If it's a ambient sound that will be heard everywhere in the Age, then it does not mater where you place the sound emitter.

To add a sound emitter, go up to your menu and click on Add then Empty:

Sndtut1.png

When you do this, you'll have a X, Y, Z coordinate arrow point put in, looking like this:

Sndtut2.png

Now change the sound to a name that means something (Default is called "Empty"). In this case, I'll call it "windemit"

Now we put in the ALCscripting for it:

Sndtut3.png

windemit is the name of my emitter. You can call yours what ever you want, just so long as you put the name of the object here.

type: sound emit, is saying that it's a Sound Emitter.

Flags:

- autostart tells Uru to start playing the sound as soon as someone links in. - looping tells Uru to keep playing the sound over and over.

file: campbravodt_wind is the name of the OGG file that is in the SFX folder that Uru will play.

Volume: 0.55 is how loud the sound is. This can be set from 0 to 1.

type: SoundFX this tells Uru what KIND of sound it is, and which volume slider will affect it. Technically, I should have called this "Ambient" instead of "SoundFX" as it's an ambient sound. Since I called it SoundFX, the SoundFX volume slider in Uru will be the one to affect the volume of the wind, not Ambient.

you can use:


backgroundmusic
ambient
SoundFX

There is another setting for NPC Voice, but I have not used it, and the GoW Wiki does not show what you set for this.

NOTE: This is VERY important. I made the mistake of simply making all my sounds "backgroundmusic" one time. I had someone contact me and said: "I can't hear any of the sounds!" Turns out they don't like the background music all the time, and had their volume control set all the way down to off. This of course made all my sounds not audible because I had said that they were ALL background music. So make sure you label the type of sound right.

Okay, next, you need to actually put the sound in Blender.

To do this, first you MUST have a wav file. Blender CAN NOT READ OGG FILES!!!

You can use a program like Audacity to make ogg or wav files. It's easy, and it's free. Here is a link to download it:

Audacity

If you are going to use one of Cyan's sound files, you can, but you can only point to it in the script. You can convert it to a wav file too if you need to but:

Do not include or change the name of any of Cyan's sound files. You can use their sound files, but because they come with the game, there is no reason to distribute them with your Age.

Once you have a wav file, you can add it to Blender by doing this:

Change one of you windows in Blender to the Audio Window. Click on the little up/down arrow and click on OPEN NEW

Go to where you wav file is and select it. That's it. That's all you have to do:

Sndtut4.png

Okay, now you can export your Age and when you link in you'll hear the wind every where you go.



Questions with Answers

What if I only what the sound to play once when I link in?

Easy. Simply DO NOT include the - looping line in the scripting.

What if I want the sound to not be hear every where, but only in one spot?

There are two ways to do this:

3D Sounds and Softvolumes. I'll cover those in the next post.

What if I want the sound to get louder as I approach something, and fade away as I go away from something?

Again, that would be 3D Sounds which I will cover next.

What if I want to trigger a sound. Like my avie clicks on a button, or something happens when he/she gets to some part of the Age?

This is a triggered sound and will be covered under 3D Sounds since 99% of these types of sounds will be 3D.


Return To: Andy's Blender Tutorials