[0rg] Clan Forum

A meeting place for all [0rg] clan members.
HomeCalendarGalleryFAQSearchMemberlistRegisterLog in
February 2018
Forum Registration
Tue Mar 22, 2011 7:25 pm by Kakujitsu
To all [0rg] members, forum registration is mandatory within a week of the steam group invitation. Anyone not registered on the forum will be removed from the group and will lose any clan privileges and admin rights.

Comments: 2
Thu Nov 04, 2010 5:41 pm by Kakujitsu
Rupture is one of the founding members of .0rg Hes been with me and the clan since day one. A very skilled and funny player its come to my attention that hes been misunderstood. N!gga was a movement started by Rupture. When he uses the word N!gga its not ment in a derogatory or disrespectful way, it is a general term for friend or acquaintance taken from Hip-Hop culture. Heads up Rupture is crazy …

Comments: 5
Latest topics
» Rates
Thu Aug 06, 2015 6:39 am by Kakujitsu

» Goats Are Awesome
Sun Apr 06, 2014 11:56 am by Ƙrᴓƞίc Ƙlᴓώƞ

» The epicness of CastleMiner Z has a place!
Mon Jun 03, 2013 11:01 pm by Retro Gojira

» Only took forever to remember my login info
Thu May 16, 2013 1:52 am by Kakujitsu

» Hi. Kakujitsu said I could come in here. no seriously.
Sun Apr 28, 2013 11:13 pm by Retro Gojira

» Source SDK fix after last update.
Sun Apr 28, 2013 11:04 pm by Kakujitsu

» Updated for New Music 2013.
Wed Apr 17, 2013 10:25 pm by RupturE.org

» CS:GO Pro Tip Series: TM
Sat Dec 08, 2012 10:34 am by Kakujitsu

» CS:GO Pro Tip Series: Semphis
Sat Dec 08, 2012 10:31 am by Kakujitsu

Top posters

Share | 

 Soundscapes and ambient sounds

Go down 
Lieutenant General
Lieutenant General

Zodiac : Sagittarius Posts : 123
Join date : 2010-02-01
Age : 26
Location : Australia, NSW

PostSubject: Soundscapes and ambient sounds   Wed Feb 17, 2010 7:45 am

A soundscape is not totally something in which you can place and edit inside your map. It is true that default soundscapes already exist, however making your own can create better ambience and be better suited for the environment in which you want to create.

For example there is already a soundscape that sounds like a windy tunnel by the sea, however it might not be suited for your map as you might just want a slightly windy tunnel with less volume.

Soundscapes can be entity-point based or entity-brush based by the entities of trigger_soundscape and env_soundscape, however a trigger_soundscape needs to work with a point entity of env_soundscape_triggerable.

For the beginning we need to first play around with soundscapes to figure out how they work. In the Hammer editor either create a new map or edit another map in which you want to insert a sound-scape in.

Using the entity tool create a env_soundscape.

In the property that says soundscape we need to type in the soundscape we want. As it describes it refers to a text file called 'soundscapes.txt' located in the scripts folder (In deathmatch it would be Steam/steamapps/*account*/half-life 2 Deathmatch/hl2dm/scripts).

However we are going to browse through the Half-Life 2 soundscapes used by the game. You can find the appropriate name for a soundscape using GCFscape, which is a java program which can browse through the steam packs to obtain and see directories and files. Using GCFscape open the GCF called 'source engine' located in your Steam/steamapps folder.

By browsing through the GCF in the directory hl2/scripts you will find a number of files. all the files with soundscapes_* are the files in which we are looking for. Soundscapes_manifest.txt is just a file which conjoins all the soundscapes into one file.

Opening 'soundscapes.txt' I found a random soundscape in which I want to use called 'test_tvset'.

Lets break down the code here:

DSP refers to the amount of sound echo, or sound effect that is gained from a space. The only way DSP can actually be changed is through a soundscape. E.g. a metal room would create more echo than a room covered in carpet, however a soundscape could make the metal room not echo at all and a carpet room do quite the opposite.

"playlooping" and "playrandom" are two different things.
'Playlooping' is the normal code you would place in a soundscape. These are only meant for long looping sounds or looping sounds such as machinery, water lapping etc. If this is given to a sound that is not looping it would only loop for a couple of seconds then stop.
'Playrandom' is used for non looping sounds but are played randomly through the map at times. This could be a chirp a bird hoot, drips of water and other sounds such as a gust of wind.
'Playrandom' cannot be placed in a 'playlooping' and vice-versa - it will not work.

In the 'playrandom' code the "time" value has 2 numbers, this is so it can randomly choose between the values, i.e it will either delay playing one of the random wav sounds every 0.1 seconds or 0.3 seconds, with the pitches accordingly.
"rndwave" is the list of sound files that are to be randomly played in the soundscape.

In the 'playlooping' code it has variables the same as any ambient_generic or a sound-playing entity. Its volume is 0.15 (a digit from 0-1, 1 being the loudest) therefore it is fairly quiet, pitch is at 100 (or default sound pitch) and the sound name or 'wave' is set to "test/temp/soundscape_test/tv_music.wav".

The things we want to pay attention to is the variables 'position' and 'attenuation'. These are individual to the soundscape entity. Attenuation is the amount of time the soundscape can fade, or change when the player journeys beyond the radius of the soundscape or is closer in a radius of another soundscape. Usually slower attenuations sound better.
Position here is the most important value. If we go back to the env_soundscape entity we created in the hammer editor we see that it also has a 'position' value.

This is because env_soundscape's use a number of points to reference the different sound points, usually they are info_targets. Env_soundscapes do not need an info_target to play the ambience as it can play from the env_soundscape entity itself. These are used to separate different sounds inside the same soundscape.
Create an 'info_target' using the entity tool and name it SS_0 (for soundscape 0).

Go to your env_soundscape and inside the property 'position 0' put in the name of your info_target (SS_0).

If you want the same soundscape somewhere else which is beyond the radius of the soundscape just copy and paste the env_soundscape and create another info_target, changing its name name (or position).
The reason for having multiple positions in an env_soundscape is to reference different ambience. However stupid this may sound env_soundscapes can only have 1 reference point therefore every time you want to have an outside sound/inside sound etc. you will have to create another soundscape entity.
If you want to make a soundscape that only has 1 point then it is smarter to use an ambient_generic or do not reference to an info_target at all (of course removing the "position" line in the soundscapes.txt so it plays at the soundscape: this means that if a point is not referenced in the code it will play at the env_soundscape entity).

Taking the test_tvset soundscape as an example I can add more code to make other ambient sound areas. Instead of having the code under "playrandom" to the same position I could change this 'position' to '1' therefore not making the sound in the same place as 'position 0'.

   "dsp"   "1"
      "volume"   "0.5"
      "pitch"      "100"

      "wave"      "test/temp/soundscape_test/tv_music.wav"
      "position"   "0"
      "attenuation"   "2"
      "time"      "0.1, 0.3"
      "volume"   "2,3"
      "pitch"      "95,105"
      "attenuation"   "2"
      "position"   "1"

         "wave"    "vo/canals/shanty_hey.wav"
         "wave"    "vo/k_lab/al_heydoc.wav"
         "wave"    "vo/npc/female01/heydoc02.wav"
         "wave"    "vo/npc/female01/heydoc01.wav"
         "wave"    "vo/npc/male01/heydoc01.wav"
         "wave"    "vo/npc/male01/heydoc02.wav"
         "wave"    "vo/streetwar/alyx_gate/al_hey.wav"
         "wave"    "vo/trainyard/ba_heygordon.wav"
         "wave"    "vo/citadel/al_heylisten.wav"

For this to work I need you to create a text file called 'soundscapes.txt' inside your Steam/steamapps/*account*/half-life 2 Deathmatch/hl2dm/scripts folder. Copy and paste the code into the text file and save it.

Place another info_target inside your map, this time call it SS_1. This is because we want to place the random noises somewhere.

Inside your soundscape in the property that says 'Position 1' put the name of your second info_target (SS_1).

When compiled and tested your map; it should play the ambient noises around the areas in which you placed the info_targets. One is annoying music the other random 'hey' noises.

Usually to make individual soundscape files for a map you need to have the file called soundscapes_*mapname*.txt. So if your map name is called dm_box-of-fun your soundscape file would be called soundscpes_dm_box-of-fun.txt. However if you are to publish the map you need to add the file into the .bsp file when you compile it.

Using a program named Pakrat. You can add any custom files to your .bsp, just remember to change the directory to the right place by click the view button in the top menu then 'As Tree'. Click the 'add' button at the bottom and find your soundscape file. Click 'Yes to all' then click edit.

That's all my help for today, for figuring out a env_soundscape_triggerable try other sources :P. Good luck.

[***Spam hard... Become pro***]
Back to top Go down
Soundscapes and ambient sounds
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
[0rg] Clan Forum :: Tutorials :: Source SDK-
Jump to: