<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.thedarkmod.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Plasticman</id>
	<title>The DarkMod Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.thedarkmod.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Plasticman"/>
	<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Special:Contributions/Plasticman"/>
	<updated>2026-04-30T01:39:38Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Debugging_Your_Speakers&amp;diff=15878</id>
		<title>Debugging Your Speakers</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Debugging_Your_Speakers&amp;diff=15878"/>
		<updated>2013-02-07T06:52:34Z</updated>

		<summary type="html">&lt;p&gt;Plasticman: Changed &amp;quot;s_drawSpeakers&amp;quot; (which does not exist) to &amp;quot;s_drawSounds&amp;quot; (which was meant in the first place).&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is some sort of a follow-up, please read first [[Setting Up Speakers]].&lt;br /&gt;
&lt;br /&gt;
== Don&#039;t forget your ears ==&lt;br /&gt;
&lt;br /&gt;
There are ways to visualize what&#039;s going on with the audio in game, and it can be tempting to rely too much on that. But what finally counts is what can be heard by the player.&amp;lt;br&amp;gt;&lt;br /&gt;
So just like it is clear that you check your map&#039;s visuals with your eyes, it should be clear that you check the audio with your ears.&lt;br /&gt;
&lt;br /&gt;
Should be self-explanatory that you can&#039;t judge your map&#039;s sound design via the tiny speakers in your notebook.&lt;br /&gt;
&lt;br /&gt;
== Make Speakers visible with s_drawSounds ==&lt;br /&gt;
&lt;br /&gt;
===The Basics===&lt;br /&gt;
&lt;br /&gt;
Sound emitting entities can be made visible using the &#039;&#039;s_drawSounds&#039;&#039; command in the console:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;s_drawSounds 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will show speakers that are in reach to the player, the ones, that can be heard at the moment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;s_drawSounds 2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
shows all of them in the map.&lt;br /&gt;
&lt;br /&gt;
A typical speaker will look like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Drawsounds_shot01.png]]&lt;br /&gt;
&lt;br /&gt;
The information inside the cube has the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;name&amp;gt; (O/D min/max)&lt;br /&gt;
          &lt;br /&gt;
          n&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and means:&lt;br /&gt;
&lt;br /&gt;
::&#039;&#039;&amp;lt;name&amp;gt;&#039;&#039;: the name of the shader or sound&lt;br /&gt;
::&#039;&#039;O&#039;&#039;: relative distance to the player (with occlusion)&lt;br /&gt;
::&#039;&#039;D&#039;&#039;: real distance to the player&lt;br /&gt;
::&#039;&#039;min&#039;&#039;: the &#039;&#039;minDistance&#039;&#039;&lt;br /&gt;
::&#039;&#039;max&#039;&#039;: the &#039;&#039;maxDistance&#039;&#039;&lt;br /&gt;
::&#039;&#039;n&#039;&#039;: the speaker&#039;s number&lt;br /&gt;
&lt;br /&gt;
When you look at more remote speakers, like for example in the next room, you may notice there are red lines, vectoring away from the entity.&lt;br /&gt;
&lt;br /&gt;
It is easier to see what is going on with portals visible:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;r_showportals 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will show these red lines often point to a visportal. This illustrates how sound propagation takes map geometry into account ([[Setting Up Speakers#no_occlusion/ s_occlusion|occlusion]]). The sound does not travel the shortest distance (line of sight), but takes a more realistic route around the corner.&lt;br /&gt;
&lt;br /&gt;
[[Image:Drawsounds_shot03.png]]&lt;br /&gt;
&lt;br /&gt;
The speaker entitiy is behind the wall, the red line shows the way through an open portal, a door in this case. The volume at the player position depends on this relative distance (except when occlusion is explicitly disabled, i.e. only for debugging).&amp;lt;br&amp;gt;&lt;br /&gt;
You can not see the difference between &#039;&#039;O&#039;&#039; and &#039;&#039;D&#039;&#039; in this shot due to rounding.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Closing the door will add a fixed &amp;quot;length&amp;quot; to the relative distance (in TDM that&#039;s ca. 12 of Doom&#039;s crude sound units -- &#039;&#039;edit: source code hints they were originally meant to resemble Meters. Since TDM geos big compared to Doom, they turn out to be very short Meters.&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
[[Image:Drawsounds_shot02.png]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;D&#039;&#039; is still 2 (line of sight didn&#039;t change), &#039;&#039;O&#039;&#039; is in deed something near 14, but gets capped equivalent to maxDistance.&lt;br /&gt;
&lt;br /&gt;
===Propagation through multiple Portals===&lt;br /&gt;
&lt;br /&gt;
When a sound is propagated through more than one portal it has to be bended around many corners. You would expect the drawSounds tool to show an appropriate bended line, but it doesn&#039;t.&lt;br /&gt;
&lt;br /&gt;
A basic setup with multiple portals, one speaker and one &amp;quot;Listener&amp;quot; (the player), may look like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:DrawSounds_Portals_1.png]]&lt;br /&gt;
&lt;br /&gt;
Sound propagation and it&#039;s visualisation differ:&lt;br /&gt;
&lt;br /&gt;
[[Image:DrawSounds_Portals_2.png]]&lt;br /&gt;
&lt;br /&gt;
The lines drawn by drawSounds only show you&lt;br /&gt;
* where the sound is originating from while you hear it (that is the active portal nearest to the actual source speaker).&lt;br /&gt;
* where the originating speaker is.&lt;br /&gt;
The ralative dastance, the amount of occlusion, is not affected by this visualisation. The yellow line shows the distance that really is taken into account by the sound engine. The value of &#039;&#039;O&#039;&#039;, the relative distance shown on the drawn Speaker itself, is correct and differs from the length of the red line.&lt;br /&gt;
&lt;br /&gt;
Together drawsounds and showportals make a nice toolset to optimize both your speaker setups and your placement of visportals (now with sound propagation in mind). You can add the spyglass to that toolset, remote speakers are sometimes hard to read.  :)&lt;br /&gt;
&lt;br /&gt;
===Issues===&lt;br /&gt;
* If you turn occlusion off (globally or just on certain entities) it has no effect on what drawsounds shows you.&lt;br /&gt;
* Sometimes the red lines can go to weird places. Esp. with &#039;&#039;s_drawSounds 2&#039;&#039; all inactive entitites seem to point at a common origin. -- &#039;&#039;edit: looks like they point to the last known position played from. When propagated through a portal it points there. At map start sounds are not played yet, so they point to 0,0,0.&#039;&#039;&lt;br /&gt;
* Sound entities change their color. That&#039;s propably distance related, but the exact meaning of the colors is a mystery to me.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Getting the Volume right ==&lt;br /&gt;
&lt;br /&gt;
The right value for the volume setting of a sound should be correctly set in it&#039;s shader. So in a perfect world it shouldn&#039;t need any fixing by mappers.&lt;br /&gt;
&lt;br /&gt;
But for setting up your own sounds or fixing possible issues with &amp;quot;broken&amp;quot; assets, you can use [[Setting Up Speakers#volume/ s_volume|the &#039;&#039;s_volume&#039;&#039; property]].&lt;br /&gt;
&lt;br /&gt;
Since all sounds that don&#039;t have the unclamped keyword in their shader get capped by the sound engine before any real clipping occurs, it is not easy to spot when you&#039;re over the limit. There&#039;s a cure, that at least should work for normalized sounds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;s_clipvolumes 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will disable the engine&#039;s clipping protection. As a result affected sounds will cause hardware clipping -- you can&#039;t miss that.&lt;br /&gt;
&lt;br /&gt;
A more elegant way to trace volume issues would be doom&#039;s built-in volume meter. It can be enabled via&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;s_showLevelMeter 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
but seems to be broken in TDM right now.&lt;br /&gt;
&lt;br /&gt;
== Other tools ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;s_useocclusion 0&amp;lt;/code&amp;gt;: Will turn off occlusion on a global level. Sound propagation will always be line of sight. It is not visualized by drawsounds. Can be useful for comparison, esp. when bound to a key (&#039;&#039;bind n toggle s_useOcclusion&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;com_showdecoders 1&amp;lt;/code&amp;gt;: Will draw a few lines on your screen, showing the sounds currently playing.&lt;br /&gt;
&lt;br /&gt;
[[Category:Sound]]&lt;br /&gt;
[[Category:Editing]]&lt;/div&gt;</summary>
		<author><name>Plasticman</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Debugging_Your_Speakers&amp;diff=15877</id>
		<title>Debugging Your Speakers</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Debugging_Your_Speakers&amp;diff=15877"/>
		<updated>2013-02-06T06:00:37Z</updated>

		<summary type="html">&lt;p&gt;Plasticman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is some sort of a follow-up, please read first [[Setting Up Speakers]].&lt;br /&gt;
&lt;br /&gt;
== Don&#039;t forget your ears ==&lt;br /&gt;
&lt;br /&gt;
There are ways to visualize what&#039;s going on with the audio in game, and it can be tempting to rely too much on that. But what finally counts is what can be heard by the player.&amp;lt;br&amp;gt;&lt;br /&gt;
So just like it is clear that you check your map&#039;s visuals with your eyes, it should be clear that you check the audio with your ears.&lt;br /&gt;
&lt;br /&gt;
Should be self-explanatory that you can&#039;t judge your map&#039;s sound design via the tiny speakers in your notebook.&lt;br /&gt;
&lt;br /&gt;
== Make Speakers visible with s_drawSpeakers ==&lt;br /&gt;
&lt;br /&gt;
===The Basics===&lt;br /&gt;
&lt;br /&gt;
Sound emitting entities can be made visible using the &#039;&#039;s_drawSpeakers&#039;&#039; command in the console:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;s_drawSpeakers 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will show speakers that are in reach to the player, the ones, that can be heard at the moment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;s_drawSpeakers 2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
shows all of them in the map.&lt;br /&gt;
&lt;br /&gt;
A typical speaker will look like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Drawsounds_shot01.png]]&lt;br /&gt;
&lt;br /&gt;
The information inside the cube has the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;name&amp;gt; (O/D min/max)&lt;br /&gt;
          &lt;br /&gt;
          n&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and means:&lt;br /&gt;
&lt;br /&gt;
::&#039;&#039;&amp;lt;name&amp;gt;&#039;&#039;: the name of the shader or sound&lt;br /&gt;
::&#039;&#039;O&#039;&#039;: relative distance to the player (with occlusion)&lt;br /&gt;
::&#039;&#039;D&#039;&#039;: real distance to the player&lt;br /&gt;
::&#039;&#039;min&#039;&#039;: the &#039;&#039;minDistance&#039;&#039;&lt;br /&gt;
::&#039;&#039;max&#039;&#039;: the &#039;&#039;maxDistance&#039;&#039;&lt;br /&gt;
::&#039;&#039;n&#039;&#039;: the speaker&#039;s number&lt;br /&gt;
&lt;br /&gt;
When you look at more remote speakers, like for example in the next room, you may notice there are red lines, vectoring away from the entity.&lt;br /&gt;
&lt;br /&gt;
It is easier to see what is going on with portals visible:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;r_showportals 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will show these red lines often point to a visportal. This illustrates how sound propagation takes map geometry into account ([[Setting Up Speakers#no_occlusion/ s_occlusion|occlusion]]). The sound does not travel the shortest distance (line of sight), but takes a more realistic route around the corner.&lt;br /&gt;
&lt;br /&gt;
[[Image:Drawsounds_shot03.png]]&lt;br /&gt;
&lt;br /&gt;
The speaker entitiy is behind the wall, the red line shows the way through an open portal, a door in this case. The volume at the player position depends on this relative distance (except when occlusion is explicitly disabled, i.e. only for debugging).&amp;lt;br&amp;gt;&lt;br /&gt;
You can not see the difference between &#039;&#039;O&#039;&#039; and &#039;&#039;D&#039;&#039; in this shot due to rounding.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Closing the door will add a fixed &amp;quot;length&amp;quot; to the relative distance (in TDM that&#039;s ca. 12 of Doom&#039;s crude sound units -- &#039;&#039;edit: source code hints they were originally meant to resemble Meters. Since TDM geos big compared to Doom, they turn out to be very short Meters.&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
[[Image:Drawsounds_shot02.png]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;D&#039;&#039; is still 2 (line of sight didn&#039;t change), &#039;&#039;O&#039;&#039; is in deed something near 14, but gets capped equivalent to maxDistance.&lt;br /&gt;
&lt;br /&gt;
===Propagation through multiple Portals===&lt;br /&gt;
&lt;br /&gt;
When a sound is propagated through more than one portal it has to be bended around many corners. You would expect the drawSpeakers tool to show an appropriate bended line, but it doesn&#039;t.&lt;br /&gt;
&lt;br /&gt;
A basic setup with multiple portals, one speaker and one &amp;quot;Listener&amp;quot; (the player), may look like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:DrawSounds_Portals_1.png]]&lt;br /&gt;
&lt;br /&gt;
Sound propagation and it&#039;s visualisation differ:&lt;br /&gt;
&lt;br /&gt;
[[Image:DrawSounds_Portals_2.png]]&lt;br /&gt;
&lt;br /&gt;
The lines drawn by drawSpeakers only show you&lt;br /&gt;
* where the sound is originating from while you hear it (that is the active portal nearest to the actual source speaker).&lt;br /&gt;
* where the originating speaker is.&lt;br /&gt;
The ralative dastance, the amount of occlusion, is not affected by this visualisation. The yellow line shows the distance that really is taken into account by the sound engine. The value of &#039;&#039;O&#039;&#039;, the relative distance shown on the drawn Speaker itself, is correct and differs from the length of the red line.&lt;br /&gt;
&lt;br /&gt;
Together drawsounds and showportals make a nice toolset to optimize both your speaker setups and your placement of visportals (now with sound propagation in mind). You can add the spyglass to that toolset, remote speakers are sometimes hard to read.  :)&lt;br /&gt;
&lt;br /&gt;
===Issues===&lt;br /&gt;
* If you turn occlusion off (globally or just on certain entities) it has no effect on what drawsounds shows you.&lt;br /&gt;
* Sometimes the red lines can go to weird places. Esp. with &#039;&#039;s_drawSounds 2&#039;&#039; all inactive entitites seem to point at a common origin. -- &#039;&#039;edit: looks like they point to the last known position played from. When propagated through a portal it points there. At map start sounds are not played yet, so they point to 0,0,0.&#039;&#039;&lt;br /&gt;
* Sound entities change their color. That&#039;s propably distance related, but the exact meaning of the colors is a mystery to me.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Getting the Volume right ==&lt;br /&gt;
&lt;br /&gt;
The right value for the volume setting of a sound should be correctly set in it&#039;s shader. So in a perfect world it shouldn&#039;t need any fixing by mappers.&lt;br /&gt;
&lt;br /&gt;
But for setting up your own sounds or fixing possible issues with &amp;quot;broken&amp;quot; assets, you can use [[Setting Up Speakers#volume/ s_volume|the &#039;&#039;s_volume&#039;&#039; property]].&lt;br /&gt;
&lt;br /&gt;
Since all sounds that don&#039;t have the unclamped keyword in their shader get capped by the sound engine before any real clipping occurs, it is not easy to spot when you&#039;re over the limit. There&#039;s a cure, that at least should work for normalized sounds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;s_clipvolumes 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will disable the engine&#039;s clipping protection. As a result affected sounds will cause hardware clipping -- you can&#039;t miss that.&lt;br /&gt;
&lt;br /&gt;
A more elegant way to trace volume issues would be doom&#039;s built-in volume meter. It can be enabled via&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;s_showLevelMeter 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
but seems to be broken in TDM right now.&lt;br /&gt;
&lt;br /&gt;
== Other tools ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;s_useocclusion 0&amp;lt;/code&amp;gt;: Will turn off occlusion on a global level. Sound propagation will always be line of sight. It is not visualized by drawsounds. Can be useful for comparison, esp. when bound to a key (&#039;&#039;bind n toggle s_useOcclusion&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;com_showdecoders 1&amp;lt;/code&amp;gt;: Will draw a few lines on your screen, showing the sounds currently playing.&lt;br /&gt;
&lt;br /&gt;
[[Category:Sound]]&lt;br /&gt;
[[Category:Editing]]&lt;/div&gt;</summary>
		<author><name>Plasticman</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Debugging_Your_Speakers&amp;diff=15876</id>
		<title>Debugging Your Speakers</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Debugging_Your_Speakers&amp;diff=15876"/>
		<updated>2013-02-06T05:54:09Z</updated>

		<summary type="html">&lt;p&gt;Plasticman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is some sort of a follow-up, please read first [[Setting Up Speakers]].&lt;br /&gt;
&lt;br /&gt;
== Don&#039;t forget your ears ==&lt;br /&gt;
&lt;br /&gt;
There are ways to visualize what&#039;s going on with the audio in game, and it can be tempting to rely too much on that. But what finally counts is what can be heard by the player.&amp;lt;br&amp;gt;&lt;br /&gt;
So just like it is clear that you check your map&#039;s visuals with your eyes, it should be clear that you check the audio with your ears.&lt;br /&gt;
&lt;br /&gt;
Should be self-explanatory that you can&#039;t judge your map&#039;s sound design via the tiny speakers in your notebook.&lt;br /&gt;
&lt;br /&gt;
== Make Speakers visible with s_drawSpeakers ==&lt;br /&gt;
&lt;br /&gt;
===The Basics===&lt;br /&gt;
&lt;br /&gt;
Sound emitting entities can be made visible using the &#039;&#039;s_drawSpeakers&#039;&#039; command in the console:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;s_drawSpeakers 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will show speakers that are in reach to the player, the ones, that can be heard at the moment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;s_drawSpeakers 2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
shows all of them in the map.&lt;br /&gt;
&lt;br /&gt;
A typical speaker will look like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Drawsounds_shot01.png]]&lt;br /&gt;
&lt;br /&gt;
The information inside the cube has the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;name&amp;gt; (O/D min/max)&lt;br /&gt;
          &lt;br /&gt;
          n&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and means:&lt;br /&gt;
&lt;br /&gt;
::&#039;&#039;&amp;lt;name&amp;gt;&#039;&#039;: the name of the shader or sound&lt;br /&gt;
::&#039;&#039;O&#039;&#039;: relative distance to the player (with occlusion)&lt;br /&gt;
::&#039;&#039;D&#039;&#039;: real distance to the player&lt;br /&gt;
::&#039;&#039;min&#039;&#039;: the &#039;&#039;minDistance&#039;&#039;&lt;br /&gt;
::&#039;&#039;max&#039;&#039;: the &#039;&#039;maxDistance&#039;&#039;&lt;br /&gt;
::&#039;&#039;n&#039;&#039;: the speaker&#039;s number&lt;br /&gt;
&lt;br /&gt;
When you look at more remote speakers, like for example in the next room, you may notice there are red lines, vectoring away from the entity.&lt;br /&gt;
&lt;br /&gt;
It is easier to see what is going on with portals visible:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;r_showportals 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will show these red lines often point to a visportal. This illustrates how sound propagation takes map geometry into account ([[Setting Up Speakers#no_occlusion/ s_occlusion|occlusion]]). The sound does not travel the shortest distance (line of sight), but takes a more realistic route around the corner.&lt;br /&gt;
&lt;br /&gt;
[[Image:Drawsounds_shot03.png]]&lt;br /&gt;
&lt;br /&gt;
The speaker entitiy is behind the wall, the red line shows the way through an open portal, a door in this case. The volume at the player position depends on this relative distance (except when occlusion is explicitly disabled, i.e. only for debugging).&amp;lt;br&amp;gt;&lt;br /&gt;
You can not see the difference between &#039;&#039;O&#039;&#039; and &#039;&#039;D&#039;&#039; in this shot due to rounding.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Closing the door will add a fixed &amp;quot;length&amp;quot; to the relative distance (in TDM that&#039;s ca. 12 of Doom&#039;s crude sound units -- &#039;&#039;edit: source code hints they were originally meant to resemble Meters. Since TDM geos big compared to Doom, they turn out to be very short Meters.&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
[[Image:Drawsounds_shot02.png]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;D&#039;&#039; is still 2 (line of sight didn&#039;t change), &#039;&#039;O&#039;&#039; is in deed something near 14, but gets capped equivalent to maxDistance.&lt;br /&gt;
&lt;br /&gt;
===Propagation through multiple Portals===&lt;br /&gt;
&lt;br /&gt;
When a sound is propagated through more than one portal it has to be bended around many corners. You would expect the drawSpeakers tool to show an appropriate bended line, but it doesn&#039;t.&lt;br /&gt;
&lt;br /&gt;
A basic setup with multiple portals, one speaker and one &amp;quot;Listener&amp;quot; (the player), may look like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:DrawSounds_Portals_1.png]]&lt;br /&gt;
&lt;br /&gt;
Sound propagation and it&#039;s visualisation differ:&lt;br /&gt;
&lt;br /&gt;
[[Image:DrawSounds_Portals_2.png]]&lt;br /&gt;
&lt;br /&gt;
The lines drawn by drawSpeakers only show you&lt;br /&gt;
* where the sound is originating from while you hear it (that is the active portal nearest to the actual source speaker).&lt;br /&gt;
* where the originating speaker is.&lt;br /&gt;
The ralative dastance, the amount of occlusion, is not affected by this visualisation. The yellow line shows the distance that really is taken into account by the sound engine. The value of &#039;&#039;O&#039;&#039;, the relative distance shown on the drawn Speaker itself, is correct and differs from the length of the red line.&lt;br /&gt;
&lt;br /&gt;
Together drawsounds and showportals make a nice toolset to optimize both your speaker setups and your placement of visportals (now with sound propagation in mind). You can add the spyglass to that toolset, remote speakers are sometimes hard to read.  :)&lt;br /&gt;
&lt;br /&gt;
===Issues===&lt;br /&gt;
* If you turn occlusion off (globally or just on certain entities) it has no effect on what drawsounds shows you.&lt;br /&gt;
* Sometimes the red lines can go to weird places. Esp. with &#039;&#039;s_drawSounds 2&#039;&#039; all inactive entitites seem to point at a common origin. -- &#039;&#039;edit: looks like they point to the last known position played from. When propagated through a portal it points there. At map start sounds are not played yet, so they point to 0,0,0.&#039;&#039;&lt;br /&gt;
* Sound entities change their color. That&#039;s propably distance related, but the exact meaning of the colors is a mystery to me.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Getting the Volume right ==&lt;br /&gt;
&lt;br /&gt;
The right value for the volume setting of a sound should be correctly set in it&#039;s shader. So in a perfect world it shouldn&#039;t need any fixing by mappers.&lt;br /&gt;
&lt;br /&gt;
But for setting up your own sounds or fixing possible issues with &amp;quot;broken&amp;quot; assets, you can use [[Setting Up Speakers#volume/ s_volume|the &#039;&#039;s_volume&#039;&#039; property]].&lt;br /&gt;
&lt;br /&gt;
Since all sounds that don&#039;t have the unclamped keyword in their shader get capped by the sound engine before any real clipping occurs, it is not easy to spot when you&#039;re over the limit. There&#039;s a cure, that at least should work for normalized sounds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;s_clipvolumes 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will disable the engine&#039;s clipping protection. As a result affected sounds will cause hardware clipping -- you can&#039;t miss that.&lt;br /&gt;
&lt;br /&gt;
A more elegant way to trace volume issues would be doom&#039;s built-in volume meter. It can be enabled via&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;s_showLevelMeters 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
but seems to be broken in TDM right now.&lt;br /&gt;
&lt;br /&gt;
== Other tools ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;s_useocclusion 0&amp;lt;/code&amp;gt;: Will turn off occlusion on a global level. Sound propagation will always be line of sight. It is not visualized by drawsounds. Can be useful for comparison, esp. when bound to a key (&#039;&#039;bind n toggle s_useOcclusion&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;com_showdecoders 1&amp;lt;/code&amp;gt;: Will draw a few lines on your screen, showing the sounds currently playing.&lt;br /&gt;
&lt;br /&gt;
[[Category:Sound]]&lt;br /&gt;
[[Category:Editing]]&lt;/div&gt;</summary>
		<author><name>Plasticman</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=File:DrawSounds_Portals_2.png&amp;diff=15875</id>
		<title>File:DrawSounds Portals 2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=File:DrawSounds_Portals_2.png&amp;diff=15875"/>
		<updated>2013-02-06T05:18:52Z</updated>

		<summary type="html">&lt;p&gt;Plasticman: Sound propagation through multiple portals, pic 2/2.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sound propagation through multiple portals, pic 2/2.&lt;/div&gt;</summary>
		<author><name>Plasticman</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=File:DrawSounds_Portals_1.png&amp;diff=15874</id>
		<title>File:DrawSounds Portals 1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=File:DrawSounds_Portals_1.png&amp;diff=15874"/>
		<updated>2013-02-06T05:18:10Z</updated>

		<summary type="html">&lt;p&gt;Plasticman: Sound propagation through multiple portals, pic 1/2.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sound propagation through multiple portals, pic 1/2.&lt;/div&gt;</summary>
		<author><name>Plasticman</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Installation&amp;diff=15873</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Installation&amp;diff=15873"/>
		<updated>2013-02-03T06:29:44Z</updated>

		<summary type="html">&lt;p&gt;Plasticman: /* Install on Linux */  - removed &amp;quot;installed and patched&amp;quot; since there is no patch, only an installer.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{important|headline=Important|text=This article tells you how to install the full version of [[The Dark Mod]]. If you are installing one of the demos: &#039;&#039;Thief&#039;s Den&#039;&#039; or &#039;&#039;Saint Lucia&#039;&#039;, then you can ignore this page. Instead, follow the instructions here: [[Thief%27s_Den#Installation|Thief&#039;s Den Installation]] or [[Saint_Lucia|Saint Lucia Installation]].}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
{{important|headline=Important|text=You&#039;ll need to install the [http://www.dramthethief.com/darkmod/files/DOOM3-1.3.1.exe Doom 3 patch 1.3.1] otherwise the Mod won&#039;t run. Furthermore, the new BFG edition of Doom 3 does not offer mod support, so this is a no go.}}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
==== General ====&lt;br /&gt;
:At a minimum, you&#039;ll need a machine which is capable of running the Doom 3 game on comfortably high settings. The team recommends adding more RAM and a bit more CPU to the basic requirements, however, otherwise running the larger maps will be difficult.&lt;br /&gt;
&lt;br /&gt;
==== Operating System ====&lt;br /&gt;
:*Windows (2000/XP/Vista/Win7)&lt;br /&gt;
:*Linux&lt;br /&gt;
:*MacOSX&lt;br /&gt;
&lt;br /&gt;
==== Doom 3 Patch 1.3.1 ====&lt;br /&gt;
:In order to run The Dark Mod, you need to have the v1.3.1 patch for Doom 3 installed. See the [[#Weblinks|download section below]] for links, please use these links as there are some bad versions of this patch floating around some sites. Steam copies of Doom3 will already have the correct version and do not need to worry about this.&lt;br /&gt;
&lt;br /&gt;
:*Linux users: make sure that the install path for Doom 3 is all lowercase (e.g. &amp;lt;code&amp;gt;/usr/local/lib/doom3&amp;lt;/code&amp;gt;).&lt;br /&gt;
:*Non-English Windows users: Some combinations of Doom 3 English and a non-English version of Windows can result in the patch installer having trouble or not offering an English option, please see [http://modetwo.net/darkmod/index.php?/topic/11815-trouble-patching-and-launching| this forum thread].&lt;br /&gt;
&lt;br /&gt;
==== Hard Disk Space ====&lt;br /&gt;
:A rough estimate of how disk space required is &#039;&#039;&#039;3-4gb&#039;&#039;&#039;. As TDM is under continual development this is likely to increase slowly over time.&lt;br /&gt;
&lt;br /&gt;
:Breakdown of the estimate:&lt;br /&gt;
::* Doom 3 installation : 1.5 GB.&lt;br /&gt;
::* For the base TDM package you need another 2 GB.&lt;br /&gt;
::* Plus a variable amount of space you need for downloaded FM packages.&lt;br /&gt;
::* Plus a variable amount of space for screenshots, savegames, etc.&lt;br /&gt;
&lt;br /&gt;
:*FM&#039;s (Fan Mission) sizes vary as they depends on the amount of custom content(models, textures etc) the FM author is packing in. Usually FMs are very small, if they&#039;re using the stock TDM content (1 to 10 MB). FM&#039;s with large amounts of custom content can be quite large (20-60mb+), all content however is pre-compressed. For more information please see [[Fan Missions for The_ Dark Mod]].&lt;br /&gt;
:*Savegames vary in size, they can be a few MB per save depending on the size of the FM.&lt;br /&gt;
:*Screenshots depend on the screen resolution you&#039;re using (~2 MB per shot).&lt;br /&gt;
&lt;br /&gt;
==== References ====&lt;br /&gt;
:See the article [[Known System Configurations]] for a (hopefully growing) collection of system configurations and the corresponding user feedback.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installing The Dark Mod ==&lt;br /&gt;
=== Install on Windows ===&lt;br /&gt;
You need a working and patched Doom 3 installation (non BFG edition) on your hard drive. These steps will assume that you installed Doom 3 in the folder &amp;lt;tt&amp;gt;C:\Games\Doom3&amp;lt;/tt&amp;gt;. If you are using a Steam version of Doom3 please read [[FAQ#Does_it_run_with_the_Steam_version_of_Doom_3.3F |this FAQ note]].&lt;br /&gt;
&lt;br /&gt;
# Create a &#039;&#039;&#039;darkmod&#039;&#039;&#039; folder in your Doom 3 directory, like this: &#039;&#039;&#039;C:\Games\Doom3\darkmod\&#039;&#039;&#039;&lt;br /&gt;
# Download the [http://www.bloodgate.com/mirrors/tdm/pub/pk4/tdm_update_win.zip TDM Updater] from one of our mirrors.&lt;br /&gt;
# Extract &#039;&#039;&#039;tdm_update.exe&#039;&#039;&#039; from the downloaded ZIP and copy it into your &#039;&#039;&#039;C:\Games\Doom3\darkmod\&#039;&#039;&#039; folder.&lt;br /&gt;
# Run tdm_update.exe. The installer will connect to our download mirrors and start the download process.&lt;br /&gt;
# Be patient and wait. The download weighs about &#039;&#039;&#039;1.7 GB&#039;&#039;&#039; will take a while.&lt;br /&gt;
# If you see error messages about corrupt files, please try to run the updater again, these massive downloads are sometimes failing.&lt;br /&gt;
# After installation, you&#039;ll find an executable &amp;lt;tt&amp;gt;tdmlauncher.exe&amp;lt;/tt&amp;gt; in your darkmod folder, i.e. &amp;lt;tt&amp;gt;C:\Games\Doom3\darkmod\tdmlauncher.exe&amp;lt;/tt&amp;gt;. Use this to start The Dark Mod.&lt;br /&gt;
&lt;br /&gt;
Note for Windows 2000 users: please install the GDI+ redistributable package, as described here: [[TDM in Windows 2000]]&lt;br /&gt;
&lt;br /&gt;
=== Install on Linux ===&lt;br /&gt;
# You need the native version of Doom 3 (non BFG edition). Installation on Linux is explained on Id&#039;s Doom 3 Linux FAQ([[#Weblinks|see below]]), where you will find download links and install instructions. Be sure to download the 1.3.1.1304-version (not the demo).&lt;br /&gt;
# Since there is no 64 bit version of either Doom 3 or The DarkMod, on 64 bit systems you also need the 32 bit compatibility libraries installed. On some distributions like SuSE, these are included in the default installation, but on Kubuntu/Ubuntu you need to install the package called &amp;lt;code&amp;gt;ia32-lib&amp;lt;/code&amp;gt; and all its dependencies. Otherwise, even the installer for Doom 3 will fail to run.&lt;br /&gt;
# Create a folder &amp;lt;tt&amp;gt;~/.doom3/darkmod&amp;lt;/tt&amp;gt; in your home directory. Mind the dot in the path.&lt;br /&gt;
# Download the Linux version of the [http://www.bloodgate.com/mirrors/tdm/pub/pk4/tdm_update_linux.zip TDM Updater] and save it to &amp;lt;tt&amp;gt;~/.doom3/darkmod/&amp;lt;/tt&amp;gt;&lt;br /&gt;
# Extract &#039;&#039;tdm_update.linux&#039;&#039;: &amp;lt;tt&amp;gt;unzip tdm_update_linux.zip&amp;lt;/tt&amp;gt;&lt;br /&gt;
# Make &#039;&#039;tdm_update.linux&#039;&#039; executable: &amp;lt;tt&amp;gt;chmod +x tdm_update.linux&amp;lt;/tt&amp;gt;&lt;br /&gt;
# Run the updater: &amp;lt;tt&amp;gt;./tdm_update.linux&amp;lt;/tt&amp;gt;  It will connect to our mirrors and download the packages for you.&lt;br /&gt;
&lt;br /&gt;
# If you get an error about GLIBCXX_3.4.9, delete or rename the files &amp;lt;tt&amp;gt;/usr/local/games/doom3/libstdc++.so.6&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;/usr/local/games/doom3/libgcc_s.so.1&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Install on Mac OSX ===&lt;br /&gt;
# Ensure that Doom 3 (non BFG edition) is patched to v1.3.1 RevA (which provides native support for Intel processors), see below for links.&lt;br /&gt;
# It is recommended that the &amp;quot;Doom 3&amp;quot; program folder is installed into the Application Support folder (i.e. &amp;lt;tt&amp;gt;~/Library/Application Support/Doom 3/&amp;lt;/tt&amp;gt;). If Doom 3 is installed into a different location then additional steps will need to be followed.&lt;br /&gt;
# Download [http://www.bloodgate.com/mirrors/tdm/pub/pk4/mac/darkmod.zip darkmod.zip]. &lt;br /&gt;
# Move the resulting &amp;quot;darkmod&amp;quot; folder to the &amp;quot;Doom 3&amp;quot; folder (alongside &amp;quot;Doom 3.app&amp;quot; and the &amp;quot;base&amp;quot; folder).&lt;br /&gt;
# Within the darkmod folder, double-click the tdm_update_helper.command file to begin downloading the latest release of TDM (approx 2GB).&lt;br /&gt;
# Start The Dark Mod using the &amp;lt;tt&amp;gt;tdmlauncher_helper.command&amp;lt;/tt&amp;gt; script in your &amp;lt;tt&amp;gt;~/Library/Application Support/Doom 3/darkmod&amp;lt;/tt&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
==== Using a custom Doom 3 location ====&lt;br /&gt;
Until idTech4 is open sourced, there is some dependency on the Application Support folder, where FMs are currently downloaded to. If the Doom 3 folder is not located within Application Support, you&#039;ll need to do the following to allow TDM to function as intended:&lt;br /&gt;
&lt;br /&gt;
# Open up a terminal window (if you don&#039;t know how to do this, type &#039;terminal&#039; into the SpotLight search bar and press &#039;Enter&#039; to run the terminal application).&lt;br /&gt;
# Type the command &amp;lt;tt&amp;gt;cd ~/Library/Application\ Support/Doom\ 3/&amp;lt;/tt&amp;gt; and press the &#039;Enter&#039; key.&lt;br /&gt;
# Enter the command &#039;mkdir darkmod&#039; and then &#039;cd darkmod&#039; to change to the new darkmod directory.&lt;br /&gt;
# Create a symbolic link with the command &amp;lt;tt&amp;gt;ln /folder/darkmod/tdmlauncher.macosx tdmlauncher.macosx&amp;lt;/tt&amp;gt; where /folder/ is the path to your &amp;quot;Doom 3&amp;quot; program folder.&lt;br /&gt;
# You should now be able to launch TDM by double clicking the tdmlauncher_helper.command script in your &amp;quot;Doom 3&amp;quot; program folder where TDM has downloaded.&lt;br /&gt;
&lt;br /&gt;
==== tdmlauncher_helper.command ====&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 export TDMDIR=`dirname &amp;quot;$0&amp;quot;`&lt;br /&gt;
 exec &amp;quot;$TDMDIR/tdmlauncher.macosx&amp;quot; &amp;quot;$TDMDIR/../Doom 3.app/Contents/MacOS/Doom 3&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== tdm_update_helper.command ====&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 export TDMDIR=`dirname &amp;quot;$0&amp;quot;`&lt;br /&gt;
 cd &amp;quot;$TDMDIR&amp;quot;&lt;br /&gt;
 chmod +x tdm_update.macosx&lt;br /&gt;
 exec ./tdm_update.macosx &lt;br /&gt;
&lt;br /&gt;
==== Known issues ====&lt;br /&gt;
The automatic restart (when installing a FM, or restarting from the Graphics screen) currently fails to relaunch TDM v1.06 occasionally. If this happens, TDM will need to be launched manually by running the launcher program or script.&lt;br /&gt;
&lt;br /&gt;
== Alternative Download Methods ==&lt;br /&gt;
If you have troubles running tdm_update, you can see if [[tdm_update|this page]] helps you. Otherwise, you can also use other download methods to get a initial copy of the mod. Visit [http://www.mindplaces.com/darkmod/downloads.php TDM Downloads].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Launching The Dark Mod ==&lt;br /&gt;
Use the &#039;&#039;&#039;thedarkmod&#039;&#039;&#039; application to run The Dark Mod. This small application will take care of launching the Doom 3 process with the correct command line arguments. The application is available for all supported platforms.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Windows:&#039;&#039;&#039; &amp;lt;tt&amp;gt;C:\Games\Doom3\darkmod\thedarkmod.exe&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Linux:&#039;&#039;&#039; &amp;lt;tt&amp;gt;~/.doom3/darkmod/thedarkmod.x86&amp;lt;/tt&amp;gt;&lt;br /&gt;
** Before it can be run the first time, you must make &#039;&#039;&#039;tdmlauncher.linux&#039;&#039;&#039; executable: &amp;lt;br /&amp;gt;&amp;lt;tt&amp;gt;chmod +x ~/.doom3/darkmod/thedarkmod.x86&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Mac OSX:&#039;&#039;&#039; &amp;lt;tt&amp;gt;~/Library/Application Support/Doom 3/darkmod/thedarkmod.macosx&amp;lt;/tt&amp;gt;&lt;br /&gt;
** Before it can be run the first time, you must make &#039;&#039;&#039;thedarkmod.macosx&#039;&#039;&#039; executable: &amp;lt;br /&amp;gt;&amp;lt;tt&amp;gt;chmod +x ~/Library/Application Support/Doom 3/darkmod/thedarkmod.macosx&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; The application will also be used by the game itself when installing/re-installing/un-installing FM packages, so &#039;&#039;&#039;please don&#039;t delete tdmlauncher&#039;&#039;&#039;.&lt;br /&gt;
* See also [[Creating Desktop Shortcuts for TDM]].&lt;br /&gt;
* See also [[tdmlauncher in Gentoo Linux]]&lt;br /&gt;
&lt;br /&gt;
==== Troubleshooting the application ====&lt;br /&gt;
The &#039;&#039;&#039;thedarkmod&#039;&#039;&#039; executable will generate a small logfile &amp;lt;tt&amp;gt;tdmlauncher.log&amp;lt;/tt&amp;gt; each time it is invoked. The log file is located right next to the executable and might give some useful insight if the game fails to load.&lt;br /&gt;
&lt;br /&gt;
==== Passing custom command line arguments ====&lt;br /&gt;
Some people like to have custom command line arguments to the game, which is supported by the executable. Open the &amp;lt;tt&amp;gt;dmargs.txt&amp;lt;/tt&amp;gt; in your darkmod folder and add any arguments you&#039;d like the application to pass to the Doom3 command line.&lt;br /&gt;
* See also [[Doom3 command line arguments]].&lt;br /&gt;
&lt;br /&gt;
== First Startup ==&lt;br /&gt;
* Please take your time to read through [[The Dark Mod Gameplay]] article to get familiar with the game.&lt;br /&gt;
* TDM ships with a Training Mission which is designed to introduce you to TDM gameplay.  You should start this mission first even if you&#039;ve played stealth games before.&lt;br /&gt;
* Adjust the settings in the menus, like screen resolution and gameplay settings.&lt;br /&gt;
* See also the [[Performance Tweaks]] article to make TDM run a little bit faster if you&#039;re on a lower end machine.&lt;br /&gt;
* If you encounter a problem please check the [[FAQ]] and failing that leave a post in the TDM Support forum.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installing and Running Fan Missions ==&lt;br /&gt;
&lt;br /&gt;
Fan Missions can be downloaded from inside the TDM menu. Go to &amp;quot;New Mission&amp;quot; and click on &amp;quot;Get new missions&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can go to [http://www.thedarkmod.com/missions/ www.thedarkmod.com] to get hold of mission packages available for The Dark Mod. Each FM is contained in a PK4 file, which contains all the files necessary to run the mission. Sometimes missions also have an optional _l10n.pk4 file, this contains the content for all other languages than English.&lt;br /&gt;
&lt;br /&gt;
# Download the mission PK4 file - (IE7 may rename PK4s to zip, dont worry TDM looks for both pk4&#039;s and zip&#039;s).&lt;br /&gt;
# Drop the file into the fms/ folder, e.g. &amp;lt;tt&amp;gt;C:\Games\doom3\darkmod\fms\&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;~/.doom3/darkmod/fms&amp;lt;/tt&amp;gt;&lt;br /&gt;
# Launch The Dark Mod.&lt;br /&gt;
# The mission should now be listed in your &#039;&#039;New Mission&#039;&#039; menu.&lt;br /&gt;
# Highlight the mission and select &#039;&#039;Install&#039;&#039; to install. TDM will automatically restart.&lt;br /&gt;
# Select &#039;&#039;New Mission&#039;&#039; and then &#039;&#039;Start this Mission&#039;&#039; on the upper left.&lt;br /&gt;
&lt;br /&gt;
See the full article [[Installing and Running Fan Missions]] for a detailed explanation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== DoomConfig.cfg Howto ==&lt;br /&gt;
Game configuration settings are stored in the file DoomConfig.cfg but there is one in every FM folder as well as base and darkmod folders. Normally you just use the Settings menu but if you want to manually change or add any settings you should read  [[DoomConfig.cfg]] to see how they all integrate together or you may lose some settings if you edit the wrong way.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Weblinks ==&lt;br /&gt;
* Doom [http://www.dramthethief.com/darkmod/files/DOOM3-1.3.1.exe v1.3.1 patch for Windows]&lt;br /&gt;
* Doom v1.3.1 for Linux: [ftp://ftp.idsoftware.com/idstuff/doom3/ FTP] [http://zerowing.idsoftware.com:6969/ BitTorrent]&lt;br /&gt;
* Doom v1.3.1 RevA for Mac OSX (which provides native support for Intel processors): [http://support.aspyr.com/index.php/kb/article/000579 Doom v1.3.1 RevA] ([http://www.dramthethief.com/darkmod/files/Doom3Mac1.3.1RevA.dmg mirror])&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[tdm_update]] - If you have trouble with running the installer/updater.&lt;br /&gt;
* [[FAQ]] - Frequently Asked Questions and their answers.&lt;br /&gt;
* [[Hosting The Dark Mod]]&lt;br /&gt;
&lt;br /&gt;
{{installation}}&lt;/div&gt;</summary>
		<author><name>Plasticman</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=FAQ&amp;diff=13302</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=FAQ&amp;diff=13302"/>
		<updated>2011-08-17T01:33:26Z</updated>

		<summary type="html">&lt;p&gt;Plasticman: /* The sound lags behind the picture */  basically rewrote this section, ways to bypass PA without purging it, etc.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{important|headline=Important|text=This FAQ relates to the full TDM release version only. For players of the pre-release demos such as &#039;&#039;&#039;[[Thief&#039;s Den]]&#039;&#039;&#039; and &#039;&#039;&#039;[[Saint_Lucia|Tears of Saint Lucia]]&#039;&#039;&#039; please refer to the &#039;&#039;&#039;[[FAQ (Demo Releases)|Demo FAQ]]&#039;&#039;&#039;.&#039;&#039;&#039;}}&lt;br /&gt;
&lt;br /&gt;
== What Doom versions are supported? ==&lt;br /&gt;
&lt;br /&gt;
=== Can I use the Demo version of Doom 3? ===&lt;br /&gt;
&lt;br /&gt;
No, sorry.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Can I use it with the Doom 3 expansion Resurrection of Evil? ===&lt;br /&gt;
The Doom 3 RoE expansion is designed to run as modification to the base Doom 3 game. Hence it&#039;s not a problem to have it installed on your system, but only one mod can be run at a time of course. As long as you didn&#039;t move or extract files manually all over your Doom 3 folder, the Resurrection of Evil expansion should not interfere with The Dark Mod. Just to be clear, &#039;&#039;&#039;you&#039;ll still need to have the base Doom 3 game, the expansion alone won&#039;t suffice as it&#039;s just a mod&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Does it run with the Steam version of Doom 3? ===&lt;br /&gt;
&lt;br /&gt;
Yes :) You need to install the mod into the directory where Steam put Doom3, this might be under:&lt;br /&gt;
&lt;br /&gt;
 C:\Program Files\Steam\steamapps\common\doom 3&lt;br /&gt;
&lt;br /&gt;
or a similiar folder.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; Create a shortcut on your desktop and set it to the following:&lt;br /&gt;
&lt;br /&gt;
 steam.exe -applaunch 9050 +set fs_game_base darkmod&lt;br /&gt;
&lt;br /&gt;
This ensures that when you start Steam, it will launch TDM and not Doom 3 without TDM.&lt;br /&gt;
&lt;br /&gt;
== Patching Doom 3 to verson 1.3.1.1304 ==&lt;br /&gt;
&lt;br /&gt;
=== How can I check whether my Doom 3 is correctly patched? ===&lt;br /&gt;
&lt;br /&gt;
Open Doom 3 and hit {{key|Ctrl}}+{{key|Alt}}+{{key|~}} (tilde, {{key|^}} on German keyboards) to open the console. You&#039;ll see the version printed in the lower left corner of the console. It should read &#039;&#039;&#039;1.3.1.1304&#039;&#039;&#039;. If your version is ending on 1302, you&#039;ve got the wrong patch installed.&lt;br /&gt;
&lt;br /&gt;
=== Where can I get the right patch? ===&lt;br /&gt;
&lt;br /&gt;
We have the patch hosted on our FTP. See the [[Installation]] article to find a link to it.&lt;br /&gt;
&lt;br /&gt;
If you have version 1.3.1.1302, you may need to uninstall and reinstall before patch 1.3.1.1304 will let you apply it.&lt;br /&gt;
&lt;br /&gt;
=== What&#039;s that issue with the 1.3.1 patch? ===&lt;br /&gt;
&lt;br /&gt;
When the 1.3.1 patch was released by Id, they released it a bit too early. Some download sites picked it up quite fast though and started to distribute it. The problem is, that Id replaced that patch with a different one, and, probably thinking that it hadn&#039;t spread yet, didn&#039;t bother to change the version number. However, you can still find &amp;quot;wrong&amp;quot; 1.3.1 patches and these will not work with the mod. That&#039;s why it is important to check the version number in the console to make sure that the right 1.3.1 patch is installed if the mod doesn&#039;t work. The link provided here on our own page points to the correct patch, so if you downloaded it from here you don&#039;t need to worry about it.&lt;br /&gt;
&lt;br /&gt;
== Supported Operating Systems ==&lt;br /&gt;
&lt;br /&gt;
=== Which Windows versions can I use? ===&lt;br /&gt;
&lt;br /&gt;
The following versions of windows have been tested and are known to work : Windows 2000, Windows XP, Windows Vista, Windows 7, Windows Server 2008, Windows Server 2003 in both 32bit and 64bit flavours.&lt;br /&gt;
&lt;br /&gt;
==== PAE Enabled ====&lt;br /&gt;
&lt;br /&gt;
One user with Windows XP Pro SP3 and an AMD Phenom processor reported problems starting Doom 3 due to having PAE enabled.&lt;br /&gt;
&lt;br /&gt;
[http://modetwo.net/darkmod/index.php?/topic/12471-error-doom-3/ Thread]&lt;br /&gt;
&lt;br /&gt;
=== Does it run in Linux? ===&lt;br /&gt;
Yes, Linux is supported.&lt;br /&gt;
&lt;br /&gt;
=== Does it run in 64 Bit Linux? ===&lt;br /&gt;
Yes, Linux 64 bit is supported. In addition to the steps above, you need 32 bit compatibility libraries, since Doom3 is 32 bit only:&lt;br /&gt;
* On &#039;&#039;&#039;SuSE&#039;&#039;&#039;, they should be included.&lt;br /&gt;
* On Ubuntu/Kubuntu, install the package &#039;&#039;&#039;ia32&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
For TDM after 1.0, this step should be &#039;&#039;&#039;no&#039;&#039;&#039; longer neccessary:&lt;br /&gt;
&lt;br /&gt;
* Since you cannot install 32 bit libraries on a 64 bit system with the normal package manager, you should use [http://ubuntuforums.org/showthread.php?t=474790 getlibs] to install &#039;&#039;&#039;libmng&#039;&#039;&#039; and the boost filesystem lib:&lt;br /&gt;
:&amp;lt;code&amp;gt;getlibs libmng.so.1&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;getlibs -l libboost-filesystem1.34.1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What about Gentoo? ===&lt;br /&gt;
Yes. It&#039;s not &amp;quot;officially&amp;quot; supported (the team doesn&#039;t test it specifically), however several users have reported success running TDM under Gentoo.&lt;br /&gt;
&lt;br /&gt;
=== What about Ubuntu 8.10? ===&lt;br /&gt;
Yes. As of this writing you will need to install the &#039;&#039;&#039;libboost-filesystem&#039;&#039;&#039; package.&lt;br /&gt;
&lt;br /&gt;
=== GLIBCXX_3.4.9 errors ===&lt;br /&gt;
&lt;br /&gt;
If you receive an error about &amp;lt;tt&amp;gt;GLIBCXX_3.4.9&amp;lt;/tt&amp;gt;, delete or rename the files &amp;lt;code&amp;gt;/usr/local/games/doom3/libstdc++.so.6&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/usr/local/games/doom3/libgcc_s.so.1.&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this doesn&#039;t resolve the error and you have an old version of GCC, then you may have to upgrade. It has been [http://modetwo.net/darkmod/index.php?/topic/9982-the-dark-mod-doom3-in-linux/ confirmed] that, at least under Gentoo, GCC 4.1 does not work with TDM but GCC 4.3 and GCC 4.4 are compatible.&lt;br /&gt;
&lt;br /&gt;
=== Does it run on Mac OS X?===&lt;br /&gt;
Yes. See [[Installation]].&lt;br /&gt;
&lt;br /&gt;
== Graphics ==&lt;br /&gt;
&lt;br /&gt;
=== Does TDM support widescreen resolutions? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Choose &amp;quot;16:9&amp;quot; or &amp;quot;16:10&amp;quot; in the in-game &#039;&#039;Settings&#039;&#039; menu, and select the appropriate resolution. Note that you need to restart the game to have the new setting in effect.&lt;br /&gt;
&lt;br /&gt;
If the native resolution of your wide screen monitor is not listed, you can enter it into &#039;&#039;&#039;DoomConfig.cfg&#039;&#039;&#039; by changing the following entries like so:&lt;br /&gt;
&lt;br /&gt;
 set r_mode &amp;quot;-1&amp;quot;&lt;br /&gt;
 set r_customwidth &amp;quot;1280&amp;quot;&lt;br /&gt;
 set r_customheight &amp;quot;800&amp;quot;&lt;br /&gt;
 seta r_aspectratio &amp;quot;2&amp;quot;            // means 16:10, &amp;quot;1&amp;quot; is 16:9, other ratios are not yet supporred&lt;br /&gt;
&lt;br /&gt;
{{infobox|If you get performance problems, please consider using a lower resolution and taking a look at [[Performance Tweaks]].}}&lt;br /&gt;
&lt;br /&gt;
==== What about TV resolutions like 1360x768? ====&lt;br /&gt;
&lt;br /&gt;
If you have a wide-screen TV which uses any non-standard resolution, like 1360x768 (instead of 1366x768), then please use the following:&lt;br /&gt;
&lt;br /&gt;
 seta r_customWidth &amp;quot;1360&amp;quot;&lt;br /&gt;
 seta r_customHeight &amp;quot;768&amp;quot;&lt;br /&gt;
 seta r_mode &amp;quot;-1&amp;quot;&lt;br /&gt;
 seta r_aspectratio 2&lt;br /&gt;
 seta g_fov &amp;quot;100&amp;quot;                  // or any other suitable value&lt;br /&gt;
&lt;br /&gt;
Alternatively, see the manual of your TV on the possibility to switch it to a &amp;quot;1:1&amp;quot; pixel mapping, or &amp;quot;monitor mode&amp;quot; or &amp;quot;computer mode&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Here is some background information: http://hd.engadget.com/2006/04/21/whats-the-deal-with-1366-x-768/&lt;br /&gt;
&lt;br /&gt;
{{infobox|If you get performance problems, please consider using a lower resolution and taking a look at [[Performance Tweaks]].}}&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
It is hard to answer questions on why something fails, because wildly different systems cause wildly different symptoms. If the following section does not help you, please ask at our [http://www.modetwo.net/darkmod forums].&lt;br /&gt;
&lt;br /&gt;
For any solutions below that refer to &amp;quot;disabling Catalyst AI&amp;quot;, if you discover you can not use ATI&#039;s tools to do so, alternate methods are discussed in [[#Disable Catalyst AI in recent AMD ATI drivers|Disable Catalyst AI in recent AMD ATI drivers]] below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Updater (tdm_update.exe) closes almost as soon as it&#039;s started ===&lt;br /&gt;
&lt;br /&gt;
See the [[Tdm_update#Updater_closes_almost_as_soon_as_it.27s_started|main article on tdm_update]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Windows 2000: freeaddrinfo cannot be found in WS2_32.DLL ===&lt;br /&gt;
Please refer to the main article [[TDM in Windows 2000]] to work around this problem.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===FM won&#039;t install manually===&lt;br /&gt;
&lt;br /&gt;
If you are running Dark Mod under Linux and have edited the file darkmod/currentfm.txt this might prevent the FM from installing. This may be fixed in an update but apparently editing using notepad under Wine works OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== FMs downloaded but don&#039;t show in menu list===&lt;br /&gt;
&lt;br /&gt;
You have downloaded some FMs but they don&#039;t show on Dark Mod&#039;s New Missions list. Possible causes:&lt;br /&gt;
&lt;br /&gt;
* You must not extract the pk4s or zip files but put them into the darkmod/fms folder (or alternatively you can create the FM folder in there eg, darkmod/fms/chalice for chalice.pk4 or chalice.zip.&lt;br /&gt;
* Early versions of Dark Mod cannot handle zip suffixes. Solution: rename to .pk4 or run tdm_update to get the latest version of Dark Mod.&lt;br /&gt;
* If you are running Linux then Doom 3 MUST be installed in a .doom3 folder. Note the dot before .doom3.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== FM downloaded but won&#039;t play ===&lt;br /&gt;
&lt;br /&gt;
If you have downloaded an FM you might see it in the New Missions List but can&#039;t get it to play. These are almost always an install problem. These are some of the causes and cures:&lt;br /&gt;
&lt;br /&gt;
FMs (fan missions) are archives and in early versions of Dark Mod MUST be suffixed .pk4 not zip. Apparently Internet Explorer 8 may change it from pk4 to zip during download without telling you. You need to rename it back if running an early version of Dark Mod else run tdm_update to update and then zip files are OK.&lt;br /&gt;
&lt;br /&gt;
You MUST use doom3\darkmod\tdmlauncher.exe to run Dark Mod in Windows and NOT Doom3.exe.&lt;br /&gt;
&lt;br /&gt;
You do NOT need to extract the pk4 archives to install or play. Just download into or move the pk4 into the darkmod\fms folder. Optionally you can create a folder of the same name as the map and put it in there, eg, darkmod\fms\chalice but there is no need because Dark Mod will create that automatically. Just make sure your pk4 goes, unopened, into the fms folder, then run tdmlauncher.exe&lt;br /&gt;
&lt;br /&gt;
If you have done the above but see for example, a blank objectives screen and no briefing then it is still almost certainly an install error. I recommend you do a clean sweep if in doubt:&lt;br /&gt;
* Exit Dark Mod&lt;br /&gt;
* Delete doom3\darkmod\currentfm.txt (this just uninstalls any FM)&lt;br /&gt;
* Delete the map game folder (if any). This is NOT the folder in fms but the folder in doom3 of the same name as the FM, eg, doom3\chalice. Note: this has savegames and screenshots in it so check and move them out if you want to preserve them. However, if you can&#039;t get the game to play it&#039;s likely you don&#039;t have any yet. If you can&#039;t see the folder don&#039;t worry. The folder name is normally the same as the pk4 but it might not be. Strictly speaking it must be the same as the name in startingmap.txt inside the pk4 archive. You might see this file in fms.&lt;br /&gt;
* Move the pk4 into the darkmod\fms folder if it is not already there.&lt;br /&gt;
* Delete the darkmod\fms\FMname folder if any, eg, darkmod\fms\chalice. Don&#039;t worry if there isn&#039;t one; it will be created automatically later.&lt;br /&gt;
&lt;br /&gt;
So all that is left is the pk4 in the fms folder. Now run tdmlauncher.exe. The FM should be in the list in the New Missions menu. Re-install it and you should now be able to play it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The game crashes on load ===&lt;br /&gt;
Make sure that:&lt;br /&gt;
* You installed [[#Patching_Doom_3_to_verson_1.3.1.1304|the correct version]] of the Doom 3 1.3.1 patch.&lt;br /&gt;
* Your system meets at least the minimum system specs.&lt;br /&gt;
* You have enough free main memory. Try closing a few running programs like Outlook, Anti-Virus or torrent clients.&lt;br /&gt;
* Nvidia &amp;quot;Threaded Optimizations&amp;quot; are causing Doom 3 Mod stability issues (see: [[#Disable Nvidia &amp;quot;Threaded Optimizations&amp;quot;|Disable Nvidia &amp;quot;Threaded Optimizations&amp;quot;]] )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If that doesn&#039;t fix it, you probably receive an error message referencing an &amp;quot;Unknown event&amp;quot; at startup, like the screenshot below illustrates.&lt;br /&gt;
&lt;br /&gt;
[[Image:ErrorSetEntityRelation.jpg]]&lt;br /&gt;
&lt;br /&gt;
Here are a couple of known problems and their solutions:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&#039;&#039;&#039;tdmlauncher.exe fails to copy&#039;&#039;&#039; the necessary game binaries. The log file should read something like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;found DLL in pak file: C:\Program Files\Doom 3\darkmod\tdm_game01.pk4/gamex86.dll&lt;br /&gt;
copy gamex86.dll to C:\Program Files\Doom 3\darkmod\gamex86.dll&lt;br /&gt;
could not create destination file&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sometimes, the procedure fails due to &#039;&#039;&#039;spaces in the installation path&#039;&#039;&#039;. Try extracting the gamex86.dll manually using Winzip or similar or install Doom 3 in a different directory.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;You have a &#039;&#039;&#039;firewall&#039;&#039;&#039; installed that prevents the copy procedure, because since version 1.03, TDM has a built-in mission downloader. This misbehavior has been reported for the &#039;&#039;&#039;COMODO Firewall&#039;&#039;&#039;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;It is also possible that an &#039;&#039;&#039;old version of gamex86.dll&#039;&#039;&#039; (or gamex86.so) is lying around in your Doom 3 folder. Delete it and try again.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Textures are missing, screen mostly black ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Tdm missing textures.jpg|right|240px|Black textures]]&lt;br /&gt;
&lt;br /&gt;
Look into your &#039;&#039;&#039;DoomConfig.cfg&#039;&#039;&#039; inside your &amp;lt;tt&amp;gt;darkmod&amp;lt;/tt&amp;gt; folder and check that the following settings are like shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width:35em&amp;quot;&amp;gt;&lt;br /&gt;
 seta image_usePrecompressedTextures &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_useNormalCompression &amp;quot;2&amp;quot;&lt;br /&gt;
 seta image_useAllFormats &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_useCompression &amp;quot;0&amp;quot;&lt;br /&gt;
 seta image_preload &amp;quot;1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Textures are missing, shadows are pitch black ===&lt;br /&gt;
&lt;br /&gt;
Try disabling the AGP surface accelerator in DXDIAG.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Graphic Corruption ===&lt;br /&gt;
&lt;br /&gt;
One report we had was for a Radeon ATI HD 4650, catalyst 10.9. This screen corruption as I understand it was heavy pixelation even on the menus. Closing down Xfire fixed it. &amp;quot;I fiddled with the xfire Doom 3 configuration through the xfire_games.ini, and determined it has to do with InGameFlags portion. For some reason the settings in that were interfering with doom 3, and after I removed some things from there, I was still able to run xfire, and doom 3 was still able to look proper.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
(For more recent Catalyst versions see: [[#Disable Catalyst AI in recent AMD ATI drivers|Disable Catalyst AI in recent AMD ATI drivers]] )&lt;br /&gt;
&lt;br /&gt;
=== The briefing is very fuzzy ===&lt;br /&gt;
&lt;br /&gt;
Look into your &#039;&#039;&#039;DoomConfig.cfg&#039;&#039;&#039; inside your &amp;lt;tt&amp;gt;darkmod&amp;lt;/tt&amp;gt;  folder and check that the following settings are like shown below:&lt;br /&gt;
&lt;br /&gt;
 seta image_roundDown &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_forceDownSize &amp;quot;0&amp;quot;&lt;br /&gt;
 seta image_downSize &amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== The sky is corrupted ===&lt;br /&gt;
&lt;br /&gt;
You either see black sky, or fragments of other textures. This seems only to happen on Geforce 6800 cards.&lt;br /&gt;
&lt;br /&gt;
There are two fixes for this:&lt;br /&gt;
&lt;br /&gt;
As a quick fix you can rename the following folder:&lt;br /&gt;
&lt;br /&gt;
 env/skyboxes/skybox_darkland_ne&lt;br /&gt;
&lt;br /&gt;
to a different name. That will result in black sky.&lt;br /&gt;
&lt;br /&gt;
Alternatively, edit the file &amp;lt;tt&amp;gt;materials/tdm_sky.mtr&amp;lt;/tt&amp;gt; with &#039;&#039;&#039;Wordpad&#039;&#039;&#039; or a different editor and&lt;br /&gt;
find the sky material named &#039;&#039;&#039;textures/darkmod/nature/skybox/skybox_darkland_NE&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 //Author: Dram&lt;br /&gt;
 //skybox_ocean with ocean replaced with dark land&lt;br /&gt;
 //Moon moved to north east by Fidcal&lt;br /&gt;
 textures/darkmod/nature/skybox/skybox_darkland_NE&lt;br /&gt;
    {&lt;br /&gt;
    qer_editorimage env/skyboxes/skybox_ocean/ocean_ed&lt;br /&gt;
    noFragment&lt;br /&gt;
    noshadows&lt;br /&gt;
    noimpact&lt;br /&gt;
    nooverlays&lt;br /&gt;
    forceOpaque&lt;br /&gt;
    {&lt;br /&gt;
        forceHighQuality&lt;br /&gt;
        blend add&lt;br /&gt;
        cameraCubeMap env/skyboxes/skybox_darkland_ne/darkland_NE&lt;br /&gt;
        texgen skybox&lt;br /&gt;
        texgen wobblesky .0 .0 .0&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this declaration, comment out the line that reads &#039;&#039;&#039;forceHighQuality&#039;&#039;&#039; by adding &amp;lt;tt&amp;gt;//&amp;lt;/tt&amp;gt; in front of it:&lt;br /&gt;
&lt;br /&gt;
  // forceHighQuality&lt;br /&gt;
&lt;br /&gt;
That should fix the sky and make it render correctly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The Sky rotates ===&lt;br /&gt;
&lt;br /&gt;
This problem only affects FMs with a dynamic sky (eg, moving clouds etc.).&lt;br /&gt;
&lt;br /&gt;
If you see the sky spinning it may be an ATI graphics card problem. One report says this was cured by turning off Catalyst AI. Also gives better loading times and cures [[#HDR-Lite Post-Processing problems|HDR-Lite Post-Processing Problems]].&lt;br /&gt;
&lt;br /&gt;
If that doesn&#039;t fix it then try this. Note that it replaces dynamic sky with a static clear one so it might look odd in a stormy FM for example, but better than a spinning sky:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Create a new folder in your darkmod folder called materials.&lt;br /&gt;
* Within it create a plain text file named no_skybox.mtr.&lt;br /&gt;
* Paste in the following:&lt;br /&gt;
&lt;br /&gt;
 textures/smf/portal_sky&lt;br /&gt;
 {&lt;br /&gt;
 	qer_editorimage env/skyboxes/skybox_ocean/ocean_ed&lt;br /&gt;
 	noFragment&lt;br /&gt;
 	&lt;br /&gt;
 	noimpact&lt;br /&gt;
 	nooverlays&lt;br /&gt;
 	forceOpaque&lt;br /&gt;
 	noShadows&lt;br /&gt;
 	{&lt;br /&gt;
 		forceHighQuality&lt;br /&gt;
 		blend add&lt;br /&gt;
 		cameraCubeMap env/skyboxes/skybox_darkland_ne/darkland_NE&lt;br /&gt;
 		texgen skybox&lt;br /&gt;
 		texgen wobblesky .0 .0 .0&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(For more recent Catalyst versions see: [[#Disable Catalyst AI in recent AMD ATI drivers|Disable Catalyst AI in recent AMD ATI drivers]] )&lt;br /&gt;
&lt;br /&gt;
=== HDR-Lite Post-Processing problems ===&lt;br /&gt;
&lt;br /&gt;
Some owners of ATI graphics cards reported various artifacts when HDR-Lite Post-Processing was enabled. Among these artifacts are a distorted or upside-down screen and spinning sky. These can usually be fixed by disabling Catalyst AI, which also gives better loading times.&lt;br /&gt;
&lt;br /&gt;
To turn off Catalyst AI, open your Catalyst control panel, go to &#039;graphics&#039; at the top left, select &#039;3d&#039; from the dropdown list and on the new menu below, select &#039;AI&#039;. Now select the &#039;Disable Catalyst A.I.&#039; checkbox.&lt;br /&gt;
&lt;br /&gt;
(For more recent Catalyst versions see: [[#Disable Catalyst AI in recent AMD ATI drivers|Disable Catalyst AI in recent AMD ATI drivers]] )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It has also been suspected that HDR-Lite Post-Processing may lead to [[#Underwater performance poor|poor performance underwater]], see next point:&lt;br /&gt;
&lt;br /&gt;
===Underwater performance poor===&lt;br /&gt;
&lt;br /&gt;
Some people suffer from very low framerates underwater with HDR-Lite Post-Processing enabled. Currently, the only known fix to this problem is to set &#039;&#039;&#039;g_doubleVision&#039;&#039;&#039; to 0 in the console. This however disables the doubleVision effect completely, so that there is no underwater-blur any more. The murkiness still remains though.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Upside-down screen===&lt;br /&gt;
&lt;br /&gt;
If you get an upside-down screen, you can either turn off Catalyst AI if you have an ATI card or try turning off HDR-Lite Post-Processing in the advanced video options.&lt;br /&gt;
&lt;br /&gt;
To turn off Catalyst AI, open your Catalyst control panel, go to &#039;graphics&#039; at the top left, select &#039;3d&#039; from the dropdown list and on the new menu below, select &#039;AI&#039;. Now select the &#039;Disable Catalyst A.I.&#039; checkbox. &lt;br /&gt;
&lt;br /&gt;
(For more recent Catalyst versions see: [[#Disable Catalyst AI in recent AMD ATI drivers|Disable Catalyst AI in recent AMD ATI drivers]] )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The game is &#039;&#039;&#039;very&#039;&#039;&#039; slow! ===&lt;br /&gt;
&lt;br /&gt;
If you get less than 10 FPS, or the game even stutters, please try this:&lt;br /&gt;
&lt;br /&gt;
Look into your &#039;&#039;&#039;DoomConfig.cfg&#039;&#039;&#039; inside your &amp;lt;tt&amp;gt;darkmod&amp;lt;/tt&amp;gt; folder and check that the&lt;br /&gt;
following settings are like shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width:35em&amp;quot;&amp;gt;&lt;br /&gt;
 seta image_usePrecompressedTextures &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_useNormalCompression &amp;quot;2&amp;quot;&lt;br /&gt;
 seta image_useAllFormats &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_useCompression &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_preload &amp;quot;1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that doesn&#039;t help, your system might run out of memory. Either upgrade to more than 1 Gbyte memory,&lt;br /&gt;
or try to close other applications before playing.&lt;br /&gt;
&lt;br /&gt;
Please see also the article about [[Performance Tweaks]] to improve the performance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Slow loading times ===&lt;br /&gt;
&lt;br /&gt;
If you find an FM is very slow to load it may be an ATI graphics card problem. One report says this was cured by turning off Catalyst AI. Also cures [[#HDR-Lite Post-Processing problems|HDR-Lite Post-Processing Problems]].&lt;br /&gt;
&lt;br /&gt;
Changing the following settings to 0 will also reduce loading time, but be warned: if you have a lower-end system, poor graphics card, or low ram, you will likely notice a performance hit ingame since you will now be using uncompressed textures.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width:35em&amp;quot;&amp;gt;&lt;br /&gt;
 seta image_useNormalCompression &amp;quot;0&amp;quot;&lt;br /&gt;
 seta image_useCompression &amp;quot;0&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Game freezes for several seconds when opening doors===&lt;br /&gt;
The following problems :&lt;br /&gt;
&lt;br /&gt;
A) &amp;quot;game freezes and loads some data from hard drive while opening doors&amp;quot;&lt;br /&gt;
B) &amp;quot;while loading mission you are returned to the menu and need to restart loading&amp;quot;&lt;br /&gt;
&lt;br /&gt;
are often resolved by disabling EAX 4.0 HD in the Audio Settings menu.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Game exits to menu after mission load, with renderpipe error in console===&lt;br /&gt;
&lt;br /&gt;
* {{Red|Version 1.06 does not use named pipes. This is a depreciated issue.}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Symptoms:&#039;&#039;&#039; Missions are installed properly and will load, but after they reach 100% you are returned to the main menu or objectives screen. If you open the console (Ctrl-Alt-~ on US keyboards), you see one/both of these errors:&lt;br /&gt;
&lt;br /&gt;
 ERROR: Failed to open \\.\pipe\dm_renderpipe&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 ERROR: idRenderSystemLocal::uncrop currentcrop &amp;lt;1&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution:&#039;&#039;&#039; Some firewalls, notably &#039;&#039;Sunbelt Firewall&#039;&#039; (aka &#039;&#039;Kerio Firewall&#039;&#039;) are known to interfere with TDM&#039;s lightgem, &#039;&#039;even when &amp;quot;disabled&amp;quot;&#039;&#039;. To fix this problem, completely uninstall the firewall and get a different one instead.&lt;br /&gt;
&lt;br /&gt;
Related [http://bugs.angua.at/view.php?id=543 #543]: Consider using glReadPixels for lightgem instead of named pipes.&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;COULD NOT FIND TDMLAUNCHER&amp;quot; when installing an FM===&lt;br /&gt;
&lt;br /&gt;
If you receive this error message you should check the start-arguments of DOOM3.exe / tdmlauncher.exe. Arguments are stored in darkmod/dmargs.txt and a faulty syntax e.g. a missing &amp;quot;+&amp;quot; before a &amp;quot;set&amp;quot;-command, will lead to this error message. Steam users are advised to remove any launch-options from Doom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===The sound lags behind the picture===&lt;br /&gt;
&lt;br /&gt;
This seems to happen on some Linux Distributions with PulseAudio. Doom&#039;s sound engine defaults to ALSA, you can try to use OSS instead:&lt;br /&gt;
&lt;br /&gt;
Add the following to your &#039;&#039;dmargs.txt&#039;&#039; (it is in &#039;&#039;~/.doom/darkmod/&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 +set s_driver oss&lt;br /&gt;
&lt;br /&gt;
If your system does not provide OSS or a working OSS-emulation (try &#039;&#039;padsp ./tmdlauncher-linux&#039;&#039;), reset this to &#039;&#039;best&#039;&#039; which means ALSA.&lt;br /&gt;
&lt;br /&gt;
While OSS or ALSA deal directly with the sound hardware, PulseAudio is a soundserver that puts itself between the application (doom3) and ALSA. Your goal is to bypass the PA-part while playing TDM.&lt;br /&gt;
&lt;br /&gt;
You can either disable the PulseAudio daemon temporarily or connect Doom directly to ALSA.&lt;br /&gt;
&lt;br /&gt;
To disable PA, create a file named &#039;&#039;client.conf&#039;&#039; in &#039;&#039;~/.pulse&#039;&#039; which contains:&lt;br /&gt;
&lt;br /&gt;
 autospawn=no&lt;br /&gt;
&lt;br /&gt;
Then open a terminal and type:&lt;br /&gt;
&lt;br /&gt;
 pulseaudio -k&lt;br /&gt;
&lt;br /&gt;
When sound playback fails, make sure you have &#039;&#039;s_driver&#039;&#039; set to &#039;&#039;best&#039;&#039;, and &#039;&#039;s_alsa_pcm&#039;&#039; to &#039;&#039;default&#039;&#039;. When it works, you propably want to adjust volume settings outside TDM. Try &#039;&#039;alsamixer&#039;&#039; (in a terminal).&lt;br /&gt;
&lt;br /&gt;
When you&#039;re finished playing, turn PA back on:&lt;br /&gt;
&lt;br /&gt;
 pulseaudio -D&lt;br /&gt;
&lt;br /&gt;
starts the daemon. Changing &#039;&#039;autospawn&#039;&#039; to &#039;&#039;yes&#039;&#039; should prevent you from doing this manually after every reboot.    :)&lt;br /&gt;
&lt;br /&gt;
The other way, just bypassing PA, requires some knowledge about your sound hardware. Type&lt;br /&gt;
&lt;br /&gt;
 aplay -L&lt;br /&gt;
&lt;br /&gt;
This gives you a long list of your ALSA playback devices, three lines for each, first line is &#039;&#039;&amp;lt;name&amp;gt;&#039;&#039;. Choose the one with PCM Playback that your speakers are connected to and add&lt;br /&gt;
&lt;br /&gt;
 +set s_alsa_pcm &amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to &#039;&#039;dmargs.txt&#039;&#039;. If &#039;&#039;&amp;lt;name&amp;gt;&#039;&#039; is not convenient for you just try something like hw:1,0 if you know what you are doing, but be aware abstract designations like &#039;&#039;default&#039;&#039; will get &amp;quot;hijacked&amp;quot; by PA.&lt;br /&gt;
&lt;br /&gt;
=== Changing the screen resolution/aspect ratio does nothing!? ===&lt;br /&gt;
&lt;br /&gt;
These changes require a restart of Doom to work. Alternatively the command vid_restart can be issued at the console. It can take quite some time to execute this command, depending on whether or not you&#039;re already ingame. It will still be a lot faster than restarting and reloading the game though.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Steam launches D3, not TDM ===&lt;br /&gt;
&lt;br /&gt;
Whenever you start Steam and it launches vanilla Doom instead of TDM, make sure you follow this advice:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; Create a shortcut on your desktop and set it to the following:&lt;br /&gt;
&lt;br /&gt;
 steam.exe -applaunch 9050 +set fs_game_base darkmod&lt;br /&gt;
&lt;br /&gt;
This ensures that when you start Steam, it will launch TDM and not Doom 3 without TDM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Disable Catalyst AI in recent AMD ATI drivers ===&lt;br /&gt;
&lt;br /&gt;
From (at least) Catalyst versions 10.12 and beyond, the ability to disable Catalyst AI properly&lt;br /&gt;
has been changed or removed.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Rage3d and Guru3d have advised using &amp;quot;Radeon Pro&amp;quot; to address this.&lt;br /&gt;
&lt;br /&gt;
Steps&lt;br /&gt;
&lt;br /&gt;
* 1) Remove Catalyst Control Center (removing all ATI drivers recommended then re-install just the Display driver)&lt;br /&gt;
* 2) Download and install &amp;quot;Radeon Pro&amp;quot; [http://forums.guru3d.com/showthread.php?t=322031 Radeon Pro Thread at Guru3D]&lt;br /&gt;
* 3) Create a profile as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
If you&#039;re using RadeonPro, create a profile for the game you want to disable Catalyst AI. &lt;br /&gt;
Right-click the newly created profile, keep left shift key pressed and choose &lt;br /&gt;
Open Location on context-menu, this will open the profile&#039;s XML definition. &lt;br /&gt;
Append a new line and add entry like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Property name=&amp;quot;CatalystAI&amp;quot; value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save the file and start the game. CatalystAI should be disabled.&lt;br /&gt;
&lt;br /&gt;
I also recommend to open ___GlobalProfile.xml &lt;br /&gt;
(found on same directory where your profile is saved) &lt;br /&gt;
and look for &amp;quot;CatalystAI&amp;quot; entry, it must be equal to &amp;quot;1&amp;quot; &lt;br /&gt;
otherwise CatalystAI will be kept disabled after you exit your game.&lt;br /&gt;
&lt;br /&gt;
CFX disabled by setting CatalystAI to 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here&#039;s another alternate method for Windows users:&lt;br /&gt;
&lt;br /&gt;
* 1) Obtain a copy of the free &amp;quot;ATI Tray Tools&amp;quot; by Ray Adams from [http://downloads.guru3d.com/download.php?det=733 Guru3d].&lt;br /&gt;
&lt;br /&gt;
* 2) Install it into your Windows tray.&lt;br /&gt;
&lt;br /&gt;
* 3) Right-click it.&lt;br /&gt;
&lt;br /&gt;
* 4) Select Direct 3d -&amp;gt; Catalyst AI -&amp;gt; Off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Disable Nvidia &amp;quot;Threaded Optimizations&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
Many random crash behaviors seen by Nvidia users can be resolve by the following steps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open Nvidia Control Panel -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Manage 3D Settings -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bottom half of list locate &amp;quot;Threaded Optimization&amp;quot; &amp;lt;-- Set to NO / Off&lt;br /&gt;
&lt;br /&gt;
Also set &amp;quot;Multi-display/Mixed GPU acceleration&amp;quot; to &amp;quot;Single display performance mode&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Known Bugs]]&lt;br /&gt;
* [[Gameplay]]&lt;br /&gt;
&lt;br /&gt;
{{installation}} {{general}}&lt;/div&gt;</summary>
		<author><name>Plasticman</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Debugging_Your_Speakers&amp;diff=11677</id>
		<title>Debugging Your Speakers</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Debugging_Your_Speakers&amp;diff=11677"/>
		<updated>2010-11-28T17:14:40Z</updated>

		<summary type="html">&lt;p&gt;Plasticman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is some sort of a follow-up, please read first [[Setting Up Speakers]].&lt;br /&gt;
&lt;br /&gt;
== Don&#039;t forget your ears ==&lt;br /&gt;
&lt;br /&gt;
There are ways to visualize what&#039;s going on with the audio in game, and it can be tempting to rely too much on that. But what finally counts is what can be heard by the player.&amp;lt;br&amp;gt;&lt;br /&gt;
So just like it is clear that you check your map&#039;s visuals with your eyes, it should be clear that you check the audio with your ears.&lt;br /&gt;
&lt;br /&gt;
Should be self-explanatory that you can&#039;t judge your map&#039;s sound design via the tiny speakers in your notebook.&lt;br /&gt;
&lt;br /&gt;
== Make Speakers visible with s_drawSpeakers ==&lt;br /&gt;
&lt;br /&gt;
Sound emitting entities can be made visible using the &#039;&#039;s_drawSpeakers&#039;&#039; command in the console:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;s_drawSpeakers 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will show speakers that are in reach to the player, the ones, that can be heard at the moment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;s_drawSpeakers 2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
shows all of them in the map.&lt;br /&gt;
&lt;br /&gt;
A typical speaker will look like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Drawsounds_shot01.png]]&lt;br /&gt;
&lt;br /&gt;
The information inside the cube has the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;name&amp;gt; (O/D min/max)&lt;br /&gt;
          &lt;br /&gt;
          n&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and means:&lt;br /&gt;
&lt;br /&gt;
::&#039;&#039;&amp;lt;name&amp;gt;&#039;&#039;: the name of the shader or sound&lt;br /&gt;
::&#039;&#039;O&#039;&#039;: relative distance to the player (with occlusion)&lt;br /&gt;
::&#039;&#039;D&#039;&#039;: real distance to the player&lt;br /&gt;
::&#039;&#039;min&#039;&#039;: the &#039;&#039;minDistance&#039;&#039;&lt;br /&gt;
::&#039;&#039;max&#039;&#039;: the &#039;&#039;maxDistance&#039;&#039;&lt;br /&gt;
::&#039;&#039;n&#039;&#039;: the speaker&#039;s number&lt;br /&gt;
&lt;br /&gt;
When you look at more remote speakers, like for example in the next room, you may notice there are red lines, vectoring away from the entity.&lt;br /&gt;
&lt;br /&gt;
It is easier to see what is going on with portals visible:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;r_showportals 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will show these red lines often point to a visportal. This illustrates how sound propagation takes map geometry into account ([[Setting Up Speakers#no_occlusion/ s_occlusion|occlusion]]). The sound does not travel the shortest distance (line of sight), but takes a more realistic route around the corner.&lt;br /&gt;
&lt;br /&gt;
[[Image:Drawsounds_shot03.png]]&lt;br /&gt;
&lt;br /&gt;
The speaker entitiy is behind the wall, the red line shows the way through an open portal, a door in this case. The volume at the player position depends on this relative distance (except when occlusion is explicitly disabled).&amp;lt;br&amp;gt;&lt;br /&gt;
You can not see the difference between &#039;&#039;O&#039;&#039; and &#039;&#039;D&#039;&#039; in this shot due to rounding.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Closing the door will add a fixed &amp;quot;length&amp;quot; to the relative distance (in TDM that&#039;s ca. 12 of doom&#039;s crude sound units):&lt;br /&gt;
&lt;br /&gt;
[[Image:Drawsounds_shot02.png]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;D&#039;&#039; is still 2 (line of sight didn&#039;t change), &#039;&#039;O&#039;&#039; is in deed something near 14, but gets capped equivalent to maxDistance.&lt;br /&gt;
&lt;br /&gt;
Together drawsounds and showportals make a nice toolset to optimize both your speaker setups and your placement of visportals (now with sound propagation in mind). You can add the spyglass to that toolset, remote speakers are sometimes hard to read.  :)&lt;br /&gt;
&lt;br /&gt;
Issues:&amp;lt;br&amp;gt;&lt;br /&gt;
* If you turn occlusion off (globally or just on certain entities) it has no effect on what drawsounds shows you.&lt;br /&gt;
* Sometimes the red lines can go to weird places. Esp. with &#039;&#039;s_drawSounds 2&#039;&#039; all inactive entitites seem to point at a common origin.&lt;br /&gt;
* Sound entities change their color. That&#039;s propably distance related, but the exact meaning of the colors is a mystery to me.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Getting the Volume right ==&lt;br /&gt;
&lt;br /&gt;
The right value for the volume setting of a sound should be correctly set in it&#039;s shader. So in a perfect world it shouldn&#039;t need any fixing by mappers.&lt;br /&gt;
&lt;br /&gt;
But for setting up your own sounds or fixing possible issues with &amp;quot;broken&amp;quot; assets, you can use [[Setting Up Speakers#volume/ s_volume|the &#039;&#039;s_volume&#039;&#039; property]].&lt;br /&gt;
&lt;br /&gt;
Since all sounds that don&#039;t have the unclamped keyword in their shader get capped by the sound engine before any real clipping occurs, it is not easy to spot when you&#039;re over the limit. There&#039;s a cure, that at least should work for normalized sounds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;s_clipvolumes 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will disable the engine&#039;s clipping protection. As a result affected sounds will cause hardware clipping -- you can&#039;t miss that.&lt;br /&gt;
&lt;br /&gt;
A more elegant way to trace volume issues would be doom&#039;s built-in volume meter. It can be enabled via&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;s_showLevelMeters 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
but seems to be broken in TDM right now.&lt;br /&gt;
&lt;br /&gt;
== Other tools ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;s_useocclusion 0&amp;lt;/code&amp;gt;: Will turn off occlusion on a global level. Sound propagation will always be line of sight. It is not visualized by drawsounds. Can be useful for comparison, esp. when bound to a key (&#039;&#039;bind n toggle s_useOcclusion&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;com_showdecoders 1&amp;lt;/code&amp;gt;: Will draw a few lines on your screen, showing the sounds currently playing.&lt;br /&gt;
&lt;br /&gt;
[[Category:Sound]]&lt;br /&gt;
[[Category:Editing]]&lt;/div&gt;</summary>
		<author><name>Plasticman</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Setting_Up_Speakers&amp;diff=11676</id>
		<title>Setting Up Speakers</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Setting_Up_Speakers&amp;diff=11676"/>
		<updated>2010-11-28T17:12:30Z</updated>

		<summary type="html">&lt;p&gt;Plasticman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article shows how a mapper can drop a speaker entity in the map and set it up correctly in DarkRadiant. The focus is on shoundshader keywords and how to override them.&lt;br /&gt;
&lt;br /&gt;
== Create A Speaker Entity ==&lt;br /&gt;
&lt;br /&gt;
To create a speaker you can simply click {{RMB}} in DarkRadiant and select &amp;quot;Create speaker...&amp;quot;. This will:&lt;br /&gt;
* create a speaker entity&lt;br /&gt;
* open a window that lets you choose a sound&lt;br /&gt;
After choosing a sound you can alter the sound&#039;s properties in the entity inspector.&lt;br /&gt;
&lt;br /&gt;
To do that it is handy to know how sounds in our game basically work. Via sound shaders, that is:&lt;br /&gt;
&lt;br /&gt;
== Sound Shaders And Spawnargs ==&lt;br /&gt;
&lt;br /&gt;
A sound shader is a text file that resides in darkmod/sounds and comes with the .sndshd extension. These shaders tell the engine where the .waves or .oggs can be found along with some common parameters.&lt;br /&gt;
&lt;br /&gt;
As an example we look at the shader for &amp;quot;footsteps on stone materials while walking&amp;quot; (you would not put these in game via a speaker normally, but you &#039;&#039;could&#039;&#039; do it since all sounds work technically the same):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 tdm_footstep_stone_walk&lt;br /&gt;
 { &lt;br /&gt;
 	description &amp;quot;Made by GoldChocobo&amp;quot;&lt;br /&gt;
 	no_dups&lt;br /&gt;
 	minDistance 1&lt;br /&gt;
 	maxDistance 30&lt;br /&gt;
 	volume -12&lt;br /&gt;
 &lt;br /&gt;
 	sound/sfx/movement/footsteps/player/stone_walk01.ogg&lt;br /&gt;
 	sound/sfx/movement/footsteps/player/stone_walk02.ogg&lt;br /&gt;
 	sound/sfx/movement/footsteps/player/stone_walk03.ogg&lt;br /&gt;
 	sound/sfx/movement/footsteps/player/stone_walk04.ogg&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It starts with the shader name &amp;quot;tdm_footstep_stone_walk&amp;quot;. This will show up in DarkRadiant&#039;s &amp;quot;Choose sound&amp;quot; dialog. Then we have some keywords followed by the actual sound files and their relative path.&lt;br /&gt;
&lt;br /&gt;
There are four sounds (not only one) to allow variety. They get played in a random order, one each time the sound is triggered. (In most cases, see [[Problem Hearing Varied Sounds]].)&lt;br /&gt;
&lt;br /&gt;
Picking the &#039;&#039;volume&#039;&#039; keyword you can see it is followed by a negative value. These are meant to be decibel (dB), so we can expect 0 to be the maximum while a reduction by 10 approximately is half the volume.&lt;br /&gt;
&lt;br /&gt;
If you created your speaker and wanted to change it&#039;s volume in DarkRadiant you would go to the entity inspector (default shortcut: n) and add the spawnarg &#039;&#039;s_volume&#039;&#039;. Whatever number you enter here is meant to override the shader setting.&lt;br /&gt;
&lt;br /&gt;
This is what it looks like:&lt;br /&gt;
&lt;br /&gt;
[[Image:Entity-inspector-speaker.png]]&lt;br /&gt;
&lt;br /&gt;
The icons left to the keyword indicate Radiant knows them -- you will get a tooltip on mouseover. If you mistype anything you will see nothing there, which is a good indicator.&lt;br /&gt;
&lt;br /&gt;
So what we have is a system where our shaders provide the default values. We can override these values in the map file using the appropriate spawnargs. Note that not defining anything in the shader as well as in your map file won&#039;t crash the game -- there are still fallback values (propably hardcoded in the engine).&lt;br /&gt;
&lt;br /&gt;
In the following list the keywords are presented as a pair, where possible. The soundshader keyword is followed by the corresponding counterpart you would use in DR.&lt;br /&gt;
&lt;br /&gt;
=== volume/ s_volume ===&lt;br /&gt;
&lt;br /&gt;
:The &#039;&#039;volume&#039;&#039; is set in dB. Usually this means there is a maximum of &#039;&#039;0&#039;&#039; dB. The minimum is &#039;&#039;-60&#039;&#039; dB which results in absoulute silence.&lt;br /&gt;
&lt;br /&gt;
:Up to a certain point the game allows the use of positive values as well, but be aware, as this is sensitive:&lt;br /&gt;
&lt;br /&gt;
:To prevent clipping the engine has a mechanism that does not allow the &#039;&#039;volume&#039;&#039; to overdrive your sound hardware. For testing, it can be disabled via the &#039;&#039;s_clipVolumes&#039;&#039; cvar, but if it is active it will clip the &#039;&#039;volume&#039;&#039; for every output sound channel after all the other calculations are done -- this includes stereo panning, so once the volume setting is too high all the speakers (in your headphones, on your stereo) will play the sound at the same maximum volume. It gets virtually monofied, the player no longer is able to locate the sound.&lt;br /&gt;
&lt;br /&gt;
:In general it is a good idea to stay close within the &#039;&#039;0&#039;&#039; dB range for positive values. &lt;br /&gt;
&lt;br /&gt;
=== unclamped/ s_unclamped ===&lt;br /&gt;
&lt;br /&gt;
:Possible values are &#039;&#039;0&#039;&#039; and &#039;&#039;1&#039;&#039;. This overrides the global &#039;&#039;volume&#039;&#039; clipping and will make your sound bypass the &#039;&#039;s_clipVolumes&#039;&#039; setting.&lt;br /&gt;
&lt;br /&gt;
:Should be used with extra care, can trigger hardware clipping. This will not damage your hardware, but sound real crappy -- keep in mind this is a game and not your favourite tube amp.&lt;br /&gt;
&lt;br /&gt;
=== minDistance/ s_mindistance ===&lt;br /&gt;
&lt;br /&gt;
:This works together with &#039;&#039;maxDistance&#039;&#039; like this:&lt;br /&gt;
&lt;br /&gt;
:[[Image:Mindistance-maxdistance-falloff.png]]&lt;br /&gt;
&lt;br /&gt;
:Around the speaker there is a spherical volume, defined by &#039;&#039;minDistance&#039;&#039;. Inside that, the sound plays at the specified full &#039;&#039;volume&#039;&#039;. The (hopefully) larger &#039;&#039;maxDistance&#039;&#039; defines a bigger sphere. Outside of it the &#039;&#039;volume&#039;&#039; will be &#039;&#039;0&#039;&#039;, inside of it there is a falloff from max. to min.&lt;br /&gt;
&lt;br /&gt;
:Note: &#039;&#039;&#039;Do not set &#039;&#039;s_mindistance&#039;&#039; to &#039;&#039;0&#039;&#039;!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:While a real sound does not have a &amp;quot;mindistance&amp;quot; it will not work to set &#039;&#039;s_mindistance&#039;&#039; to &#039;&#039;0&#039;&#039;. A quick test revealed the following behavior:&lt;br /&gt;
&lt;br /&gt;
:[[Image:Mindistance-overrides.png]]&lt;br /&gt;
&lt;br /&gt;
:This shows we can overide the shader values with our spawnarg in DR, but when we set it to &#039;&#039;0&#039;&#039; it counts not as a number but as a toggle that simply disables our intended input. This is as good as deleting the property.&lt;br /&gt;
&lt;br /&gt;
:The value will fall back to the shader default (lucky case is purple, bad cases are red). In the right column (red and yellow field) you can see what happens when no values are provided by the shader nor the spawnarg: doom simply sets the &#039;&#039;minDistance&#039;&#039; to &#039;&#039;1&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
:As a resort mappers can always use &#039;&#039;s_mindistance 1&#039;&#039;, that&#039;s close enaugh for rock&#039;n&#039;roll.&lt;br /&gt;
&lt;br /&gt;
=== maxDistance/ s_maxdistance ===&lt;br /&gt;
&lt;br /&gt;
:See above. The outlines of &#039;&#039;maxDistance&#039;&#039; can be drag-resized in DarkRadiant. This does not show you the real dispersion of the sound in most cases (due to occlusion, see below).&lt;br /&gt;
&lt;br /&gt;
:Not setting the &#039;&#039;maxDistance&#039;&#039; or at the same time setting &#039;&#039;s_maxdistance&#039;&#039; to &#039;&#039;0&#039;&#039; (which is insane anyway) will cause doom to use &#039;&#039;10&#039;&#039; instead.&lt;br /&gt;
&lt;br /&gt;
=== looping/ s_looping ===&lt;br /&gt;
&lt;br /&gt;
:Turns on and off looping. The sound will repeat endlessly in a forward loop.&lt;br /&gt;
&lt;br /&gt;
=== omnidirectional/ s_omni ===&lt;br /&gt;
&lt;br /&gt;
:The sound will have the same &#039;&#039;volume&#039;&#039; on all speakers, so it sounds like not having a specific origin. Normally used for ambience music (when not using the preferred method via [[Location Settings]]). Works with falloff as provided by &#039;&#039;minDistance&#039;&#039; and &#039;&#039;maxDistance&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== global/ s_global ===&lt;br /&gt;
&lt;br /&gt;
:Plays the sound at full &#039;&#039;volume&#039;&#039; everywhere in the map.&lt;br /&gt;
&lt;br /&gt;
=== no_occlusion/ s_occlusion ===&lt;br /&gt;
&lt;br /&gt;
:The shader keyword turns occlusion off, &#039;&#039;s_occlusion&#039;&#039; must be set to &#039;&#039;1&#039;&#039; for the same effect (this is counterintuitive).&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;What is occlusion?&#039;&#039;&#039; -- To resemble a realistic falloff for sounds, the game traces the route to the speaker from the player position through vis_portals instead of line of sight. Even closed doors or windows are taken into account for that calculation.&lt;br /&gt;
&lt;br /&gt;
:If you want your specific sound to be not affected by this, you can turn it off this way.&lt;br /&gt;
&lt;br /&gt;
:Note: it is highly recommended to turn occlusion off for ambient music, or it will fade when you close a door etc.&lt;br /&gt;
&lt;br /&gt;
=== shakes/ s_shakes ===&lt;br /&gt;
&lt;br /&gt;
:A special effect, that shakes the screen when the sound plays. Possible values are fractions between &#039;&#039;0&#039;&#039; and &#039;&#039;1&#039;&#039;. This is multiplied with the &#039;&#039;volume&#039;&#039; to determine the intensity of the effect.&lt;br /&gt;
&lt;br /&gt;
:Note: &#039;&#039;s_shakes 0&#039;&#039; will disable itself and fall back to the &#039;&#039;shakes&#039;&#039; value in the shader.&lt;br /&gt;
&lt;br /&gt;
:Note2: Iddevnet says it should not be used with .ogg files.&lt;br /&gt;
&lt;br /&gt;
=== n. a./ s_waitfortrigger ===&lt;br /&gt;
&lt;br /&gt;
:If set to &#039;&#039;1&#039;&#039; the speaker will wait for a trigger to activate it.&lt;br /&gt;
&lt;br /&gt;
=== n. a./ s_shader ===&lt;br /&gt;
&lt;br /&gt;
:Points to the sound shader the speaker uses. Can as well be used to reference audio files directly, when not present in any shader.&lt;br /&gt;
&lt;br /&gt;
=== leadin/ n. a. ===&lt;br /&gt;
&lt;br /&gt;
:Specifies a file that is played as a lead-in to a looped part of the sound.&lt;br /&gt;
&lt;br /&gt;
=== leadinVolume/ n. a. ===&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Volume&#039;&#039; of the lead-in part in a looped sound.&lt;br /&gt;
&lt;br /&gt;
=== no_dups/ n. a. ===&lt;br /&gt;
&lt;br /&gt;
:This prevents the same audio file out of the multiple ones in a shader to be played twice in a row when randomly playing them.&lt;br /&gt;
&lt;br /&gt;
:Not of any use when your shader references only one file.&lt;br /&gt;
&lt;br /&gt;
=== private/ n. a. ===&lt;br /&gt;
&lt;br /&gt;
:The sound is only present to the player.&lt;br /&gt;
&lt;br /&gt;
=== description/ n. a. ===&lt;br /&gt;
&lt;br /&gt;
:A short discription in the shader. In DarkMod it usually names the creator of the sound.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
When you set up a few sounds, you propably like to check them out in game. Learn about additional tools for [[Debugging Your Speakers]].&lt;br /&gt;
&lt;br /&gt;
Unfortunately I missed [[Sounds: Background and Local]], before creating a bit of an overlap with this article.&lt;br /&gt;
&lt;br /&gt;
Further information can be found at [http://www.modwiki.net/wiki/Sound_(keywords) modwiki.net] or [http://www.iddevnet.com/doom3/sounds.php iddevnet].&lt;br /&gt;
&lt;br /&gt;
[[Category:Sound]]&lt;br /&gt;
[[Category:Editing]]&lt;/div&gt;</summary>
		<author><name>Plasticman</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Debugging_Your_Speakers&amp;diff=11675</id>
		<title>Debugging Your Speakers</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Debugging_Your_Speakers&amp;diff=11675"/>
		<updated>2010-11-28T16:56:32Z</updated>

		<summary type="html">&lt;p&gt;Plasticman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is some sort of a follow-up, please read first [[Setting Up Speakers]].&lt;br /&gt;
&lt;br /&gt;
== Don&#039;t forget your ears ==&lt;br /&gt;
&lt;br /&gt;
There are ways to visualize what&#039;s going on with the audio in game, and it can be tempting to rely too much on that. But what finally counts is what can be heard by the player.&amp;lt;br&amp;gt;&lt;br /&gt;
So just like it is clear that you check your map&#039;s visuals with your eyes, it should be clear that you check the audio with your ears.&lt;br /&gt;
&lt;br /&gt;
Should be self-explanatory that you can&#039;t judge your map&#039;s sound design via the tiny speakers in your notebook.&lt;br /&gt;
&lt;br /&gt;
== Make Speakers visible with s_drawSpeakers ==&lt;br /&gt;
&lt;br /&gt;
Sound emitting entities can be made visible using the &#039;&#039;s_drawSpeakers&#039;&#039; command in the console:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;s_drawSpeakers 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will show speakers that are in reach to the player, the ones, that can be heard at the moment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;s_drawSpeakers 2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
shows all of them in the map.&lt;br /&gt;
&lt;br /&gt;
A typical speaker will look like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Drawsounds_shot01.png]]&lt;br /&gt;
&lt;br /&gt;
The information inside the cube has the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;name&amp;gt; (O/D min/max)&lt;br /&gt;
          &lt;br /&gt;
          n&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and means:&lt;br /&gt;
&lt;br /&gt;
::&#039;&#039;&amp;lt;name&amp;gt;&#039;&#039;: the name of the shader or sound&lt;br /&gt;
::&#039;&#039;O&#039;&#039;: relative distance to the player (with occlusion)&lt;br /&gt;
::&#039;&#039;D&#039;&#039;: real distance to the player&lt;br /&gt;
::&#039;&#039;min&#039;&#039;: the &#039;&#039;minDistance&#039;&#039;&lt;br /&gt;
::&#039;&#039;max&#039;&#039;: the &#039;&#039;maxDistance&#039;&#039;&lt;br /&gt;
::&#039;&#039;n&#039;&#039;: the speaker&#039;s number&lt;br /&gt;
&lt;br /&gt;
When you look at more remote speakers, like for example in the next room, you may notice there are red lines, vectoring away from the entity.&lt;br /&gt;
&lt;br /&gt;
It is easier to see what is going on with portals visible:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;r_showportals 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will show these red lines often point to a visportal. This illustrates how sound propagation takes map geometry into account ([[Setting Up Speakers#no_occlusion/ s_occlusion|occlusion]]). The sound does not travel the shortest distance (line of sight), but takes a more realistic route around the corner.&lt;br /&gt;
&lt;br /&gt;
[[Image:Drawsounds_shot03.png]]&lt;br /&gt;
&lt;br /&gt;
The speaker entitiy is behind the wall, the red line shows the way through an open portal, a door in this case. The volume at the player position depends on this relative distance (except when occlusion is explicitly disabled).&amp;lt;br&amp;gt;&lt;br /&gt;
You can not see the difference between &#039;&#039;O&#039;&#039; and &#039;&#039;D&#039;&#039; in this shot due to rounding.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Closing the door will add a fixed &amp;quot;length&amp;quot; to the relative distance (in TDM that&#039;s ca. 12 of doom&#039;s crude sound units):&lt;br /&gt;
&lt;br /&gt;
[[Image:Drawsounds_shot02.png]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;D&#039;&#039; is still 2 (line of sight didn&#039;t change), &#039;&#039;O&#039;&#039; is in deed something near 8, but gets capped equivalent to maxDistance.&lt;br /&gt;
&lt;br /&gt;
Together drawsounds and showportals make a nice toolset to optimize both your speaker setups and your placement of visportals (now with sound propagation in mind). You can add the spyglass to that toolset, remote speakers are sometimes hard to read.  :)&lt;br /&gt;
&lt;br /&gt;
Issues:&amp;lt;br&amp;gt;&lt;br /&gt;
* If you turn occlusion off (globally or just on certain entities) it has no effect on what drawsounds shows you.&lt;br /&gt;
* Sometimes the red lines can go to weird places. Esp. with &#039;&#039;s_drawSounds 2&#039;&#039; all inactive entitites seem to point at a common origin.&lt;br /&gt;
* Sound entities change their color. That&#039;s propably distance related, but the exact meaning of the colors is a mystery to me.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Getting the Volume right ==&lt;br /&gt;
&lt;br /&gt;
The right value for the volume setting of a sound should be correctly set in it&#039;s shader. So in a perfect world it shouldn&#039;t need any fixing by mappers.&lt;br /&gt;
&lt;br /&gt;
But for setting up your own sounds or fixing possible issues with &amp;quot;broken&amp;quot; assets, you can use [[Setting Up Speakers#volume/ s_volume|the &#039;&#039;s_volume&#039;&#039; property]].&lt;br /&gt;
&lt;br /&gt;
Since all sounds that don&#039;t have the unclamped keyword in their shader get capped by the sound engine before any real clipping occurs, it is not easy to spot when you&#039;re over the limit. There&#039;s a cure, that at least should work for normalized sounds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;s_clipvolumes 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will disable the engine&#039;s clipping protection. As a result affected sounds will cause hardware clipping -- you can&#039;t miss that.&lt;br /&gt;
&lt;br /&gt;
A more elegant way to trace volume issues would be doom&#039;s built-in volume meter. It can be enabled via&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;s_showLevelMeters 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
but seems to be broken in TDM right now.&lt;br /&gt;
&lt;br /&gt;
== Other tools ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;s_useocclusion 0&amp;lt;/code&amp;gt;: Will turn off occlusion on a global level. Sound propagation will always be line of sight. It is not visualized by drawsounds. Can be useful for comparison, esp. when bound to a key (&#039;&#039;bind n toggle s_useOcclusion&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;com_showdecoders 1&amp;lt;/code&amp;gt;: Will draw a few lines on your screen, showing the sounds currently playing.&lt;br /&gt;
&lt;br /&gt;
[[Category:Sound]]&lt;br /&gt;
[[Category:Editing]]&lt;/div&gt;</summary>
		<author><name>Plasticman</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Debugging_Your_Speakers&amp;diff=11674</id>
		<title>Debugging Your Speakers</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Debugging_Your_Speakers&amp;diff=11674"/>
		<updated>2010-11-28T16:43:54Z</updated>

		<summary type="html">&lt;p&gt;Plasticman: New page: This is some sort of a follow-up, please read first Setting Up Speakers.  == Don&amp;#039;t forget your ears ==  There are ways to visualize what&amp;#039;s going on with the audio in game, and it can b...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is some sort of a follow-up, please read first [[Setting Up Speakers]].&lt;br /&gt;
&lt;br /&gt;
== Don&#039;t forget your ears ==&lt;br /&gt;
&lt;br /&gt;
There are ways to visualize what&#039;s going on with the audio in game, and it can be tempting to rely too much on that. But what finally counts is what can be heard by the player.&amp;lt;br&amp;gt;&lt;br /&gt;
So just like it is clear that you check your map&#039;s visuals with your eyes, it should be clear that you check the audio with your ears.&lt;br /&gt;
&lt;br /&gt;
Should be self-explanatory that you can&#039;t judge your map&#039;s sound design via the tiny speakers in your notebook.&lt;br /&gt;
&lt;br /&gt;
== Make Speakers visible with s_drawSpeakers ==&lt;br /&gt;
&lt;br /&gt;
Sound emitting entities can be made visible using the &#039;&#039;s_drawSpeakers&#039;&#039; command in the console:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;s_drawSpeakers 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will show speakers that are in reach to the player, the ones, that can be heard at the moment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;s_drawSpeakers 2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
shows all of them in the map.&lt;br /&gt;
&lt;br /&gt;
A typical speaker will look like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Drawsounds_shot01.png]]&lt;br /&gt;
&lt;br /&gt;
The information inside the cube has the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;name&amp;gt; (O/D min/max)&lt;br /&gt;
          &lt;br /&gt;
          n&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and means:&lt;br /&gt;
&lt;br /&gt;
::&#039;&#039;&amp;lt;name&amp;gt;&#039;&#039;: the name of the shader or sound&lt;br /&gt;
::&#039;&#039;O&#039;&#039;: relative distance to the player (with occlusion)&lt;br /&gt;
::&#039;&#039;D&#039;&#039;: real distance to the player&lt;br /&gt;
::&#039;&#039;min&#039;&#039;: the &#039;&#039;minDistance&#039;&#039;&lt;br /&gt;
::&#039;&#039;max&#039;&#039;: the &#039;&#039;maxDistance&#039;&#039;&lt;br /&gt;
::&#039;&#039;n&#039;&#039;: the speaker&#039;s number&lt;br /&gt;
&lt;br /&gt;
When you look at more remote speakers, like for example in the next room, you may notice there are red lines, vectoring away from the entity.&lt;br /&gt;
&lt;br /&gt;
It is easier to see what is going on with portals visible:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;r_showportals 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will show these red lines often point to a visportal. This illustrates how sound propagation takes map geometry into account (occlusion). The sound does not travel the shortest distance (line of sight), but takes a more realistic route around the corner.&lt;br /&gt;
&lt;br /&gt;
[[Image:Drawsounds_shot03.png]]&lt;br /&gt;
&lt;br /&gt;
The speaker entitiy is behind the wall, the red line shows the way through an open portal, a door in this case. The volume at the player position depends on this relative distance (except when occlusion is explicitly disabled).&amp;lt;br&amp;gt;&lt;br /&gt;
You can not see the difference between &#039;&#039;O&#039;&#039; and &#039;&#039;D&#039;&#039; in this shot due to rounding.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Closing the door will add a fixed &amp;quot;length&amp;quot; to the relative distance (in TDM that&#039;s ca. 12 of doom&#039;s crude sound units):&lt;br /&gt;
&lt;br /&gt;
[[Image:Drawsounds_shot02.png]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;D&#039;&#039; is still 2 (line of sight didn&#039;t change), &#039;&#039;O&#039;&#039; is in deed something near 8, but gets capped equivalent to maxDistance.&lt;br /&gt;
&lt;br /&gt;
Together drawsounds and showportals make a nice toolset to optimize both your speaker setups and your placement of visportals (now with sound propagation in mind). You can add the spyglass to that toolset, remote speakers are sometimes hard to read.  :)&lt;br /&gt;
&lt;br /&gt;
Issues:&amp;lt;br&amp;gt;&lt;br /&gt;
* If you turn occlusion off (globally or just on certain entities) it has no effect on what drawsounds shows you.&lt;br /&gt;
* Sometimes the red lines can go to weird places. Esp. with &#039;&#039;s_drawSounds 2&#039;&#039; all inactive entitites seem to point at a common origin.&lt;br /&gt;
* Sound entities change their color. That&#039;s propably distance related, but the exact meaning of the colors is a mystery to me.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Getting the Volume right ==&lt;br /&gt;
&lt;br /&gt;
The right value for the volume setting of a sound should be correctly set in it&#039;s shader. So in a perfect world it shouldn&#039;t need any fixing by mappers.&lt;br /&gt;
&lt;br /&gt;
But for setting up your own sounds or fixing possible issues with &amp;quot;broken&amp;quot; assets, you can use the &#039;&#039;s_volume&#039;&#039; property.&lt;br /&gt;
&lt;br /&gt;
Since all sounds that don&#039;t have the unclamped keyword in their shader get capped by the sound engine before any real clipping occurs, it is not easy to spot when you&#039;re over the limit. There&#039;s a cure, that at least should work for normalized sounds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;s_clipvolumes 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will disable the engine&#039;s clipping protection. As a result affected sounds will cause hardware clipping -- you can&#039;t miss that.&lt;br /&gt;
&lt;br /&gt;
A more elegant way to trace volume issues would be doom&#039;s built-in volume meter. It can be enabled via&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;s_showLevelMeters 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
but seems to be broken in TDM right now.&lt;br /&gt;
&lt;br /&gt;
== Other tools ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;s_useocclusion 0&amp;lt;/code&amp;gt;: Will turn off occlusion on a global level. Sound propagation will always be line of sight. It is not visualized by drawsounds. Can be useful for comparison, esp. when bound to a key (&#039;&#039;bind n toggle s_useOcclusion&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;com_showdecoders 1&amp;lt;/code&amp;gt;: Will draw a few lines on your screen, showing the sounds currently playing.&lt;/div&gt;</summary>
		<author><name>Plasticman</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=File:Drawsounds_shot03.png&amp;diff=11673</id>
		<title>File:Drawsounds shot03.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=File:Drawsounds_shot03.png&amp;diff=11673"/>
		<updated>2010-11-28T15:45:27Z</updated>

		<summary type="html">&lt;p&gt;Plasticman: shows s_drawsounds in action.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;shows s_drawsounds in action.&lt;/div&gt;</summary>
		<author><name>Plasticman</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=File:Drawsounds_shot02.png&amp;diff=11672</id>
		<title>File:Drawsounds shot02.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=File:Drawsounds_shot02.png&amp;diff=11672"/>
		<updated>2010-11-28T15:45:08Z</updated>

		<summary type="html">&lt;p&gt;Plasticman: shows s_drawsounds in action.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;shows s_drawsounds in action.&lt;/div&gt;</summary>
		<author><name>Plasticman</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=File:Drawsounds_shot01.png&amp;diff=11671</id>
		<title>File:Drawsounds shot01.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=File:Drawsounds_shot01.png&amp;diff=11671"/>
		<updated>2010-11-28T15:44:17Z</updated>

		<summary type="html">&lt;p&gt;Plasticman: shows s_drawsounds in action.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;shows s_drawsounds in action.&lt;/div&gt;</summary>
		<author><name>Plasticman</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Sounds:_Background_and_Local&amp;diff=11643</id>
		<title>Sounds: Background and Local</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Sounds:_Background_and_Local&amp;diff=11643"/>
		<updated>2010-11-26T22:23:19Z</updated>

		<summary type="html">&lt;p&gt;Plasticman: added link: Setting up Speakers&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;written by Fidcal&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
All that is assumed is you know the essentials described in [[Dark Radiant Must Know Basic Intro]]&lt;br /&gt;
&lt;br /&gt;
If you want a global ambient sound heard throughout your mission then also read [[Adding ambient Sounds to your Map]].&lt;br /&gt;
&lt;br /&gt;
This tutorial covers general background sounds, local ambience, environmental, or sounds related to specific objects in the game such as a machine or a drain.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Sound File Types ==&lt;br /&gt;
&lt;br /&gt;
OGG and WAV files are used in Dark Mod. For details see [[Sound File Formats]]&lt;br /&gt;
&lt;br /&gt;
OGG files are compressed whereas WAV files do not compress well even in zip files (so I&#039;m told!)&lt;br /&gt;
&lt;br /&gt;
You can create your own sounds but there is already a large range provided in Dark Mod ready to use.&lt;br /&gt;
&lt;br /&gt;
Those sound files  can be referenced either directly (with full path and name) or via a definition file called a sound shader which can include various controls as well as the name of the sound file and path. Multiple sound file definitions can be included in one sound shader file. Other controls are available as properties in the speaker entity in the map file. These properties will override the equivalent definition in the sound shader.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Speaker Entity ==&lt;br /&gt;
&lt;br /&gt;
The speaker entity is like a loudspeaker that you place in your mission.&lt;br /&gt;
&lt;br /&gt;
To include a sound in your mission...&lt;br /&gt;
&lt;br /&gt;
* create a speaker entity and position it where you want the sound to be centred.&lt;br /&gt;
* Add the property s_shader&lt;br /&gt;
* In Dark Radiant you can select a sound shader from the button below the entity properties.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Properties of the Speaker Entity ==&lt;br /&gt;
&lt;br /&gt;
The following are properties to add to the speaker entity to adjust the way it plays sounds. There is no need to dmap between adjustments of these properties. Assuming you have dmapped once you can just use map to test changes.&lt;br /&gt;
&lt;br /&gt;
Before proceeding, it&#039;s worth quoting Orbweaver:&lt;br /&gt;
&lt;br /&gt;
# If a speaker is looping, it will play all the time, but will obviously only be audible when the player is within range.&lt;br /&gt;
# If a speaker is non-looping but waits for trigger, then it will do nothing until triggered. Once triggered it will play but will only be audible if the player is within range.&lt;br /&gt;
# If a speaker is non-looping and untriggered, it will play once at startup, irrespective of whether the player is near enough to hear it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Loudness, Volume ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;s_volume&#039;&#039;&#039; property allows you to change the volume of a sound. It specifies the change to the volume of the audio file, in decibels, and may be positive or negative.&lt;br /&gt;
&lt;br /&gt;
Be careful about making sounds too loud with this keyvalue, decibels are fairly &amp;quot;small&amp;quot; units and setting a volume increase of +20dB may well make the sound too loud for players. Ambient sounds should be at a similar volume throughout the map, and should not be so loud as to obliterate important gameplay sounds such as footsteps, or cause the player to reach for their volume control every time they enter a new area.&lt;br /&gt;
&lt;br /&gt;
== Control of volume by &#039;Ambient Volume&#039; menu setting ==&lt;br /&gt;
If you want to give the player user-friendly control over the sound volume (as with ambient music, which some players prefer off), include the keypair &amp;quot;s_music&amp;quot; &amp;quot;1&amp;quot; on the speaker entity.&lt;br /&gt;
&lt;br /&gt;
== Direction of Source, Propogation through Doorways==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
s_occlusion 1 makes the sound go in a straight line and not through visportalled gaps like doorways etc. If set to 0 then it follows a natural route through openings.&lt;br /&gt;
&lt;br /&gt;
s_omni 1 makes the sound come from no particular direction so this is ideal for ambience like rainfall or mood music (unless that music is meant to come from something in the game.) Set s_omni to 0 if you want your sound to sound like it is coming from the speaker entity.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Range, Radius, Distance covered by Sound ==&lt;br /&gt;
&lt;br /&gt;
The units used for the distance reached by the speaker entity are in &#039;&#039;metres&#039;&#039; not Doom units so these approximate 40 normal units. In DoomEd the radius is shown in the grid view and this feature is also being added to Dark Radiant.&lt;br /&gt;
&lt;br /&gt;
* s_mindistance N = distance in metres from speaker at which sound starts to fade. Within that radius it is at full volume.&lt;br /&gt;
&lt;br /&gt;
* s_maxdistance N = distance in metres from speaker beyond which it cannot be heard at all.&lt;br /&gt;
&lt;br /&gt;
==Triggering a Sound==&lt;br /&gt;
&lt;br /&gt;
Speakers by default will start to play at mission start even if the player is not in range to hear them. But speakers can be set to wait for a trigger - so any switch, button or other trigger can start and stop them. To do this, set the property s_waitfortrigger to 1 then the speaker is disabled until triggered by a switch of some sort. Default is 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Playing a Sound Once ==&lt;br /&gt;
&lt;br /&gt;
By default, if no looping or repeat is set up then a speaker will play once at mission start then stop. But unless the player is within range it will not be heard.&lt;br /&gt;
&lt;br /&gt;
So to play a sound once when the player approaches you need a separate vicinity trigger (see also [[#Triggering a Sound]]) that triggers only once. This is how...&lt;br /&gt;
&lt;br /&gt;
* Create and place your speaker and give it the property &#039;&#039;s_waitfortrigger&#039;&#039; with a value of 1&lt;br /&gt;
* At the place where you want the player to trigger the sound create a brush with a volume suitable for the trap so the player will pass into it.&lt;br /&gt;
* With the brush selected, assign it (create) an entity &#039;&#039;trigger_once&#039;&#039;&lt;br /&gt;
* The brush automatically gets a &#039;&#039;trigger&#039;&#039; texture which is invisible in-game.&lt;br /&gt;
* Add the property &#039;&#039;target&#039;&#039; with the value being the name of your speaker.&lt;br /&gt;
&lt;br /&gt;
When the player moves into that invisible brush it should trigger the speaker to play its sound once only.&lt;br /&gt;
&lt;br /&gt;
== Repeating a Sound Continuously ==&lt;br /&gt;
&lt;br /&gt;
=== s_looping ===&lt;br /&gt;
&lt;br /&gt;
s_looping repeats a sound seamlessly and is the one to use for continuous sound like rain, continuous machinery, etc. (compare also [[#wait (repeat)|wait]] before using this.&lt;br /&gt;
&lt;br /&gt;
s_looping set to 1 means...&lt;br /&gt;
&lt;br /&gt;
# Play sound immediately the player is within range (set by s_maxdistance)&lt;br /&gt;
# Wait until the sound has finished playing&lt;br /&gt;
# Repeat endlessly unless the player moves out of range (set by s_maxdistance)&lt;br /&gt;
&lt;br /&gt;
Set s_looping to 0 to disable (default)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== wait (repeat) ===&lt;br /&gt;
&lt;br /&gt;
wait n means repeat every n seconds endlessly so is the one to use to repeat with a gap between plays of the sound. Do NOT use it with s_looping set to 1 because &#039;wait&#039; repeats on its own and s_looping will override it and repeat immediately and endlessly.&lt;br /&gt;
&lt;br /&gt;
wait n means...&lt;br /&gt;
&lt;br /&gt;
# Play sound  immediately the player is within range (set by s_maxdistance)&lt;br /&gt;
# Wait n seconds from START of playing sound&lt;br /&gt;
# Repeat endlessly unless the player moves out of range (set by s_maxdistance)&lt;br /&gt;
&lt;br /&gt;
What if n is shorter than the length of the wav or ogg file? If there is only a single sound in the sound shader file then it cuts the sound short and starts again. Here&#039;s an example of what happens If, eg, you play a bell sound that is 6 seconds long (the original ogg or wav file) and if you set wait 1 then it will...&lt;br /&gt;
&lt;br /&gt;
# start to play the sound&lt;br /&gt;
# plays it for 1 second&lt;br /&gt;
# will not complete that but...&lt;br /&gt;
# begin again at the start every 1 second.&lt;br /&gt;
&lt;br /&gt;
However, if there are multiple sounds in the sound shader file which are selected randomly then they one will be played every N seconds and they will overlap unless it happens to call the same one twice in a row (which can be prevented with nodupes in the sound shader file.)&lt;br /&gt;
&lt;br /&gt;
Use with random to vary the wait time...&lt;br /&gt;
&lt;br /&gt;
=== random ===&lt;br /&gt;
&lt;br /&gt;
Use with the wait property to vary the repeat time. random n varies the wait time randomly by plus or minus n seconds. So for example...&lt;br /&gt;
&lt;br /&gt;
* wait 30&lt;br /&gt;
* random 10&lt;br /&gt;
&lt;br /&gt;
...will play the sound repeatedly between 20 to 40 seconds from the start of playing the sound.&lt;br /&gt;
&lt;br /&gt;
If random is greater than wait then it works the same but with a minimum of zero, so....&lt;br /&gt;
&lt;br /&gt;
* wait 10&lt;br /&gt;
* random 15&lt;br /&gt;
&lt;br /&gt;
... will play the sound repeatedly between 0 and 25 seconds from the start of playing the sound.&lt;br /&gt;
&lt;br /&gt;
he sound no directional source, ie, it will not seem to come from the direction of the speaker but from all directions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Screen Shaking, Explosions, etc. ==&lt;br /&gt;
&lt;br /&gt;
s_shakes set to 1 makes the screen shake when the sound is loud. Suitable for explosions, earthquakes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Sound Shader Definition Files==&lt;br /&gt;
&lt;br /&gt;
This to be written. It might need a separate article in which case adjust the link above. Meanwhile here is an external link...&lt;br /&gt;
&lt;br /&gt;
http://www.iddevnet.com/doom3/sounds.php&lt;br /&gt;
&lt;br /&gt;
[[Setting Up Speakers]] aims to cover shaders as well.&amp;lt;br&amp;gt;&lt;br /&gt;
(apologies for the overlap btw., plasticman)&lt;br /&gt;
&lt;br /&gt;
[[Category:Sound]]&lt;br /&gt;
[[Category:Editing]]&lt;/div&gt;</summary>
		<author><name>Plasticman</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Adding_ambient_Sounds_to_your_Map&amp;diff=11619</id>
		<title>Adding ambient Sounds to your Map</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Adding_ambient_Sounds_to_your_Map&amp;diff=11619"/>
		<updated>2010-11-25T04:10:21Z</updated>

		<summary type="html">&lt;p&gt;Plasticman: /* See also */  added link to Setting Up Speakers&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;written by greebo&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Ok, I will try to explain how to get a nice ambient sound into your map. Note that this ambient sound can be heard everywhere in your level. If you want to have certain areas playing certain ambients, this won&#039;t do the trick for you.  For that there are two different options, a speaker approach which builds off this tutorial (described at the bottom of this tutorial, [[Adding_ambient_Sounds_to_your_Map#Ambient_Sounds_in_one_Area]]), and a zone approach described at [[Ambient Sounds, a zone approach]], with the zone approach being the most powerful way to do it. &lt;br /&gt;
&lt;br /&gt;
== Choose your Ambient Sound ==&lt;br /&gt;
All the Dark Mod ambient sounds are saved in the &#039;&#039;&#039;/sound/ambient/ambience&#039;&#039;&#039; folder. Fire up your preferred Media Player and pick one that&#039;s suitable for your map. We will use the sound &#039;&#039;&#039;darknessfalls.ogg&#039;&#039;&#039; for this tutorial. &lt;br /&gt;
&lt;br /&gt;
The according sound shaders are stored in the &#039;&#039;&#039;/sound/tdm_ambient_ambience.sndshd&#039;&#039;&#039; file. Open it with the text editor of your choice and find the name of the sound shader. Our chosen sound is defined in this block:&lt;br /&gt;
&lt;br /&gt;
 darknessfalls&lt;br /&gt;
 {&lt;br /&gt;
      description &amp;quot;Made by Darkness_Falls&amp;quot;&lt;br /&gt;
      sound/ambient/ambience/darknessfalls.ogg&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The string outside of the curly braces is the name of the sound shader. We will need it for accessing it later via [[DarkRadiant]].&lt;br /&gt;
&lt;br /&gt;
== Create a Speaker ==&lt;br /&gt;
Open up your map in [[DarkRadiant]] and right-click somewhere in the orthogonal view and choose &amp;quot;Create Entity...&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
http://img124.imageshack.us/img124/9261/createentityss3.jpg&lt;br /&gt;
&lt;br /&gt;
Select speaker.&lt;br /&gt;
And voilà, the newly created green box is your speaker. You can drag it anywhere you want in your map, the actual place is irrelevant to the ambient.&lt;br /&gt;
&lt;br /&gt;
http://img133.imageshack.us/img133/1650/createdspeakerib9.jpg&lt;br /&gt;
&lt;br /&gt;
== Set the correct Key/Values ==&lt;br /&gt;
The following key/values have to be set:&lt;br /&gt;
 s_shader      &amp;lt;Name of the sound shader to be played&amp;gt;&lt;br /&gt;
 s_looping     1&lt;br /&gt;
 s_global      1&lt;br /&gt;
 s_omni        1&lt;br /&gt;
 s_volume      -5&lt;br /&gt;
&lt;br /&gt;
In the Entity Inspector it should look like this:&lt;br /&gt;
&lt;br /&gt;
http://img301.imageshack.us/img301/8067/entityinspectoreo1.jpg&lt;br /&gt;
&lt;br /&gt;
A short explanation what these values do:&lt;br /&gt;
* &#039;&#039;&#039;s_shader&#039;&#039;&#039; is the name of the sound shader being played. Nothing special here, just beware of typos.&lt;br /&gt;
* &#039;&#039;&#039;s_looping&#039;&#039;&#039; should be set if you want to repeat your sound over and over. If this is set to 0, your sound will stop after one playback.&lt;br /&gt;
* &#039;&#039;&#039;s_global&#039;&#039;&#039; this the key that makes the sound ambient, so it can be heard everywhere. There is no need for &#039;&#039;&#039;s_min&#039;&#039;&#039; or &#039;&#039;&#039;s_max&#039;&#039;&#039; as the sound plays with the same volume everywhere.&lt;br /&gt;
* &#039;&#039;&#039;s_omni&#039;&#039;&#039; this makes the sound play from every direction, as it is supposed to do for an ambient.&lt;br /&gt;
* &#039;&#039;&#039;s_volume&#039;&#039;&#039; negative values to be subtracted from the volume of your sound 0(max) to -60(silent.) Note that the right volume heavily depends on the loudness of the actual ogg file and the nature of the ambient being played. Typical values might be -2 or --6, -8 etc. whereas -20 is barely heard. Just experiment a bit with the value until you&#039;re satisfied...&lt;br /&gt;
&lt;br /&gt;
== Save the Map and test it ==&lt;br /&gt;
This is all there is to say, I believe. If you have problems with hearing your chosen ambient, be sure to check for typos in both the entity keys as well as in the sound shaders.&lt;br /&gt;
&lt;br /&gt;
== Ambient Sounds in one Area ==&lt;br /&gt;
&#039;&#039;added by demagogue&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To localize an ambient sound in a particular area, the easiest method is to place the speaker in the area where you want the sound.  (As explained at the top of this tutorial, an alternative method is a &amp;quot;location&amp;quot; approach, described at [[Ambient Sounds, a zone approach]].  The following only discusses the speaker method).  &lt;br /&gt;
&lt;br /&gt;
Set up a speaker just as described above, with a few important property changes.&lt;br /&gt;
&lt;br /&gt;
* First, change  &#039;&#039;&#039;s_global      0&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Second, place the speaker in the center of where you want your sound to be localized, or anyway where you want the center of the radius to be for the source of your sound (e.g., if you&#039;re using multiple speakers).  &lt;br /&gt;
&lt;br /&gt;
* Third, now you need to add a radius in which the sound will play.  Add the following two properties to the speaker:  &#039;&#039;&#039;s_maxdistance&#039;&#039;&#039; and  &#039;&#039;&#039;s_mindistance&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
:Set &#039;&#039;&#039;s_maxdistance&#039;&#039;&#039; with a value to fill the area you want to hear it.  This is the radius at which the volume tapers to zero.  For some reason the distance is not in Doom Units but roughly 1:39.3 Doom Units, that is, 1 s_maxdistance unit = about 40 Doom units. So keep that in mind.  &lt;br /&gt;
&lt;br /&gt;
:Set&#039;&#039;&#039; s_mindistance&#039;&#039;&#039; with a value only slightly smaller. This is the radius inside of which the volume is at its maximum (defined by s_volume).  Between the max and min distance, the volume will increase from zero to s_volume with a nice fade in, or fade out if you go in the opposite direction.  &lt;br /&gt;
&lt;br /&gt;
:To visually see the radius in Dark Radiant, there is an icon at the top of the Dark Radiant window that looks like a speaker with an X over it.  Press it and you can see the maxdistance and mindistance radius.  Adjust the placement of the speaker and max and min distances so that it fills the space you want covered by the ambient.  Because of the &amp;quot;omni&amp;quot;/1 property, it still sounds like the ambient is coming from all directions (not the speaker), but there is still the nice fade in/fade out effect between the max and mindistances.  &lt;br /&gt;
&lt;br /&gt;
You should check for intrusion of the radius into other areas where they are not wanted, and you can control that to some extent with falloff at visportals and doors.  &lt;br /&gt;
&lt;br /&gt;
It is possible to have ambient speakers with overlapping radiuses (radii?).  If the sound is the same, e.g., if the area requires more than one speaker to fill out, then the sound will be duplicated, but if you watch placement and radius, and pay attention to how the ambient sound works, it won&#039;t be too noticable.  (Note:  if you&#039;re having problems with either intrusion into other areas or don&#039;t like how the speaker-overlap is working to fill an area, consider using the alternative trigger method mentioned above.)&lt;br /&gt;
&lt;br /&gt;
It is also possible to have ambient speakers with different sounds with slightly overlapping radiuses, and in fact that is often a good thing.  As the old ambient fades out, the new one fades in, making for a nice transition.  &lt;br /&gt;
&lt;br /&gt;
Here is an example of three ambient sounds set up:&lt;br /&gt;
&lt;br /&gt;
http://i43.tinypic.com/dpiqzm.jpg&lt;br /&gt;
&lt;br /&gt;
And that&#039;s it.  Once the speaker is placed, it turns itself on and off by itself when you are in the radius.  Very simple.  Save, dmap and run the map, then walk in and out of the area to test how the ambient works in-game.&lt;br /&gt;
&lt;br /&gt;
== Using Custom Ambients ==&lt;br /&gt;
&lt;br /&gt;
:A more detailed explanation for adding custom ambients to your map is here:  [[Ambient_Sounds_-_Zone_%28using_triggers%29#Tips_and_Issues]], under the heading&#039;s &amp;quot;Custom Soundshaders&amp;quot; and &amp;quot;Custom Ambients&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:When using normal speakers, the set up is basically the same, but there&#039;s a possible shortcut.  Here&#039;s the set up in a nutshell, which should be enough information to do it without referring to that other wiki page, though it&#039;s there for reference:  &lt;br /&gt;
&lt;br /&gt;
:First, to package your custom ambient, create a folder inside your .pk4 file (a .zip file renamed .pk4) named &amp;quot;sound&amp;quot;, and inside that folder create a new folder with your FM&#039;s name or an abbreviated form, i.e., &amp;quot;your_mission&#039;s_name.pk4/sound/your_mission&#039;s_name&amp;quot;.  Put your sound file in that second folder.  Remember it has to be in .ogg or .wav format.  &lt;br /&gt;
&lt;br /&gt;
:E.g., my mission is named &amp;quot;Patently Dangerous&amp;quot; and I placed a custom ambient named &amp;quot;ambient_frozen.ogg&amp;quot; in &amp;quot;patently_dangerous.pk4/sound/patent/ambient_frozen.ogg&amp;quot;.  (Note, during testing, when you run the game through the console, you need to temporarily put the sound file in &amp;quot;darkmod/sound/your_missions_name&amp;quot; to hear it.)  &lt;br /&gt;
&lt;br /&gt;
:Now to get the custom ambient playing in your speaker, you can EITHER:&lt;br /&gt;
&lt;br /&gt;
::1. Use a custom soundshader, which you put in the &amp;quot;sound&amp;quot; folder in your .pk4 (or &amp;quot;darkmod/sound&amp;quot; when running the game through the console).  Use the name of the entry in that soundshader for your ambient in the speaker&#039;s &amp;quot;s_shader&amp;quot; spawnarg key.  In my case, I could have used &amp;quot;s_shader&amp;quot;/&amp;quot;ambient_frozen&amp;quot;.  &lt;br /&gt;
&lt;br /&gt;
::The other wiki page I mentioned goes into more detail on creating a custom soundshader.  But basically just remember it&#039;s a text file, renamed to have a .sndshd extension, a custom file name like your_mission_name.sndshd, the proper syntax for the soundshader&#039;s entries, and most important that there is a line to the address of your ambient.  In my case, that would be a line that says &amp;quot;sound/patent/ambient_frozen.ogg&amp;quot;.  &lt;br /&gt;
&lt;br /&gt;
::So I had a soundshader named &amp;quot;patently_dangerous.sndshd&amp;quot;, inside &amp;quot;patently_dangerous.pk4/sound/patently_dangerous.sndshd&amp;quot; that had this entry:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ambient_frozen&lt;br /&gt;
 {&lt;br /&gt;
 	description &amp;quot;Made by alacazam&amp;quot;&lt;br /&gt;
 	global&lt;br /&gt;
 	omnidirectional&lt;br /&gt;
 	looping&lt;br /&gt;
        volume -10&lt;br /&gt;
 	sound/patent/ambient_frozen.ogg&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:OR&lt;br /&gt;
&lt;br /&gt;
::2. As a shortcut, you can directly enter the address of the custom ambient as the value for the &amp;quot;s_shader&amp;quot; spawnarg.  So for my custom ambient, I could have just had a speaker with a spawnarg key/value of &amp;quot;s_shader&amp;quot; / &amp;quot;patently_dangerous.pk4/sound/patent/ambient_frozen.ogg&amp;quot;.  &lt;br /&gt;
&lt;br /&gt;
::Then you can add all the other details like &amp;quot;s_volume&amp;quot;/xx, &amp;quot;s_looping&amp;quot;/1, &amp;quot;s_omni&amp;quot;/1, &amp;quot;s_global&amp;quot;/1 (or s_global/0, s_maxdistance/xx, s_mindistance/xx) directly into the speaker as spawnargs, and not have a custom soundshader at all.  Very convenient.  In fact so convenient that I recommend you do it this easier way rather than messing with creating a custom soundshader unless you have a special reason to, if only to keep your custom additions tidy and not spread across multiple places.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Ambient Sounds, a zone approach]]&lt;br /&gt;
* [[Setting Up Speakers]]&lt;br /&gt;
* [[Sound File Formats]]&lt;br /&gt;
* [[Sounds: Background and Local]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;br /&gt;
[[Category:Sound]]&lt;br /&gt;
[[Category:Editing]]&lt;/div&gt;</summary>
		<author><name>Plasticman</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Setting_Up_Speakers&amp;diff=11618</id>
		<title>Setting Up Speakers</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Setting_Up_Speakers&amp;diff=11618"/>
		<updated>2010-11-25T03:43:49Z</updated>

		<summary type="html">&lt;p&gt;Plasticman: changed intro, added screenshot, fixed typos&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article shows how a mapper can drop a speaker entity in the map and set it up correctly in DarkRadiant. The focus is on shoundshader keywords and how to override them.&lt;br /&gt;
&lt;br /&gt;
== Create A Speaker Entity ==&lt;br /&gt;
&lt;br /&gt;
To create a speaker you can simply click {{RMB}} in DarkRadiant and select &amp;quot;Create speaker...&amp;quot;. This will:&lt;br /&gt;
* create a speaker entity&lt;br /&gt;
* open a window that lets you choose a sound&lt;br /&gt;
After choosing a sound you can alter the sound&#039;s properties in the entity inspector.&lt;br /&gt;
&lt;br /&gt;
To do that it is handy to know how sounds in our game basically work. Via sound shaders, that is:&lt;br /&gt;
&lt;br /&gt;
== Sound Shaders And Spawnargs ==&lt;br /&gt;
&lt;br /&gt;
A sound shader is a text file that resides in darkmod/sounds and comes with the .sndshd extension. These shaders tell the engine where the .waves or .oggs can be found along with some common parameters.&lt;br /&gt;
&lt;br /&gt;
As an example we look at the shader for &amp;quot;footsteps on stone materials while walking&amp;quot; (you would not put these in game via a speaker normally, but you &#039;&#039;could&#039;&#039; do it since all sounds work technically the same):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 tdm_footstep_stone_walk&lt;br /&gt;
 { &lt;br /&gt;
 	description &amp;quot;Made by GoldChocobo&amp;quot;&lt;br /&gt;
 	no_dups&lt;br /&gt;
 	minDistance 1&lt;br /&gt;
 	maxDistance 30&lt;br /&gt;
 	volume -12&lt;br /&gt;
 &lt;br /&gt;
 	sound/sfx/movement/footsteps/player/stone_walk01.ogg&lt;br /&gt;
 	sound/sfx/movement/footsteps/player/stone_walk02.ogg&lt;br /&gt;
 	sound/sfx/movement/footsteps/player/stone_walk03.ogg&lt;br /&gt;
 	sound/sfx/movement/footsteps/player/stone_walk04.ogg&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It starts with the shader name &amp;quot;tdm_footstep_stone_walk&amp;quot;. This will show up in DarkRadiant&#039;s &amp;quot;Choose sound&amp;quot; dialog. Then we have some keywords followed by the actual sound files and their relative path.&lt;br /&gt;
&lt;br /&gt;
There are four sounds (not only one) to allow variety. They get played in a random order, one each time the sound is triggered. (In most cases, see [[Problem Hearing Varied Sounds]].)&lt;br /&gt;
&lt;br /&gt;
Picking the &#039;&#039;volume&#039;&#039; keyword you can see it is followed by a negative value. These are meant to be decibel (dB), so we can expect 0 to be the maximum while a reduction by 10 approximately is half the volume.&lt;br /&gt;
&lt;br /&gt;
If you created your speaker and wanted to change it&#039;s volume in DarkRadiant you would go to the entity inspector (default shortcut: n) and add the spawnarg &#039;&#039;s_volume&#039;&#039;. Whatever number you enter here is meant to override the shader setting.&lt;br /&gt;
&lt;br /&gt;
This is what it looks like:&lt;br /&gt;
&lt;br /&gt;
[[Image:Entity-inspector-speaker.png]]&lt;br /&gt;
&lt;br /&gt;
The icons left to the keyword indicate Radiant knows them -- you will get a tooltip on mouseover. If you mistype anything you will see nothing there, which is a good indicator.&lt;br /&gt;
&lt;br /&gt;
So what we have is a system where our shaders provide the default values. We can override these values in the map file using the appropriate spawnargs. Note that not defining anything in the shader as well as in your map file won&#039;t crash the game -- there are still fallback values (propably hardcoded in the engine).&lt;br /&gt;
&lt;br /&gt;
In the following list the keywords are presented as a pair, where possible. The soundshader keyword is followed by the corresponding counterpart you would use in DR.&lt;br /&gt;
&lt;br /&gt;
=== volume/ s_volume ===&lt;br /&gt;
&lt;br /&gt;
:The &#039;&#039;volume&#039;&#039; is set in dB. Usually this means there is a maximum of &#039;&#039;0&#039;&#039; dB. The minimum is &#039;&#039;-60&#039;&#039; dB which results in absoulute silence.&lt;br /&gt;
&lt;br /&gt;
:Up to a certain point the game allows the use of positive values as well, but be aware this is sensitive:&lt;br /&gt;
&lt;br /&gt;
:To prevent clipping the engine has a mechanism that does not allow the &#039;&#039;volume&#039;&#039; to overdrive your sound hardware. For testing, it can be disabled via the &#039;&#039;s_clipVolumes&#039;&#039; cvar, but if it is active it will clip the &#039;&#039;volume&#039;&#039; for every output sound channel after all the other calculations are done -- this includes stereo panning, so once the volume setting is too high all the speakers (in your headphones, on your stereo) will play the sound the same maximum volume. It gets virtually monofied, the player no longer is able to locate the sound.&lt;br /&gt;
&lt;br /&gt;
:In general it is a good idea to stay close within the &#039;&#039;0&#039;&#039; dB range for positive values. &lt;br /&gt;
&lt;br /&gt;
=== unclamped/ s_unclamped ===&lt;br /&gt;
&lt;br /&gt;
:Possible values are &#039;&#039;0&#039;&#039; and &#039;&#039;1&#039;&#039;. This overrides the global &#039;&#039;volume&#039;&#039; clipping and will make your sound bypass the &#039;&#039;s_clipVolumes&#039;&#039; setting.&lt;br /&gt;
&lt;br /&gt;
:Should be used with extra care, can trigger hardware clipping. This will not damage your hardware, but sound real crappy -- keep in mind this is a game and not your favourite tube amp.&lt;br /&gt;
&lt;br /&gt;
:(The usual doom way to deal with this is debugging your map with &#039;&#039;s_levelmeters 1&#039;&#039;, I think. It is supposed to draw a nice level meter for every channel in the upper left corner -- sadly this is broken in TDM atm.)&lt;br /&gt;
&lt;br /&gt;
=== minDistance/ s_mindistance ===&lt;br /&gt;
&lt;br /&gt;
:This works together with &#039;&#039;maxDistance&#039;&#039; like this:&lt;br /&gt;
&lt;br /&gt;
:[[Image:Mindistance-maxdistance-falloff.png]]&lt;br /&gt;
&lt;br /&gt;
:Around the speaker there is a spherical volume, defined by &#039;&#039;minDistance&#039;&#039;. Inside that, the sound plays at the specified full &#039;&#039;volume&#039;&#039;. The (hopefully) larger &#039;&#039;maxDistance&#039;&#039; defines a bigger sphere. Outside of it the &#039;&#039;volume&#039;&#039; will be &#039;&#039;0&#039;&#039;, inside of it there is a falloff from max. to min.&lt;br /&gt;
&lt;br /&gt;
:Note: &#039;&#039;&#039;Do not set &#039;&#039;s_mindistance&#039;&#039; to &#039;&#039;0&#039;&#039;!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:While a real sound does not have a &amp;quot;mindistance&amp;quot; it will not work to set &#039;&#039;s_mindistance&#039;&#039; to &#039;&#039;0&#039;&#039;. A quick test revealed the following behavior:&lt;br /&gt;
&lt;br /&gt;
:[[Image:Mindistance-overrides.png]]&lt;br /&gt;
&lt;br /&gt;
:This shows we can overide the shader values with our spawnarg in DR, but when we set it to &#039;&#039;0&#039;&#039; it counts not as a number but as a toggle that simply disables our intended input. This is as good as deleting the property.&lt;br /&gt;
&lt;br /&gt;
:The value will fall back to the shader default (lucky case is purple, bad cases are red). In the right column (red and yellow field) you can see what happens when no values are provided by the shader nor the spawnarg: doom simply sets the &#039;&#039;minDistance&#039;&#039; to &#039;&#039;1&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
:As a resort mappers can always use &#039;&#039;s_mindistance 1&#039;&#039;, that&#039;s close enaugh for rock&#039;n&#039;roll.&lt;br /&gt;
&lt;br /&gt;
=== maxDistance/ s_maxdistance ===&lt;br /&gt;
&lt;br /&gt;
:See above. The outlines of &#039;&#039;maxDistance&#039;&#039; can be drag-resized in DarkRadiant. This does not show you the real dispersion of the sound in most cases (due to occlusion, see below).&lt;br /&gt;
&lt;br /&gt;
:Not setting the &#039;&#039;maxDistance&#039;&#039; or at the same time setting &#039;&#039;s_maxdistance&#039;&#039; to &#039;&#039;0&#039;&#039; (which is insane anyway) will cause doom to use &#039;&#039;10&#039;&#039; instead.&lt;br /&gt;
&lt;br /&gt;
=== looping/ s_looping ===&lt;br /&gt;
&lt;br /&gt;
:Turns on and off looping. The sound will repeat endlessly in a forward loop.&lt;br /&gt;
&lt;br /&gt;
=== omnidirectional/ s_omni ===&lt;br /&gt;
&lt;br /&gt;
:The sound will have the same &#039;&#039;volume&#039;&#039; on all speakers, so it sounds like not having a specific origin. Normally used for ambience music (when not using the preferred method via [[Location Settings]]). Works with falloff as provided by &#039;&#039;minDistance&#039;&#039; and &#039;&#039;maxDistance&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== global/ s_global ===&lt;br /&gt;
&lt;br /&gt;
:Plays the sound at full &#039;&#039;volume&#039;&#039; everywhere in the map.&lt;br /&gt;
&lt;br /&gt;
=== no_occlusion/ s_occlusion ===&lt;br /&gt;
&lt;br /&gt;
:The shader keyword turns occlusion off, &#039;&#039;s_occlusion&#039;&#039; must be set to &#039;&#039;1&#039;&#039; for the same effect (this is counterintuitive).&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;What is occlusion?&#039;&#039;&#039; -- To resemble a realistic falloff for sounds, the game traces the route to the speaker from the player position through vis_portals instead of line of sight. Even closed doors or windows are taken into account for that calculation.&lt;br /&gt;
&lt;br /&gt;
:If you want your specific sound to be not affected by this, you can turn it off this way.&lt;br /&gt;
&lt;br /&gt;
:Note: it is highly recommended to turn occlusion off for ambient music, or it will fade when you close a door etc.&lt;br /&gt;
&lt;br /&gt;
=== shakes/ s_shakes ===&lt;br /&gt;
&lt;br /&gt;
:A special effect, that shakes the screen when the sound plays. Possible values are fractions between &#039;&#039;0&#039;&#039; and &#039;&#039;1&#039;&#039;. This is multiplied with the &#039;&#039;volume&#039;&#039; to determine the intensity of the effect.&lt;br /&gt;
&lt;br /&gt;
:Note: &#039;&#039;s_shakes 0&#039;&#039; will disable itself and fall back to the &#039;&#039;shakes&#039;&#039; value in the shader.&lt;br /&gt;
&lt;br /&gt;
:Note2: Iddevnet says it should not be used with .ogg files.&lt;br /&gt;
&lt;br /&gt;
=== n. a./ s_waitfortrigger ===&lt;br /&gt;
&lt;br /&gt;
:If set to &#039;&#039;1&#039;&#039; the speaker will wait for a trigger to activate it.&lt;br /&gt;
&lt;br /&gt;
=== n. a./ s_shader ===&lt;br /&gt;
&lt;br /&gt;
:Points to the sound shader the speaker uses. Can as well be used to reference audio files directly, when not present in any shader.&lt;br /&gt;
&lt;br /&gt;
=== leadin/ n. a. ===&lt;br /&gt;
&lt;br /&gt;
:Specifies a file that is played as a lead-in to a looped part of the sound.&lt;br /&gt;
&lt;br /&gt;
=== leadinVolume/ n. a. ===&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Volume&#039;&#039; of the lead-in part in a looped sound.&lt;br /&gt;
&lt;br /&gt;
=== no_dups/ n. a. ===&lt;br /&gt;
&lt;br /&gt;
:This prevents the same audio file out of the multiple ones in a shader to be played twice in a row when randomly playing them.&lt;br /&gt;
&lt;br /&gt;
:Not of any use when your shader references only one file.&lt;br /&gt;
&lt;br /&gt;
=== private/ n. a. ===&lt;br /&gt;
&lt;br /&gt;
:The sound is only present to the player.&lt;br /&gt;
&lt;br /&gt;
=== description/ n. a. ===&lt;br /&gt;
&lt;br /&gt;
:A short discription in the shader. In DarkMod it usually names the creator of the sound.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
When you set up a few sounds, you propably like to check them out in game. Learn about additional tools for [[Debugging Your Speakers]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Further information can be found at [http://www.modwiki.net/wiki/Sound_(keywords) modwiki.net] or [http://www.iddevnet.com/doom3/sounds.php iddevnet].&lt;br /&gt;
&lt;br /&gt;
[[Category:Sound]]&lt;br /&gt;
[[Category:Editing]]&lt;/div&gt;</summary>
		<author><name>Plasticman</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=File:Entity-inspector-speaker.png&amp;diff=11617</id>
		<title>File:Entity-inspector-speaker.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=File:Entity-inspector-speaker.png&amp;diff=11617"/>
		<updated>2010-11-25T03:24:06Z</updated>

		<summary type="html">&lt;p&gt;Plasticman: DR entity inspector with a speaker entity and spawnargs.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;DR entity inspector with a speaker entity and spawnargs.&lt;/div&gt;</summary>
		<author><name>Plasticman</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Volume_Issues&amp;diff=11616</id>
		<title>Volume Issues</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Volume_Issues&amp;diff=11616"/>
		<updated>2010-11-25T02:50:30Z</updated>

		<summary type="html">&lt;p&gt;Plasticman: links added to &amp;quot;proper&amp;quot; articles&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;::The following is qouted from the forum.&lt;br /&gt;
::Compare &amp;quot;proper&amp;quot; articles in the making: [[Setting Up Speakers]] and [[Debugging Your Speakers]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;by Plasticman&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I did some reading on iddevnet and checked a few things in game.&lt;br /&gt;
&lt;br /&gt;
I think Orb is right: the volume gets capped on both channels so the sound virtually moves to the center. I consider this a bug in doom, though it only appears once the assets are produced &amp;quot;wrong&amp;quot;. Still it should not break the left vs. right balance.&lt;br /&gt;
&lt;br /&gt;
The mechanism can be controlled globally via the s_clipVolumes cvar (works instantly without restarting anything) and locally (overriding the cvar) via the unclamped keyword in the soundshader (always wondered what this bes). Any sound that comes with this declaration will not be clipped in doom no matter what the cvar is -- this means it will be clipped by the hardware if it is too loud. :D&lt;br /&gt;
&lt;br /&gt;
So, the purpose of dooms clipping is to prevent overdriving your audio hardware, some sort of &amp;quot;fuse&amp;quot; that normally should not get triggered by the assets.&lt;br /&gt;
&lt;br /&gt;
Although volume refers to a decibel value (and thus defaults to 0) there seems to be a little headroom. There are roundabout 3400 shader declarations in vanilla doom that use the volume keyword. Positive values distribute like this:&lt;br /&gt;
&lt;br /&gt;
volume / number of shader declarations&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; 0 : 1441&lt;br /&gt;
 &amp;gt; 5 : 430&lt;br /&gt;
 &amp;gt; 10 : 83&lt;br /&gt;
 &amp;gt; 15 : 54&lt;br /&gt;
 &amp;gt; 20 : 8&lt;br /&gt;
&lt;br /&gt;
The maximum is 30 (used 2 times). I guess the few with real high values are only rarely used in situations where it doesn&#039;t matter, like cutscenes etc.; some of the others are important for gameplay and this is what I think the headroom is meant for, so you can &amp;quot;lift&amp;quot; some of the more important sounds over the usual ambience buzz.&lt;br /&gt;
&lt;br /&gt;
How much space there is I don&#039;t know. But I assume it does not work like a limiter in an audio app -- they wouldn&#039;t waste any CPU resources for audio processing when those are needed for calculating shadow volumes. So it likely does not matter how much dB your sound really is, the audio data gets treated like 0 dB plus what the shader says.&lt;br /&gt;
&lt;br /&gt;
If I am right with that assumption the Pro needs some dynamic processing besides fixing in the shader. Here is a comparison shot:&lt;br /&gt;
&lt;br /&gt;
== s_drawsounds ==&lt;br /&gt;
There is a cvar to make sounds visible: s_drawsounds. &amp;quot;0&amp;quot; disables it, &amp;quot;1&amp;quot; shows sounds that can be heard at the moment, &amp;quot;2&amp;quot; seems to draw all sounds. This will show a box where the speaker is and label it something like this:&lt;br /&gt;
&lt;br /&gt;
 rock_door_loop (3/3 2/26)&lt;br /&gt;
 9&lt;br /&gt;
 That translates to&lt;br /&gt;
 &amp;lt;shader&amp;gt; (a/b c/d)&lt;br /&gt;
 e&lt;br /&gt;
&lt;br /&gt;
Where a is the calculated distance (through doors and portals), b is the real distance (line of sight), c is minDistance, d maxDistance and e seems to be the number of the speaker.&lt;br /&gt;
&lt;br /&gt;
This little tool showed me there are quite a few sounds in game that seem to work with a minDistance of 0. But when I set up a speaker in Radiant with s_minDistance 0 it shows up in game with minDistance 20, independent of the other factors (vol., maxdist.).&lt;br /&gt;
&lt;br /&gt;
My map file looks fine in a text editor, so it must be (again) doom&#039;s fault: minDistance 0 works, s_minDistance 0 gets &amp;quot;converted&amp;quot; to 20.&lt;/div&gt;</summary>
		<author><name>Plasticman</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Sound&amp;diff=11615</id>
		<title>Sound</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Sound&amp;diff=11615"/>
		<updated>2010-11-25T02:39:21Z</updated>

		<summary type="html">&lt;p&gt;Plasticman: linked &amp;quot;Setting Up Speakers&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{index-page|category=Sound|topic=sounds}}&lt;br /&gt;
Here you will find information about the sounds and how you add them to your level.&lt;br /&gt;
&lt;br /&gt;
* [[Adding ambient Sounds to your Map]]&lt;br /&gt;
* [[Estimating Volume for New Sounds]]&lt;br /&gt;
* [[Faked lipsync]], and how to turn it off for specific sounds&lt;br /&gt;
* [[Moveables: Surface Type-dependent Bounce Sound]]&lt;br /&gt;
* [[Problem Hearing Varied Sounds]]&lt;br /&gt;
* [[Reaction to Material Types]]&lt;br /&gt;
* [[Setting up Individual Propagated Sounds and Estimating Volume]]&lt;br /&gt;
* [[Setting Up Speakers]] -- Soundshader keywords and how mappers can override them&lt;br /&gt;
* [[Setting Reverb Data of Rooms (EAX)]]&lt;br /&gt;
* [[Sound Folderstructure]]&lt;br /&gt;
* [[Sound File Formats]]&lt;br /&gt;
* [[Sound Propagation: Part 1]]&lt;br /&gt;
* [[Sound Propagation: Part 2]]&lt;br /&gt;
* [[Volume Issues]]  -- info from the board about a D3 bug with volume; as well as good developer cvar to make sounds visible&lt;br /&gt;
&lt;br /&gt;
{{sound}}&lt;/div&gt;</summary>
		<author><name>Plasticman</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Setting_Up_Speakers&amp;diff=11614</id>
		<title>Setting Up Speakers</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Setting_Up_Speakers&amp;diff=11614"/>
		<updated>2010-11-24T09:42:20Z</updated>

		<summary type="html">&lt;p&gt;Plasticman: /* omnidirectional/ s_omni */ -- fixed broken link.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To bring your mission to life it needs more than just geometry. While players may not know it consciously, they want your DarkMod mission to be an excellent aural experience. &lt;br /&gt;
&lt;br /&gt;
== Create A Speaker Entity ==&lt;br /&gt;
&lt;br /&gt;
To create a speaker you can simply click {{RMB}} in DarkRadiant and select &amp;quot;Create speaker...&amp;quot;. This will:&lt;br /&gt;
* create a speaker entity&lt;br /&gt;
* open a window that lets you choose a sound&lt;br /&gt;
After choosing a sound you can alter the sound&#039;s properties in the entity inspector.&lt;br /&gt;
&lt;br /&gt;
To do that it is handy to know how sounds in our game basically work. Via sound shaders, that is:&lt;br /&gt;
&lt;br /&gt;
== Sound Shaders And Spawnargs ==&lt;br /&gt;
&lt;br /&gt;
A sound shader is text file that resides in darkmod/sounds and comes with the *.sndshd extension. These shaders tell the engine where the .waves or .oggs can be found along with some common parameters.&lt;br /&gt;
&lt;br /&gt;
As an example we look at the shader for &amp;quot;footsteps on stone materials while walking&amp;quot; (you would not put these in game via a speaker normally, but you &#039;&#039;could&#039;&#039; do it since all sounds work technically the same):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 tdm_footstep_stone_walk&lt;br /&gt;
 { &lt;br /&gt;
 	description &amp;quot;Made by GoldChocobo&amp;quot;&lt;br /&gt;
 	no_dups&lt;br /&gt;
 	minDistance 1&lt;br /&gt;
 	maxDistance 30&lt;br /&gt;
 	volume -12&lt;br /&gt;
 &lt;br /&gt;
 	sound/sfx/movement/footsteps/player/stone_walk01.ogg&lt;br /&gt;
 	sound/sfx/movement/footsteps/player/stone_walk02.ogg&lt;br /&gt;
 	sound/sfx/movement/footsteps/player/stone_walk03.ogg&lt;br /&gt;
 	sound/sfx/movement/footsteps/player/stone_walk04.ogg&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It starts with the shader name &amp;quot;tdm_footstep_stone_walk&amp;quot;. This will show up in DarkRadiant&#039;s &amp;quot;Choose sound&amp;quot; dialog. Then we have some keywords followed by the actual sound files and their relative path.&lt;br /&gt;
&lt;br /&gt;
There are four sounds (not only one) to allow variety, they get played in a random order when the sound is triggered. (In most cases, see [[Problem Hearing Varied Sounds]].)&lt;br /&gt;
&lt;br /&gt;
Picking the &#039;&#039;volume&#039;&#039; keyword you can see it is followed by a negative value. These are meant to be decibel (dB), so we can expect 0 to be the maximum while a reduction by 10 approximately is half the volume.&lt;br /&gt;
&lt;br /&gt;
If you created your speaker and wanted to change it&#039;s volume in dark radiant you would go to the entity inspector and add the spawnarg &#039;&#039;s_volume&#039;&#039;. Whatever number you enter here is meant to override the shader setting.&lt;br /&gt;
&lt;br /&gt;
So what we have is a system where our shaders provide the default values. We can override these values in the map file using the appropriate spawnargs. Note that not defining anything in the shader as well as in your map file won&#039;t crash the game -- there are still fallback values (propably hardcoded in the engine).&lt;br /&gt;
&lt;br /&gt;
In the following list the keywords are presented as a pair, where possible. The soundshader keyword is followed by the corresponding counterpart you would use in DR.&lt;br /&gt;
&lt;br /&gt;
=== volume/ s_volume ===&lt;br /&gt;
&lt;br /&gt;
:The &#039;&#039;volume&#039;&#039; is set in dB. Usually this means there is a maximum of &#039;&#039;0&#039;&#039; dB. The minimum is &#039;&#039;-60&#039;&#039; dB which results in absoulute silence.&lt;br /&gt;
&lt;br /&gt;
:Up to a certain point the game allows the use of positive values as well, but be aware this is sensitive:&lt;br /&gt;
&lt;br /&gt;
:To prevent clipping the engine has a mechanism that does not allow the &#039;&#039;volume&#039;&#039; to overdrive your sound hardware. For testing, it can be disabled via the &#039;&#039;s_clipVolumes&#039;&#039; cvar, but if it is active it will clip the &#039;&#039;volume&#039;&#039; for every output sound channel after all the other calculations are done -- this includes stereo panning, so once the volume setting is too high all the speakers (in your headphones, on your stereo) will play the sound the same maximum volume. It gets virtually monofied, the player no longer is able to locate the sound.&lt;br /&gt;
&lt;br /&gt;
:In general it is a good idea to stay close within the &#039;&#039;0&#039;&#039; dB range for positive values. &lt;br /&gt;
&lt;br /&gt;
=== unclamped/ s_unclamped ===&lt;br /&gt;
&lt;br /&gt;
:Possible values are &#039;&#039;0&#039;&#039; and &#039;&#039;1&#039;&#039;. This overrides the global &#039;&#039;volume&#039;&#039; clipping and will make your sound bypass the &#039;&#039;s_clipVolumes&#039;&#039; setting.&lt;br /&gt;
&lt;br /&gt;
:Should be used with extra care, can trigger hardware clipping. This will not damage your hardware, but sound real crappy -- keep in mind this is a game and not your favourite tube amp.&lt;br /&gt;
&lt;br /&gt;
:(The usual doom way to deal with this is debugging your map with &#039;&#039;s_levelmeters 1&#039;&#039;, I think. It is supposed to draw a nice level meter for every channel in the upper left corner -- sadly this is broken in TDM atm.)&lt;br /&gt;
&lt;br /&gt;
=== minDistance/ s_mindistance ===&lt;br /&gt;
&lt;br /&gt;
:This works together with &#039;&#039;maxDistance&#039;&#039; like this:&lt;br /&gt;
&lt;br /&gt;
:[[Image:Mindistance-maxdistance-falloff.png]]&lt;br /&gt;
&lt;br /&gt;
:Around the speaker there is a spherical volume, defined by &#039;&#039;minDistance&#039;&#039;. Inside that, the sound plays at the specified full &#039;&#039;volume&#039;&#039;. The (hopefully) larger &#039;&#039;maxDistance&#039;&#039; defines a bigger sphere. Outside of it the &#039;&#039;volume&#039;&#039; will be &#039;&#039;0&#039;&#039;, inside of it there is a falloff from max. to min.&lt;br /&gt;
&lt;br /&gt;
:Note: &#039;&#039;&#039;Do not set &#039;&#039;s_mindistance&#039;&#039; to &#039;&#039;0&#039;&#039;!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:While a real sound does not have a &amp;quot;mindistance&amp;quot; it will not work to set &#039;&#039;s_mindistance&#039;&#039; to &#039;&#039;0&#039;&#039;. A quick test revealed the following behavior:&lt;br /&gt;
&lt;br /&gt;
:[[Image:Mindistance-overrides.png]]&lt;br /&gt;
&lt;br /&gt;
:This shows we can overide the shader values with our spawnarg in DR, but when we set it to &#039;&#039;0&#039;&#039; it counts not as a number but as a toggle that simply disables our intended input. This is as good as deleting the property.&lt;br /&gt;
&lt;br /&gt;
:The value will fall back to the shader default (lucky case is purple, bad cases are red). In the right column (red and yellow field) you can see what happens when no values are provided by the shader nor the spawnarg: doom simply sets the &#039;&#039;minDistance&#039;&#039; to &#039;&#039;1&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
:As a resort mappers can always use &#039;&#039;s_mindistance 1&#039;&#039;, that&#039;s close enaugh for rock&#039;n&#039;roll.&lt;br /&gt;
&lt;br /&gt;
=== maxDistance/ s_maxdistance ===&lt;br /&gt;
&lt;br /&gt;
:See above. The outlines of &#039;&#039;maxDistance&#039;&#039; can be drag-resized in DarkRadiant. This does not show you the real dispersion of the sound in most cases (due to occlusion, see below).&lt;br /&gt;
&lt;br /&gt;
:Not setting the &#039;&#039;maxDistance&#039;&#039; or at the same time setting &#039;&#039;s_maxdistance&#039;&#039; to &#039;&#039;0&#039;&#039; (which is insane anyway) will cause doom to use &#039;&#039;10&#039;&#039; instead.&lt;br /&gt;
&lt;br /&gt;
=== looping/ s_looping ===&lt;br /&gt;
&lt;br /&gt;
:Turns on and off looping. The sound will repeat endlessly in a forward loop.&lt;br /&gt;
&lt;br /&gt;
=== omnidirectional/ s_omni ===&lt;br /&gt;
&lt;br /&gt;
:The sound will have the same &#039;&#039;volume&#039;&#039; on all speakers, so it sounds like not having a specific origin. Normally used for ambience music (when not using the preferred method via [[Location Settings]]). Works with falloff as provided by &#039;&#039;minDistance&#039;&#039; and &#039;&#039;maxDistance&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== global/ s_global ===&lt;br /&gt;
&lt;br /&gt;
:Plays the sound at full &#039;&#039;volume&#039;&#039; everywhere in the map.&lt;br /&gt;
&lt;br /&gt;
=== no_occlusion/ s_occlusion ===&lt;br /&gt;
&lt;br /&gt;
:The shader keyword turns occlusion off, &#039;&#039;s_occlusion&#039;&#039; must be set to &#039;&#039;1&#039;&#039; for the same effect (this is counterintuitive).&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;What is occlusion?&#039;&#039;&#039; -- To resemble a realistic falloff for sounds, the game traces the route to the speaker from the player position through vis_portals instead of line of sight. Even closed doors or windows are taken into account for that calculation.&lt;br /&gt;
&lt;br /&gt;
:If you want your specific sound to be not affected by this, you can turn it off this way.&lt;br /&gt;
&lt;br /&gt;
:Note: it is highly recommended to turn occlusion off for ambient music, or it will fade when you close a door etc.&lt;br /&gt;
&lt;br /&gt;
=== shakes/ s_shakes ===&lt;br /&gt;
&lt;br /&gt;
:A special effect, that shakes the screen when the sound plays. Possible values are fractions between &#039;&#039;0&#039;&#039; and &#039;&#039;1&#039;&#039;. This is multiplied with the &#039;&#039;volume&#039;&#039; to determine the intensity of the effect.&lt;br /&gt;
&lt;br /&gt;
:Note: &#039;&#039;s_shakes 0&#039;&#039; will disable itself and fall back to the &#039;&#039;shakes&#039;&#039; value in the shader.&lt;br /&gt;
&lt;br /&gt;
:Note2: Iddevnet says it should not be used with .ogg files.&lt;br /&gt;
&lt;br /&gt;
=== ------/ s_waitfortrigger ===&lt;br /&gt;
&lt;br /&gt;
:If set to &#039;&#039;1&#039;&#039; the speaker will wait for a trigger to activate it.&lt;br /&gt;
&lt;br /&gt;
=== ------/ s_shader ===&lt;br /&gt;
&lt;br /&gt;
:Points to the sound shader the speaker uses. Can as well be used to reference audio files directly, when not present in any shader.&lt;br /&gt;
&lt;br /&gt;
=== leadin/ ------ ===&lt;br /&gt;
&lt;br /&gt;
:Specifies a file that is played as a lead-in to a looped part of the sound.&lt;br /&gt;
&lt;br /&gt;
=== leadinVolume/ ------ ===&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Volume&#039;&#039; of the lead-in part in a looped sound.&lt;br /&gt;
&lt;br /&gt;
=== no_dups/ ------ ===&lt;br /&gt;
&lt;br /&gt;
:This prevents the same audio file out of the multiple ones in a shader to be played twice in a row when randomly playing them.&lt;br /&gt;
&lt;br /&gt;
:Not of any use when your shader references only one file.&lt;br /&gt;
&lt;br /&gt;
=== private/ ------ ===&lt;br /&gt;
&lt;br /&gt;
:The sound is only present to the player.&lt;br /&gt;
&lt;br /&gt;
=== description/ ------ ===&lt;br /&gt;
&lt;br /&gt;
:A short discription in the shader. In DarkMod it usually names the creator of the sound.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
When you set up a few sounds, you propably like to check them out in game. Learn about additional tools for [[Debugging Your Speakers]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Further information can be found at [http://www.modwiki.net/wiki/Sound_(keywords) modwiki.net] od [http://www.iddevnet.com/doom3/sounds.php iddevnet].&lt;br /&gt;
&lt;br /&gt;
[[Category:Sound]]&lt;/div&gt;</summary>
		<author><name>Plasticman</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Setting_Up_Speakers&amp;diff=11613</id>
		<title>Setting Up Speakers</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Setting_Up_Speakers&amp;diff=11613"/>
		<updated>2010-11-24T09:17:34Z</updated>

		<summary type="html">&lt;p&gt;Plasticman: Speaker setups focusing on shader keywords and spawnargs&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To bring your mission to life it needs more than just geometry. While players may not know it consciously, they want your DarkMod mission to be an excellent aural experience. &lt;br /&gt;
&lt;br /&gt;
== Create A Speaker Entity ==&lt;br /&gt;
&lt;br /&gt;
To create a speaker you can simply click {{RMB}} in DarkRadiant and select &amp;quot;Create speaker...&amp;quot;. This will:&lt;br /&gt;
* create a speaker entity&lt;br /&gt;
* open a window that lets you choose a sound&lt;br /&gt;
After choosing a sound you can alter the sound&#039;s properties in the entity inspector.&lt;br /&gt;
&lt;br /&gt;
To do that it is handy to know how sounds in our game basically work. Via sound shaders, that is:&lt;br /&gt;
&lt;br /&gt;
== Sound Shaders And Spawnargs ==&lt;br /&gt;
&lt;br /&gt;
A sound shader is text file that resides in darkmod/sounds and comes with the *.sndshd extension. These shaders tell the engine where the .waves or .oggs can be found along with some common parameters.&lt;br /&gt;
&lt;br /&gt;
As an example we look at the shader for &amp;quot;footsteps on stone materials while walking&amp;quot; (you would not put these in game via a speaker normally, but you &#039;&#039;could&#039;&#039; do it since all sounds work technically the same):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 tdm_footstep_stone_walk&lt;br /&gt;
 { &lt;br /&gt;
 	description &amp;quot;Made by GoldChocobo&amp;quot;&lt;br /&gt;
 	no_dups&lt;br /&gt;
 	minDistance 1&lt;br /&gt;
 	maxDistance 30&lt;br /&gt;
 	volume -12&lt;br /&gt;
 &lt;br /&gt;
 	sound/sfx/movement/footsteps/player/stone_walk01.ogg&lt;br /&gt;
 	sound/sfx/movement/footsteps/player/stone_walk02.ogg&lt;br /&gt;
 	sound/sfx/movement/footsteps/player/stone_walk03.ogg&lt;br /&gt;
 	sound/sfx/movement/footsteps/player/stone_walk04.ogg&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It starts with the shader name &amp;quot;tdm_footstep_stone_walk&amp;quot;. This will show up in DarkRadiant&#039;s &amp;quot;Choose sound&amp;quot; dialog. Then we have some keywords followed by the actual sound files and their relative path.&lt;br /&gt;
&lt;br /&gt;
There are four sounds (not only one) to allow variety, they get played in a random order when the sound is triggered. (In most cases, see [[Problem Hearing Varied Sounds]].)&lt;br /&gt;
&lt;br /&gt;
Picking the &#039;&#039;volume&#039;&#039; keyword you can see it is followed by a negative value. These are meant to be decibel (dB), so we can expect 0 to be the maximum while a reduction by 10 approximately is half the volume.&lt;br /&gt;
&lt;br /&gt;
If you created your speaker and wanted to change it&#039;s volume in dark radiant you would go to the entity inspector and add the spawnarg &#039;&#039;s_volume&#039;&#039;. Whatever number you enter here is meant to override the shader setting.&lt;br /&gt;
&lt;br /&gt;
So what we have is a system where our shaders provide the default values. We can override these values in the map file using the appropriate spawnargs. Note that not defining anything in the shader as well as in your map file won&#039;t crash the game -- there are still fallback values (propably hardcoded in the engine).&lt;br /&gt;
&lt;br /&gt;
In the following list the keywords are presented as a pair, where possible. The soundshader keyword is followed by the corresponding counterpart you would use in DR.&lt;br /&gt;
&lt;br /&gt;
=== volume/ s_volume ===&lt;br /&gt;
&lt;br /&gt;
:The &#039;&#039;volume&#039;&#039; is set in dB. Usually this means there is a maximum of &#039;&#039;0&#039;&#039; dB. The minimum is &#039;&#039;-60&#039;&#039; dB which results in absoulute silence.&lt;br /&gt;
&lt;br /&gt;
:Up to a certain point the game allows the use of positive values as well, but be aware this is sensitive:&lt;br /&gt;
&lt;br /&gt;
:To prevent clipping the engine has a mechanism that does not allow the &#039;&#039;volume&#039;&#039; to overdrive your sound hardware. For testing, it can be disabled via the &#039;&#039;s_clipVolumes&#039;&#039; cvar, but if it is active it will clip the &#039;&#039;volume&#039;&#039; for every output sound channel after all the other calculations are done -- this includes stereo panning, so once the volume setting is too high all the speakers (in your headphones, on your stereo) will play the sound the same maximum volume. It gets virtually monofied, the player no longer is able to locate the sound.&lt;br /&gt;
&lt;br /&gt;
:In general it is a good idea to stay close within the &#039;&#039;0&#039;&#039; dB range for positive values. &lt;br /&gt;
&lt;br /&gt;
=== unclamped/ s_unclamped ===&lt;br /&gt;
&lt;br /&gt;
:Possible values are &#039;&#039;0&#039;&#039; and &#039;&#039;1&#039;&#039;. This overrides the global &#039;&#039;volume&#039;&#039; clipping and will make your sound bypass the &#039;&#039;s_clipVolumes&#039;&#039; setting.&lt;br /&gt;
&lt;br /&gt;
:Should be used with extra care, can trigger hardware clipping. This will not damage your hardware, but sound real crappy -- keep in mind this is a game and not your favourite tube amp.&lt;br /&gt;
&lt;br /&gt;
:(The usual doom way to deal with this is debugging your map with &#039;&#039;s_levelmeters 1&#039;&#039;, I think. It is supposed to draw a nice level meter for every channel in the upper left corner -- sadly this is broken in TDM atm.)&lt;br /&gt;
&lt;br /&gt;
=== minDistance/ s_mindistance ===&lt;br /&gt;
&lt;br /&gt;
:This works together with &#039;&#039;maxDistance&#039;&#039; like this:&lt;br /&gt;
&lt;br /&gt;
:[[Image:Mindistance-maxdistance-falloff.png]]&lt;br /&gt;
&lt;br /&gt;
:Around the speaker there is a spherical volume, defined by &#039;&#039;minDistance&#039;&#039;. Inside that, the sound plays at the specified full &#039;&#039;volume&#039;&#039;. The (hopefully) larger &#039;&#039;maxDistance&#039;&#039; defines a bigger sphere. Outside of it the &#039;&#039;volume&#039;&#039; will be &#039;&#039;0&#039;&#039;, inside of it there is a falloff from max. to min.&lt;br /&gt;
&lt;br /&gt;
:Note: &#039;&#039;&#039;Do not set &#039;&#039;s_mindistance&#039;&#039; to &#039;&#039;0&#039;&#039;!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:While a real sound does not have a &amp;quot;mindistance&amp;quot; it will not work to set &#039;&#039;s_mindistance&#039;&#039; to &#039;&#039;0&#039;&#039;. A quick test revealed the following behavior:&lt;br /&gt;
&lt;br /&gt;
:[[Image:Mindistance-overrides.png]]&lt;br /&gt;
&lt;br /&gt;
:This shows we can overide the shader values with our spawnarg in DR, but when we set it to &#039;&#039;0&#039;&#039; it counts not as a number but as a toggle that simply disables our intended input. This is as good as deleting the property.&lt;br /&gt;
&lt;br /&gt;
:The value will fall back to the shader default (lucky case is purple, bad cases are red). In the right column (red and yellow field) you can see what happens when no values are provided by the shader nor the spawnarg: doom simply sets the &#039;&#039;minDistance&#039;&#039; to &#039;&#039;1&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
:As a resort mappers can always use &#039;&#039;s_mindistance 1&#039;&#039;, that&#039;s close enaugh for rock&#039;n&#039;roll.&lt;br /&gt;
&lt;br /&gt;
=== maxDistance/ s_maxdistance ===&lt;br /&gt;
&lt;br /&gt;
:See above. The outlines of &#039;&#039;maxDistance&#039;&#039; can be drag-resized in DarkRadiant. This does not show you the real dispersion of the sound in most cases (due to occlusion, see below).&lt;br /&gt;
&lt;br /&gt;
:Not setting the &#039;&#039;maxDistance&#039;&#039; or at the same time setting &#039;&#039;s_maxdistance&#039;&#039; to &#039;&#039;0&#039;&#039; (which is insane anyway) will cause doom to use &#039;&#039;10&#039;&#039; instead.&lt;br /&gt;
&lt;br /&gt;
=== looping/ s_looping ===&lt;br /&gt;
&lt;br /&gt;
:Turns on and off looping. The sound will repeat endlessly in a forward loop.&lt;br /&gt;
&lt;br /&gt;
=== omnidirectional/ s_omni ===&lt;br /&gt;
&lt;br /&gt;
:The sound will have the same &#039;&#039;volume&#039;&#039; on all speakers, so it sounds like not having a specific origin. Normally used for ambience music (when not using the preferred method via [[location settings]]). Works with falloff as provided by &#039;&#039;minDistance&#039;&#039; and &#039;&#039;maxDistance&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== global/ s_global ===&lt;br /&gt;
&lt;br /&gt;
:Plays the sound at full &#039;&#039;volume&#039;&#039; everywhere in the map.&lt;br /&gt;
&lt;br /&gt;
=== no_occlusion/ s_occlusion ===&lt;br /&gt;
&lt;br /&gt;
:The shader keyword turns occlusion off, &#039;&#039;s_occlusion&#039;&#039; must be set to &#039;&#039;1&#039;&#039; for the same effect (this is counterintuitive).&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;What is occlusion?&#039;&#039;&#039; -- To resemble a realistic falloff for sounds, the game traces the route to the speaker from the player position through vis_portals instead of line of sight. Even closed doors or windows are taken into account for that calculation.&lt;br /&gt;
&lt;br /&gt;
:If you want your specific sound to be not affected by this, you can turn it off this way.&lt;br /&gt;
&lt;br /&gt;
:Note: it is highly recommended to turn occlusion off for ambient music, or it will fade when you close a door etc.&lt;br /&gt;
&lt;br /&gt;
=== shakes/ s_shakes ===&lt;br /&gt;
&lt;br /&gt;
:A special effect, that shakes the screen when the sound plays. Possible values are fractions between &#039;&#039;0&#039;&#039; and &#039;&#039;1&#039;&#039;. This is multiplied with the &#039;&#039;volume&#039;&#039; to determine the intensity of the effect.&lt;br /&gt;
&lt;br /&gt;
:Note: &#039;&#039;s_shakes 0&#039;&#039; will disable itself and fall back to the &#039;&#039;shakes&#039;&#039; value in the shader.&lt;br /&gt;
&lt;br /&gt;
:Note2: Iddevnet says it should not be used with .ogg files.&lt;br /&gt;
&lt;br /&gt;
=== ------/ s_waitfortrigger ===&lt;br /&gt;
&lt;br /&gt;
:If set to &#039;&#039;1&#039;&#039; the speaker will wait for a trigger to activate it.&lt;br /&gt;
&lt;br /&gt;
=== ------/ s_shader ===&lt;br /&gt;
&lt;br /&gt;
:Points to the sound shader the speaker uses. Can as well be used to reference audio files directly, when not present in any shader.&lt;br /&gt;
&lt;br /&gt;
=== leadin/ ------ ===&lt;br /&gt;
&lt;br /&gt;
:Specifies a file that is played as a lead-in to a looped part of the sound.&lt;br /&gt;
&lt;br /&gt;
=== leadinVolume/ ------ ===&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Volume&#039;&#039; of the lead-in part in a looped sound.&lt;br /&gt;
&lt;br /&gt;
=== no_dups/ ------ ===&lt;br /&gt;
&lt;br /&gt;
:This prevents the same audio file out of the multiple ones in a shader to be played twice in a row when randomly playing them.&lt;br /&gt;
&lt;br /&gt;
:Not of any use when your shader references only one file.&lt;br /&gt;
&lt;br /&gt;
=== private/ ------ ===&lt;br /&gt;
&lt;br /&gt;
:The sound is only present to the player.&lt;br /&gt;
&lt;br /&gt;
=== description/ ------ ===&lt;br /&gt;
&lt;br /&gt;
:A short discription in the shader. In DarkMod it usually names the creator of the sound.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
When you set up a few sounds, you propably like to check them out in game. Learn about additional tools for [[Debugging Your Speakers]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Further information can be found at [http://www.modwiki.net/wiki/Sound_(keywords) modwiki.net] od [http://www.iddevnet.com/doom3/sounds.php iddevnet].&lt;br /&gt;
&lt;br /&gt;
[[Category:Sound]]&lt;/div&gt;</summary>
		<author><name>Plasticman</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=File:Mindistance-overrides.png&amp;diff=11612</id>
		<title>File:Mindistance-overrides.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=File:Mindistance-overrides.png&amp;diff=11612"/>
		<updated>2010-11-24T08:06:52Z</updated>

		<summary type="html">&lt;p&gt;Plasticman: Overriding behavior of the s_mindistance spawnarg.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Overriding behavior of the s_mindistance spawnarg.&lt;/div&gt;</summary>
		<author><name>Plasticman</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=File:Mindistance-maxdistance-falloff.png&amp;diff=11611</id>
		<title>File:Mindistance-maxdistance-falloff.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=File:Mindistance-maxdistance-falloff.png&amp;diff=11611"/>
		<updated>2010-11-24T08:02:48Z</updated>

		<summary type="html">&lt;p&gt;Plasticman: Illustrates the minDistance/maxDistance model for sound propagation.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Illustrates the minDistance/maxDistance model for sound propagation.&lt;/div&gt;</summary>
		<author><name>Plasticman</name></author>
	</entry>
</feed>