[Tutorial] Simple Soundscapes

Ravidge

Grand Vizier
aa
May 14, 2008
1,544
2,818
Soundscapes

What?
Soundscapes add ambient sounds to your map.

How?
I will build a small map to show "how to" in a simple and understandable way. I won't go into detail explaining all the features, but it should be enough to get you started.

*You can click all images to see a larger version*


Done! Ain't it Beautiful? (Sky visgroup is hidden).

There are four soundscape entities:
env_soundscape
env_soundscape_proxy
env_soundscape_triggerable + trigger_soundscape (brush)

Now, let's add some ambient sounds to this map.
I start by creating an env_soundscape at the center of the map and giving it the following properties:

Name: I always add ss_ to my SoundScape entities, but you can use any name you want. Names are used when the env_soundscape_proxys come into play.
Radius: If the player steps inside the radius specified the soundscape will start playing. Setting it to -1 makes it play if the player can see it, regardless of distance. If the player can see multiple env_soundscape entities all with -1 radius, only the one nearest the player will be heard. If the player can't see any soundscapes and isn't standing in a radius of one, the last soundscape that activated will continue to play.
Soundscape: The name of the soundscape to use. Granary.Outside will reproduce the same ambient sounds that can be heard in the map cp_granary.

soundscapes_granary.txt said:
Granary.Outside
"playlooping"
{
"volume" ".75"
"pitch" "100"
"wave" "ambient/outdoors_quiet_birds.wav"
}

"playlooping"
{
"volume" ".75"
"pitch" "100"
"wave" "ambient/outdoors.wav"
}

Granary.Outside also has 4 unique Sound Positions I can use, to add even more feeling. Some soundscapes have more and others have less/none at all.
I want some farm animal noise to come from the Blu side. Conveniently these sounds are placed at position 0 as we can see here:

soundscapes_granary.txt said:
"playrandom"
{
"time" "5,15"
"volume" "1"
"pitch" "100"
"position" "0"
"attenuation" "1"
"rndwave"
{
"wave" "ambient/cow1.wav"
"wave" "ambient/cow2.wav"
"wave" "ambient/cow3.wav"
"wave" "ambient/bird1.wav"
"wave" "ambient/bird2.wav"
"wave" "ambient/bird3.wav"
}
}

I will place a named info_target by the blue billboard


Then have my env_soundscape "Sound position 0" point at that target.

I can name my info_triggers whatever I want, but I prefer to keep them as descriptive as possible.

Great! Now we can hear cows mooing and birds singing from the blue billboard.

Now I will add 2 more env_soundscapes, One for each base.
This time I will use the soundscape "Granary.Inside"
soundscapes_granary.txt said:
"Granary.Inside"
{

"dsp" "1"

"playlooping"
{
"volume" "1"
"pitch" "100"
"wave" "ambient/indoors.wav"
}
}
There are no additional sound positions at all for "Granary.Inside". So even if I add info_targets and point to them in the env_soundscape nothing will happen.


Like so, one for the red base and one for the blue.
Just to prove it's possible to have several soundscapes in one map, I used "Dustbowl.Indoors" as the soundscape for the blue base:
Name: ss_blue
Radius: -1
Soundscape: Dustbowl.Indoors

Perfect, now I have Inside sounds in the bases, and Outside sound in the middle!

But the sounds aren't switching from outdoor to indoor and vice-versa when I pass under the billboards, which is what I want. For that we have the env_soundscape_proxy! Triggering a proxy will activate a named env_soundscape and all its Sound positions.

This is perfect for making transitions between soundscapes happen where they are supposed to. The distance between proxy and env_soundscape doesn't matter at all, a proxy can make a soundscape from across the map start playing if you want to.

Placing 2 env_soundscape_proxys under the billboard like this

No name or parent required.
Soundscape Entity: Notice how I put the name of the env_soundscapes and NOT the soundscape file.
radius: -1

copy and paste these 2 to all the other base entrances but remember to set the ones on the blue side to have Soundscape Entity: ss_blue instead of ss_red.

And It's done.

There's also env_soundscape_triggerable and trigger_soundscape. But they are basically the same as env_soundscape and the proxy and it's boring to repeat myself too much. The main differance is how trigger_soundscape (a brush entity) instead of using a radius is a trigger volume and can make use of filter entites.

You can download this tutorial map here: DOWNLOAD (vmf + bsp).

Use the console command "soundscape_debug 1" to see what soundscape is active. (requires sv_cheats 1)
Green line = Active soundscape.
Orange line = Active soundscape that you can't see.
Red line = Inactive soundscape that you can't see.
White line = Inactive soundscape that you can see, but another one has priority (depends on the radius setting).
Blue line = Sound positions.


---

If you want to know what soundscapes are available you can open up the "team fortress 2 content.gcf" with an appropriate program (such as GCFScape) and find the tf\scripts\ folder, locate the soundscapes_<mapname>.txt open up and look at the different names.

Or just load up a Valve map ingame and use the soundscape_debug command to see what the different soundscapes are named (Like in the image above).

You can also download the Environment Gallery by Acegikmo, where he has included all the env_soundscapes and their Sound positions.

---

This tutorial is only meant to get you started. You will have to experiment with the placements, soundscapes and radius settings to fit your own map.

If you are interested in creating a custom soundscape for your map, read this tutorial (link)

Questions?
 
Last edited:

l3eeron

L8: Fancy Shmancy Member
Jan 4, 2008
593
88
Excellent, thanks.
 

Ravidge

Grand Vizier
aa
May 14, 2008
1,544
2,818
Thanks. But is there anyway to set it up with triggers depending on were people are with activating specific sounds.

How specific is that sound? I get the feeling that a ambient_generic would be better if you just want a sound to trigger.

Soundscapes are for creating background noise, ambient_generic are for all other sounds.
 

Icarus

aa
Sep 10, 2008
2,245
1,210
I should also mention that soundscapes cannot be "seen" through areaportals, open or closed.
 

Hellfire

L9: Fashionable Member
Jul 9, 2008
601
142
was very useful,thx
 

Terr

Cranky Coder
aa
Jul 31, 2009
1,590
410
Another point:

Soundscapes cannot be "seen" through water either. In order to change things while someone is swimming underwater, you have to use a soundscape trigger.
 

XFunc_CaRteR

L5: Dapper Member
May 14, 2009
248
17
Question: If I need an env_soundscape_proxy to switch between soundscapes, why can't I just duplicate the original soundscape and position them at the entrances?

What's the point of the env_soundscape_proxy if all you need to do is duplicate the original env_soundscapes?
 

Terr

Cranky Coder
aa
Jul 31, 2009
1,590
410
What's the point of the env_soundscape_proxy if all you need to do is duplicate the original env_soundscapes?

  • Then it's not the same soundscape, it's another soundscape with identical settings. You have to duplicate your effort and may forget to keep them in-sync.
  • The computer doesn't need to bother trying to do audio crossfading between the two.
 

ricardojvc6

L6: Sharp Member
Jun 8, 2009
268
66
thx this tutorial is rly nice :)