224 Virtual World Design
can control the initiation of a sound, its duration and loudness, frequency of repetition or loops, with simple
LSL scripts and sound clips in the contents of an object or prim. More advanced versions of these sound
scripts control interactive qualities and create prolonged cascading sound effects for a seamless atmosphere.
11.3.1 a BiT aBouT Binaural sound
In the real world, most of us have two working ears that hear the world monaurally, each ear acting like one
speaker or one channel to the audio cortex of our brains. You experience and locate the origin of sounds
by comparing what each of your ears hears and the difference between the signals. This is the essence of
binaural hearing. Not only can you hear sound from all directions simultaneously, but your sense of hearing
also can function in complete darkness to locate the source of the sound—how unlike our eyes, which need
light and function in the narrow cone of our visual eld.
Audio in a virtual space, like Second Life and OpenSim is 3D sound, in other words, a virtual re-creation
of our binaural experience in the real world. This is especially noticeable when you wear headphones and can
clearly hear the location, volume, and Doppler effects. If you use speakers with your computer, the sounds
from each of them will reach both ears, but your binaural recognition is diminished due to sound overlap
and reverberation.
In a virtual world, audio is listened to by the “microphone” on your avatar’s camera. The viewer identies
the coordinates of your avatar in the region relative to the sound emitter. By measuring the distance between
your avatar and the sound emitter as well as the difference in angular measurement between the avatar’s
rotation (azimuth) and elevation relative to the sound emitter, the viewer can calculate the volume changes it
needs to make in the two sound channels to give your ears the sense of distance and location for the sounds
being emitted. From the avatar’s velocity and direction of travel relative to the sound emitter, the viewer can
calculate a pitch and volume change in the sound, which creates a Doppler effect, as your avatar ies by a
sound emitter [6].
Much like a single lightbulb that is radiating light in a large dark room, the sound is emitted in a sphere
from the center of the source and has a “falloff” range that dims it and cuts it off when you are too far away.
That falloff effect is called attenuation in both audio and lighting. Attenuation is a variable that you can
manipulate by changing the volume settings in a sound-playing script.
11.4 BUILDING BASICS FOR A SOUND ENVIRONMENT
Now that you have a deeper understanding of how sound works in a virtual world, you can start to build your
own soundscapes. What kind of sound les do you need? If you look at the Second Life game engine, you
see that it supports the kinds of sound and sound sources discussed in this section.
11.4.1 Types of sound supporTed in VirTual enVironmenTs
According to the game engine database at Devmaster.net (http://devmaster.net/devdb), these kinds of sounds
and compression formats are supported by the Second Life virtual environment game engine:
3D sound. This kind of sound provides us with (1) the location of sound via two-channel binaural
sound; (2) volume attenuation, or the fading of sound volume as the distance between the listener
and the emitter increases; (3) Doppler effect, or the apparent change in pitch as a noise emitter
passes the listener at high speed.
225Sound Design for Virtual Spaces
Streaming sound. This is sound brought in from a website URL through media on a prim.
FMOD. This advanced tool is free to use for noncommercial purposes (http://fmod.org/).
Ogg-Vorbis compressed format streamed. This is a common compression format.
QuickTime MOV video streamed. This is another common compression format.
Doppler effect. Doppler pitch shifting is the pitch-shifting effect heard by a listener as an emitter
moves by quickly.
11.4.2 reQuiremenTs for sound files When imporTing Them To VirTual enVironmenTs
To import sounds into Second Life and OpenSim virtual environments, the absolute requirements for sound
clips are as follows:
1. Sound clips saved as .wav format with the standard PCM (pulse-code modulation).
2. 16-bit/44.1-kHz/mono or stereo (converted to mono).
3. Length of less than 10 seconds. Your clip length can be 9.99 seconds but no longer; an 10.1-second
audio le will fail to upload.
Note: Sound clips for Unity can be longer than 10 seconds in duration. For a “Build It Once” approach, try
building your Unity sound from smaller units less than 10 seconds. Then, you can utilize audio that imports
into virtual spaces like Second Life and OpenSim while maintaining a library for the longer audio themes
in your Unity builds.
11.5 HOW TO CONTROL SOUND IN A VIRTUAL WORLD
Sound-making objects are created and controlled with the addition of LSL (Linden scripting language)
scripts into the objects’ content section via the object editor. The sound in Unity is controlled via C# or Unity
Script (like Java script) or via Boo (a .net language like Python). Assuming you have the sound clip ready to
go, you initiate and control the sound emission with various kinds of scripts that respond to things like avatar
presence (a burglar alarm); avatar touch (a doorbell); the time of day (larksin the day, owls at night); wind
direction (noise from a windmill); or location (parcel limited sound for the dance oor in your nightclub).
The possibilities are practically limitless, just as our real-world sound-making devices are. A source of
scripts and sample sounds accessed by their UUIDs (Universally Unique IDentiers) to test these various
types of sound activators for the Second Life viewers is available online (http://wiki.secondlife.com/wiki/
Audio_Test). Within this old but still valuable wiki are many sources of information for the content creator.
Here, you will nd scripts for playing sound, looping sound, and synching various loops together for a
biggereffect.
If you have a server available, sound clips can be played continuously and streamed on your region.
This technique has been used successfully to create an overall ambiance for themed and gaming regions
in SecondLife. Care should be exercised with this approach, however, as having sound effects that appear
to come from everywhere can seem disjointed and inappropriate to the visitor if there is no visual event or
object to support the reason for the sound. This is best used for Zone and Effect sounds like wind, weather,
and Non-Digetic sounds such as theme music.
Another factor to be aware of is lag and how it affects sound. One way to avoid awkward pauses in audio is
to utilize a sound “preloader” function in your scripting. This will load the sounds when the object is rezzed
in your environment so that they are ready to be activated on a touch event.
226 Virtual World Design
11.6 WHERE TO OBTAIN SOUND FOR YOUR 3D SPACES
You have built your beautiful house, car, or fountain now, and you need to give it an audio presence. Where
do you obtain sound for your 3D spaces? Basically, you have two options: (1) download sound from sites
on the Internet under varying license requirements, such as Freesound.org (http://www.freesound.org) and
Soundsnap.com (http://www.soundsnap.com); or (2) make and record your own sound.
If you go with option 1, remember to check the licensing and permissions for use of the sounds you down-
load and follow the guidelines.
If you go with option 2, your life is about to become more interesting. Recording your own sound, doing
voice-overs, making sound effects, and even composing music for your virtual builds is creatively rewarding.
Perhaps you have a secret talent as a Foley (sound effects) artist and can nd ways to utilize the everyday
objects in your household for making special effect sounds. Maybe your reading voice is pleasant to listen to,
or your voice sounds great as the talking computer in your science ction adventure build. You might even be
a good musician and now have discovered that scoring music for the theme of your build in a virtual world has
its own rewards. With readily available and affordable recording devices like the Zoom recorder (H series)
(http://www.zoom.co.jp), you can record sound easily. There probably are many items you already own that
will create the sounds you need for your soundscape. The key to making creative Foley sound is to listen to the
sound the object makes without looking at it. Take a piece of plastic wrap, crumple it up, and roll it around in
your hands beside your ear. It sounds like rainfall. Shake a piece of thin sheet metal, and you have the sound
of thunder. All around you are objects that make interesting sounds if you shake, drop, squeeze, bend, or walk
on them. It all starts in your imagination.
11.7 HOW TO EDIT THE SOUND FOR YOUR VIRTUAL ENVIRONMENT
Editing sound, like Foley work, is part art, part science. Sometimes you just need a simple le converter, and
sometimes you need to bring out the heavy artillery. There are many good sound editors, and they range in
price. A list of free downloads for Voxengo is available (http://www.dontcrack.com/freeware/audio-software.
php/id/10753/downloads/Voxengo/). Audacity (http://audacity.sourceforge.net/) is a popular freeware pro-
gram that runs on most platforms and has loads of features. FMod (http://fmod.org/) is free to use if you are
editing the sounds for noncommercial purposes and provides very high end features and functionality. For
people who like to work in the Adobe Creative Suite, Adobe Soundbooth (also known as Adobe Audition)
has good interconnected functionality with Adobe Premiere and Adobe Photoshop, but this program is in the
higher end of the price range. FMod under the pro license would fall into the superheavy artillery category
in both cost and functionality. You may nd yourself utilizing several sound editors depending on what your
needs are for the project at hand.
In the edit phase, you should start to think about how your ultimate sound plan will come together. Most
sound-editing programs give you the capacity to make stacked audio tracks. Just as you discovered in the very
rst part of this chapter, no environment (except an anechoic chamber) is without sound reection and under-
lying ambiance, so you will be utilizing these audio tracks to create layers of sound for the visitor in your virtual
world to discover. It is time to start thinking about the 10-second sound-layered plan for your environment.
11.7.1 sTep By sTep ToWard a soundsCape
Let us break down a soundscape step by step. Where do you start to build your sound design, what layer goes
rst, and how do you organize a soundscape? In general, you can rely on the following list of the ve basic
layers of sound to help you get started:
227Sound Design for Virtual Spaces
1. Baseline sounds in the world environment relative to your builds location (e.g., seaside or mountains).
2. Score or theme that sets underlying tone (e.g., horror, peace, loneliness, etc.).
3. General ambiance of your location, such as sounds of a marketplace, factory, or eld.
4. Prop sounds, proximity activated as you pass through the environment, such as doors, a buzzing
neon sign overhead, automated butler robots, and the like.
5. Sounds that are touch or voice/chat activated, perhaps part of a game you are playing inworld or part
of the functioning of the space (e.g., magic doors, supersecret hideout entrances).
This list excludes voice chat and sound-generating devices an avatar may be wearing because those are
transient events in your environment. While they are important elements, these sounds may not be part of
every visitors experience all the time, so they can be put aside for the moment while you build the environ-
mental soundscape. Just bear in mind that if you need to allow for focus on specic sound emitters, the rest
of your environmental sound should be made more subtle and localized to smaller areas. As you start to
plan the soundscape for your next project, take the time to create a list of all the sounds you want to utilize.
There are just a few more things to consider when you set out to make your soundscape, and these are
important factors about the volume of the sound you will bring into a virtual world. The volume of your
sound is dened by a range of 0.1 to 1.0 with the sound scripts in Second Life and OpenSim. This is per-
fectly adequate if you are hearing the sound when your camera is in mouse-look and you are standing near
the emitter. However, try to remember that most visitors will just trundle along with their camera oating
above and behind their head. This will affect your soundscape design, and you will have to compensate
for it by moving your sound emitters up to where most of the cameras are or tell the visitors to hear sound
from their avatar location. This setting can be changed in the Avatar/Preferences/Sound & Media/Voice
settings menu.
One method for getting the right amount of sound to the avatar’s camera/audio listener is to have the
emitter installed in a small prim or object. That way, to “see” it, they have to move the camera or avatar close,
and by doing so, they bring the listener into the appropriate range for hearing the sound effects made by
that object of interest. Another method is to set up a series of sound emitters, both high and low, at different
volumes to reach the audio listener no matter where the visitor has the camera set. The best approach is to
consider these methods, put a preliminary soundscape in place, and do a test walk through with your camera
in many positions. From that walk, you can start to eliminate any extra sound emitters that have proved
superuous and add to the work the server has to do.
Another issue that pops up is a sound le that plays too faintly for the virtual world, even if you have
it set to full volume in the scripting. If that is the issue, take a look at the clip in your sound editor and try
normalizing” the sound to bring the waveform up to 100%. You should also look at the bit rate of the sound
encoding and use the lowest possible setting that gives you clear and undistorted playback in the virtual
world. A setting of 64 kbps (kilobits per second) will work ne for speech and simple sounds and will create
much less lag in the server than a le uploaded at 128 kbps [7]. Finally, make sure that, as you create, install,
and test your soundscape, your headphones and the sound settings on your viewer are set to the default
settings for your initial test walk so you can set a “baseline” for the audio experience. This will help you
decide how you should ramp up the sound as the visitors explore the region and what visible devices you may
need to add, such as signs and note cards to clue them in to changing their audio settings for the maximal
experience in your build.
Although not much data are available, the client viewers seem to hit the top limit at 32 simultaneous sound
emitters in any region. It is also wise to avoid putting too many looping sources close together; useonly one
or two within the range of hearing if possible.
228 Virtual World Design
11.8 PROJECT: MAKING AN AUDIO-BASED GAMING ENVIRONMENT
For this project, you will create a simple audio based navigation game inspired by the Norwegian folk tale
“Three Billy Goats Gruff.” The original story, as you may recall, is about the billy goats’ trickery of a dull
troll, who tried to eat one of them. In this game, the billy goats must navigate their way from their barn,
through the market place, over the trolls bridges, past Troll Hall and the troll campsite, nd a lost kid, and
get to the safety of the orchard, all by using their sense of hearing to follow the audio cues. Because this
is a sound-based game, it will be played in a relatively nonvisual environment, situated inside a black box
honeycombed with internal black walls that limit views of the other player’s avatars. The entryway corridor
has signage and proximity activated sound clips that explain the game to the entering player. Once you get
this project nished, invite some friends over to try it. You should be prepared for, and even encourage,
emergent game play or the evolution of new game play within this sound-based game space.
11.8.1 preliminary game spaCe layouT
Let’s go through the steps for setup of the playing landscape. Figure 11.3 provides a visual display of these steps.
1. Download all the Chapter 11 content needed for this game from http://www.anncudworthprojects.
com/, in the Virtual World Design Book Downloads section. This will include textures for the game
board surface and maps, as well as the sounds needed for making the game. As you upload this
content, make sure to name the sound and texture les with the same name. For instance, the sound
le named Babbling_Stream.wav will become a sound in your inventory called Babbling_Stream.
2. Create a 100 meter wide (on the x axis) by 100 meter long (on the y axis) by 1 meter thick (on the
zaxis) box prim as your game platform. This can be a skybox platform or set up somewhere on
a at terrain. You will also need 100 meters more off the side to create the entrance to the game.
So,count on using at least half a region (256 meters by 128 meters) to set this game up properly.
3. Apply the texture called 3BGG_game board image.png to the top face of the game board so youcan
lay out the sound emitters in their appropriate areas. As you can see, this is kind of a schematic map,
that indicates the kinds of locations the players will visit aurally in this game space.
4. Create a 100 meter (x) by 100 meter (y) by 20 meter high (z) black box prim centered on your game
board and set it to 99% hollow so you have high black walls surrounding the game space.
5. Create a path cut on that box, settings at Beginning (B)=0.025, and End (E) =1.00. This cut will
open up an entrance to the game space for the players. You can see this in the bottom image, lower
right corner of Figure 11.3.
11.8.2 The sound emiTTer seTup
Now, you will make the audio elements of the game. For this section, you will need the sound le called
Test_123.wav that is in the contents provided with this chapter. Figure 11.4 has a visual description of
this section. You will also need to wear a good set of headphones to do the rest of this project, so you can
experience binaural sound.
1. Make three spheres, set them to phantom, and name them loop_sound, touch_sound, and prox-
imity_sound, respectively, in the Object Name slot in the Edit menu. The loop and touch spheres
should be 0.5 to 1 meter in diameter, and the proximity sphere should be 5 meters in diameter.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset