Performance Tweaks: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
(23 intermediate revisions by the same user not shown)
Line 1: Line 1:
This article relates to performance issues ''for players''. For performance information ''for mappers'', see [[Performance: Essential Must-Knows]]
{{important|headline=For Players|text=This article relates to performance issues ''for players''. For performance information ''for mappers'', see [[Performance: Essential Must-Knows]] }}


== '''Minimum Specifications''' ==
== '''Minimum Specifications''' ==
Line 187: Line 187:
<br>Note: '''Savegames''' do not work between different mission versions.
<br>Note: '''Savegames''' do not work between different mission versions.


=== Known Taxing Missions ===
TDM performance can vary wildly depending on what any specific mission author has done to design their mission.
<br>Before deciding that TDM is unplayable on your hardware, please try less demanding missions
<br>The following are a few missions that are known to challenge low-end hardware configurations
<br><br>
<br><br>


<font size="5">
* Scroll of Remembrance
* Briarwood Manor
* The Rats Triumphant
* Rightful Property


== '''Optimizing the OS performance'''==
<br>Conversely, here are a few missions that should run well on low-end hardware ( in addition to the included "official" missions )
</font>
<br><br>


Historically, TDM had significantly better performance on Windows because Doom 3 had no SIMD optimizations under Linux.
* Closemouthed Shadows
<br>As of 2.06 and newer Linux TDM has both SSE SIMD and AVX optimizations so it can run faster under Linux due to less OS overhead.
* The Outpost
<br>Unfortunately, the default "capped FPS mode" has never worked well under Linux so out-of-box Linux still performs worse.
* The Parcel
<br>'''Hence we advise switching to [[Performance_Tweaks#Uncap_FPS_(New_in_v2.06) | uncapped mode]] under Linux.'''
* Special Delivery
<br>If you have a weaker CPU and can install Linux ( dual boot, etc ) you may see 5 to 10% performance uplift when configured properly
* The Thieves
* Thief's Den 1
* The Golden Skull
* Coercion
* Sir Talbot's Collatoral


<br>Also, some very large missions will not load when running 32-bit TDM versions on Windows ( or may have anomalies on 32-bit Linux )
<br>They simply cause TDM to exceed the limit of 32-bit mission loading.
<br><br>


=== All OS Variants: File Permissions ===
* The Painter's Wife
* Penny Dreadful 3: Erasing the Trail


Make sure your darkmod folder is located in a non-protected location.
<br>( Note: You may be able to use [[#Image_downsizing|image_downSize cvars]] to lower VRAM resources and load these missions on 32-bit Windows. )


On Windows, "Program Files" is protected and will cause problems saving any settings or installing Fan Missions.
<br><br>


On Linux, you should consider creating your darkmod directory under your /home/<username>/ folder to avoid permission issues.
<font size="5">


=== Linux UEFI Secure Boot ===
== '''Hardware Considerations''' ==
</font>


With Secure Boot enabled in the BIOS, some Linux distros will fallback to (slow) open drivers and wont have access to most hardware features.
If you can correct hardware deficiencies you may not need to perform as many tweaks or setting changes.
<br>If your Linux distro doesn't offer "Signed Kernels" and "Signed Drivers" disabling UEFI may be the only way to have acceptable performance
<br>Sometimes it is as simple as a Driver or BIOS update. Other times, you may need to consider updating hardware.
<br>We recommend that you consider using a Linux distro that offers Signed Kernels such as the latest Ubuntu, OpenSUSE, Debian, Linux Mint versions


=== Stop running programs in the background ===


Programs running in the background might either eat up memory that is needed for <s>Doom 3</s> The Dark Mod, and thus cause swapping to the hard disk, or they might consume CPU time or other resources.
<font size="4">


This can cause either general slowdowns or ''hickups'' during game play.
=== '''Driver Considerations''' ===
 
</font>
{{clear}}
----
''(IdTech4) The Dark Mod was originally based on OpenGL 2.0. (the same as Doom 3)''


=== Ensure that Programs are the main priority in the OS ===
''GPU manufacturers have largely ignored issues with this older specification so a number of workarounds have been''


To begin the process, type sysdm.cpl in Run box ({{key|Windows}} + {{key|R}}) and hit {{key|Enter}} to open the System Properties.  
''compiled by the community to attend to erroneous behaviors or poor performance.''


Select the Advanced tab and under Performance, {{LMB}} click on Settings.  
''As of TDM 2.06 and newer The Dark Mod uses OpenGL 3.x so many of these suggestions are no longer applicable.''


In the Performance Options box, select the Advanced Tab again.
''That said, even OpenGL 3.2 (current requirement) is an old standard so some newer workarounds may be needed.''


You will see a section Processor Scheduling


Choose "Programs" then {{LMB}} click Apply.
{{clear}}


{{clear}}
==== Intel ( new 2.09 ) ====


<font size="3">
Some Intel drivers do not perform well with persistent mapping enabled.
=== White-list TheDarkMod.exe in Security Software ===
<br>In 2.09 there is a special persistent mapping mode that works better for this hardware.
</font>
<br>You must disable standard persistent mapping to use this mode.


Make sure that Windows Defender or Anti-Virus, Anti-Spyware, etc aren't constantly scanning or interacting
<pre>


with TheDarkMod.exe. Add it to your security white-list.
r_gpuBufferNonpersistentUpdateMode "1"


==== Windows 10 Granular Security Options ====
r_usePersistentMapping 0


With new attacks like Meltdown and Spectre, Windows 10 has added CPU architecture specific security fixes.
</pre>
<br>Many of these have performance impacts. The impact is mostly on Storage access so loading times would
<br>normally be the only casualty of these changes. Still, it's possible that these protections might interfere
<br>with The Dark Mod in other ways.


Please review:


https://learn.microsoft.com/en-us/microsoft-365/security/defender-endpoint/exploit-protection-reference?view=o365-worldwide
==== (AMD\ATI) Disable Catalyst AI ====


and disable the security options you feel are excessive.
2018: The latest Radeon Crimson and Adrenalin Drivers:


==== Disable TDM Connectivity ====
Surface Format Optimization = OFF


If you decide to bypass / safelist TDM in security software, you can mitigate risks posed by TDM's network connection by setting:
[[FAQ#Disable_Catalyst_AI_in_recent_AMD_ATI_drivers|Disable Catalyst AI in recent AMD Drivers]]


<pre>
==== (AMD\ATI) Rename the executable ====


seta tdm_allow_http_access "0"
Most modern drivers have built-in profiles for the executable names of commercial games.


</pre>
Renaming TheDarkMod.exe to the name of a commercial OpenGL game may gain you some optimizations


in Darkmod.cfg to block connectivity.
or even a Crossfire profile (I believe DarkAthena.exe had one.)


This comes with the caveat that the in-game mission downloader won't work, you'll need to download missions from https://www.thedarkmod.com/missions
Known working renames:
<br>and copying them to your darkmod/fms folder


<font size="4">
DarkAthena.exe (thus far the most consistent improvement)


=== '''Disable Desktop Effects''' ===
Doom3BFG.exe
</font>


(If you are willing to sacrifice you desktop visual behavior and effects for better TDM performance. Note: This can be reverted.)
Wolf2MP.exe


To begin the process, type sysdm.cpl in Run box ({{key|Windows}} + {{key|R}}) and hit {{key|Enter}} to open the System Properties.  
Amnesia.exe


Select the Advanced tab and under Performance, {{LMB}} click on Settings.  
Brink.exe


In the Performance Options box, select the Visual Effects tab.
Prey.exe


Check "Adjust for Best Performance" then click Apply.
==== (Nvidia) Optimus Laptop wont use your Nvidia GPU ====


{{clear}}
See also: [https://nvidia.custhelp.com/app/answers/detail/a_id/2615/~/how-do-i-customize-optimus-profiles-and-settings%3F]
<br>
<font size="5">


=== '''Driver Considerations''' ===
Many Laptops now have the ability to use the GPU that is built into the CPU when not "gaming".
</font>
<br>Unfortunately, sometimes the drivers for these Laptops don't detect TDM as a "game".
----
''(IdTech4) The Dark Mod was originally based on OpenGL 2.0. (the same as Doom 3)''


''GPU manufacturers have largely ignored issues with this older specification so a number of workarounds have been''
The easiest solution is to create a Driver Profile for TheDarkMod.exe or TheDarkModx64.exe in your driver settings.


''compiled by the community to attend to erroneous behaviors or poor performance.''
* Right click {{RMB}} anywhere on your desktop where no icon is shown
* Left Click {{LMB}} Nvidia Control Panel
* Then Click on the Programs Tab
* Click "Add" and browse for TheDarkMod.exe or TheDarkModx64.exe
* Then scroll down the settings list and find "OpenGL Rendering GPU"
* Then select your Nvidia GPU from the list of options


''As of TDM 2.06 and newer The Dark Mod uses OpenGL 3.x so many of these suggestions are no longer applicable.''
[[Image:Nvidia_Profiles.jpg|600px]]
<br><br><br><br>


''That said, even OpenGL 3.2 (current requirement) is an old standard so some newer workarounds may be needed.''
{{clear}}


==== (Nvidia) Disable the Streamer Service ====


{{clear}}
Open your run dialog ({{key|Windows}} + {{key|R}}) or command prompt and type services.msc


==== Intel ( new 2.09 ) ====
On the Extended Tab locate "Nvidia Streamer Network Service"


Some Intel drivers do not perform well with persistent mapping enabled.
{{RMB}} Right-click it and choose "Stop"
<br>In 2.09 there is a special persistent mapping mode that works better for this hardware.
<br>You must disable standard persistent mapping to use this mode.


<pre>
Once the service is stopped, {{RMB}} right click it again and choose Properties


r_gpuBufferNonpersistentUpdateMode "1"
On the General Tab set Startup Type = Disabled then {{LMB}} click Apply.


r_usePersistentMapping 0
Do the same for "Nvidia Streamer Service"


</pre>
Do the same for "Nvidia Telemetry" service(s).


Note: There is a GUI option to disable streaming in the newest Geforce Experience settings page.


==== (AMD\ATI) Disable Catalyst AI ====
You would still be advised to disable the Telemetry service for extra performance.


2018: The latest Radeon Crimson and Adrenalin Drivers:


Surface Format Optimization = OFF


[[FAQ#Disable_Catalyst_AI_in_recent_AMD_ATI_drivers|Disable Catalyst AI in recent AMD Drivers]]
''You can also perform these steps for any services that you know can be manually started


==== (AMD\ATI) Rename the executable ====
''or are not needed for your daily usage. (Obviously) Do not disable any service that you don't


Most modern drivers have built-in profiles for the executable names of commercial games.
''recognize or know is safe to disable.''


Renaming TheDarkMod.exe to the name of a commercial OpenGL game may gain you some optimizations


or even a Crossfire profile (I believe DarkAthena.exe had one.)


Known working renames:
'''NEW INFO:'''


DarkAthena.exe (thus far the most consistent improvement)
The Nvidia Streamer Service is now tied to the "Geforce Experience" "In-Game Overlay" setting.<br>Disabling that feature in Geforce Experience should accomplish the same as the above.


Doom3BFG.exe
{{clear}}


Wolf2MP.exe


Amnesia.exe


Brink.exe


Prey.exe
{{clear}}


==== (Nvidia) Optimus Laptop wont use your Nvidia GPU ====
==== (Nvidia) Disable Threaded Optimizations ====


See also: [https://nvidia.custhelp.com/app/answers/detail/a_id/2615/~/how-do-i-customize-optimus-profiles-and-settings%3F]
Open Nvidia Control Panel ->


Many Laptops now have the ability to use the GPU that is built into the CPU when not "gaming".
Manage 3D Settings ->
<br>Unfortunately, sometimes the drivers for these Laptops don't detect TDM as a "game".


The easiest solution is to create a Driver Profile for TheDarkMod.exe or TheDarkModx64.exe in your driver settings.
Bottom half of list locate "Threaded Optimization" <-- Set to NO / Off


* Right click {{RMB}} anywhere on your desktop where no icon is shown
Also set "Multi-display/Mixed GPU acceleration" to "Single display performance mode"
* Left Click {{LMB}} Nvidia Control Panel
* Then Click on the Programs Tab
* Click "Add" and browse for TheDarkMod.exe or TheDarkModx64.exe
* Then scroll down the settings list and find "OpenGL Rendering GPU"  
* Then select your Nvidia GPU from the list of options


[[Image:Nvidia_Profiles.jpg|600px]]
This can also reduce or eliminate driver crashes or rendering anomalies.
<br><br><br><br>


{{clear}}
<font size="3">
* Note: '''<u>This might be obsolete information.</u>'''<br>With the latest Nvidia drivers, some users have reported that '''disabling''' Threaded Optimizations<br>has significantly '''<u>reduced performance</u>'''. (Down from 60 to 25FPS in one case.)</font><br><br><br>


==== (Nvidia) Disable the Streamer Service ====
==== Lower in-driver quality settings ====


Open your run dialog ({{key|Windows}} + {{key|R}}) or command prompt and type services.msc
AMD, Nvidia, and Intel all give users the option to lower texture quality and


On the Extended Tab locate "Nvidia Streamer Network Service"
also have various quality "optimization" levels for texture LOD Bias and Anisotropy (Filtering).


{{RMB}} Right-click it and choose "Stop"
==== Try different driver versions ====


Once the service is stopped, {{RMB}} right click it again and choose Properties
Sometimes updating to the latest driver version or reverting to an older version


On the General Tab set Startup Type = Disabled then {{LMB}} click Apply.
will improve performance. Try a few revisions or ask about known good driver versions.


Do the same for "Nvidia Streamer Service"
This applies to both GPU drivers and "Motherboard Chipset Drivers".


Do the same for "Nvidia Telemetry" service(s).
See also [[#Upgrade_your_BIOS|Upgrade your BIOS]]


Note: There is a GUI option to disable streaming in the newest Geforce Experience settings page.
{{clear}}


You would still be advised to disable the Telemetry service for extra performance.


=== Upgrade your BIOS ===


Sometimes bugs or unintended specification limits in the BIOS on an older motherboard will prevent it from
allowing the CPU or GPU to meet their potential.


''You can also perform these steps for any services that you know can be manually started
If your manufacturer has an updated motherboard BIOS available, consider applying it.


''or are not needed for your daily usage. (Obviously) Do not disable any service that you don't
=== Compile Darkmod for your own Hardware ===


''recognize or know is safe to disable.''
The Dark Mod already contains many hardware specific optimizations and can detect when your system has the needed hardware so that it can accelerate parts of the engine.
<br>Though unlikely, it is possible that MSVC++ or GCC compilers can improve the performance of the executable further when told what hardware you have.
<br>You can try compiling The Dark Mod yourself and add any compiler configurations that are specific to your hardware.<br><br>
[[The_Dark_Mod_-_Compilation_Guide|Darkmod Compiling Guide]]
<br><br>For Windows \ MSVC++ you may wish to add an AVX flag:
  https://learn.microsoft.com/en-us/cpp/build/reference/arch-x64?view=msvc-170
<br><br>For Linux you can add -DCMAKE_CXX_FLAGS=-march=native to your cmake string.
<br><br>Example:
  cmake -DCMAKE_BUILD_TYPE="Release" .. -DGAME_DIR=/home/user/darkmod -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 -DCMAKE_CXX_FLAGS=-march=native


{{clear}}


=== OBSOLETE Configure Video RAM ===


'''NEW INFO:'''
Change:  


The Nvidia Streamer Service is now tied to the "Geforce Experience" "In-Game Overlay" setting.<br>Disabling that feature in Geforce Experience should accomplish the same as the above.
<pre>


{{clear}}
seta com_videoRam "128"


</pre>


to the appropriate value (in MB) for your GPU in Darkmod.cfg


Eg. A 2GB video card would have 2048 there.


{{clear}}
<pre>


==== (Nvidia) Disable Threaded Optimizations ====
seta com_videoRam "2048"


Open Nvidia Control Panel ->
</pre>


Manage 3D Settings ->
{{clear}}


Bottom half of list locate "Threaded Optimization" <-- Set to NO / Off
=== Last resort: Upgrade your hardware ===


Also set "Multi-display/Mixed GPU acceleration" to "Single display performance mode"
<br>This whole wiki is meant to assist players with making TDM run as best as possible on their current hardware.
<br><br>That said, you may find that the needed compromises are too harsh or that some missions still do not perform
<br>well enough even with an optimized configuration. As such, it may be time to consider hardware upgrades.
<br><br>Before upgrading it may still be advised to open a support thread in the forums, especially if your hardware is above the minimum specifications


This can also reduce or eliminate driver crashes or rendering anomalies.
<br>Modern games need a lot of computing power, and while you don't need the absolutely newest hardware to play them,
<br>upgrading single components of your machine can help tremendously:


<font size="3">
* If you got '''less than 2 GByte''' main memory, consider upgrading your memory. This really helps to reduce swapping, which introduces quite noticeable slowdowns.
* Note: '''<u>This might be obsolete information.</u>'''<br>With the latest Nvidia drivers, some users have reported that '''disabling''' Threaded Optimizations<br>has significantly '''<u>reduced performance</u>'''. (Down from 60 to 25FPS in one case.)</font><br><br><br>
* If you got a graphic card from NVidia older than the Geforce 8x00 series, consider upgrading it.
* Upgrading the (spinning) hard disk to SSD / NVME "Solid State" storage should improved loading times, especially on 2.10 and newer.
* For comparison, see '''[[Known_System_Configurations|Known System Configurations]]''' to see the weakest hardware known to run current TDM versions.


==== Lower in-driver quality settings ====
<br>Upgrading your CPU is possible in most cases but can be quite complicated and the cost might be so high that upgrading your whole PC might be a better value.
{{clear}}
<br><br>


AMD, Nvidia, and Intel all give users the option to lower texture quality and
<font size="5">


also have various quality "optimization" levels for texture LOD Bias and Anisotropy (Filtering).
== '''Optimizing the OS performance'''==
</font>


==== Try different driver versions ====
Historically, TDM had significantly better performance on Windows because Doom 3 had no SIMD optimizations under Linux.
<br>As of 2.06 and newer Linux TDM has both SSE SIMD and AVX optimizations so it can run faster under Linux due to less OS overhead.
<br>Unfortunately, the default "capped FPS mode" has never worked well under Linux so out-of-box Linux still performs worse.
<br>'''Hence we advise switching to [[Performance_Tweaks#Uncap_FPS_(New_in_v2.06) | uncapped mode]] under Linux.'''
<br>If you have a weaker CPU and can install Linux ( dual boot, etc ) you may see 5 to 10% performance uplift when configured properly


Sometimes updating to the latest driver version or reverting to an older version


will improve performance. Try a few revisions or ask about known good driver versions.
=== All OS Variants: File Permissions ===


This applies to both GPU drivers and "Motherboard Chipset Drivers".  
Make sure your darkmod folder is located in a non-protected location.


See also [[#Upgrade_your_BIOS|Upgrade your BIOS]]
On Windows, "Program Files" is protected and will cause problems saving any settings or installing Fan Missions.


{{clear}}
On Linux, you should consider creating your darkmod directory under your /home/<username>/ folder to avoid permission issues.


<font size="5">
=== Linux UEFI Secure Boot ===


=== '''Priority and Affinity (Advanced)''' ===
With Secure Boot enabled in the BIOS, some Linux distros will fallback to (slow) open drivers and wont have access to most hardware features.
</font>
<br>If your Linux distro doesn't offer "Signed Kernels" and "Signed Drivers" disabling UEFI may be the only way to have acceptable performance
----
<br>We recommend that you consider using a Linux distro that offers Signed Kernels such as the latest Ubuntu, OpenSUSE, Debian, Linux Mint versions


<br>The following sub-section is a deep dive into forcing your Operating System to treat TDM as the '''most important application'''.
=== Stop running programs in the background ===
<br><br>A well behaved and maintained OS generally will not need to be configured like this so please consider these options
<br>to be an extreme last resort to ensure that no OS performance factors are slowing down TDM
<br><br>


<font size="4">
Programs running in the background might either eat up memory that is needed for <s>Doom 3</s> The Dark Mod, and thus cause swapping to the hard disk, or they might consume CPU time or other resources.
==== Windows Priority and Affinity ====
</font>


Note: As of The Dark Mod 2.08 Frontend Acceleration, defaults to 2 threads. When configuring affinity you should
This can cause either general slowdowns or ''hickups'' during game play.
<br>ensure that at least 2 cores ( preferably 3 ) are allocated to TDM. If you increase the jobs_numThreads value
<br>you should correspondingly increase the number of cores available in process affinity.


===== Set TheDarkMod to High Priority =====
{{clear}}


* Launch TheDarkMod
=== Ensure that Programs are the main priority in the OS ===


''(Note: Do not start a mission or test map yet. If the 3D render is initialized it will take a long time to exit fullscreen and return to it.)''
To begin the process, type sysdm.cpl in Run box ({{key|Windows}} + {{key|R}}) and hit {{key|Enter}} to open the System Properties.  


* {{key|Alt}} + {{key|Enter}} to exit fullscreen
Select the Advanced tab and under Performance, {{LMB}} click on Settings.  
* {{key|Ctrl}} + {{key|Alt}} + {{key|Del}} to open your Task Manager
* {{RMB}} Right-click on TheDarkMod.exe the choose "Go to Details"
* (On the details\processes pane) {{RMB}} Right-click on TheDarkMod.exe and mouse-over Set Priority and choose High
* {{key|Alt}} + {{key|Enter}} to return to fullscreen


You can also edit your Desktop shortcut to start in High priority:
In the Performance Options box, select the Advanced Tab again.


* {{RMB}} Right-click your Desktop shortcut to TheDarkMod and select Properties
You will see a section Processor Scheduling
* On the Shortcut Tab enter the following into the "Target:" field


<pre>
Choose "Programs" then {{LMB}} click Apply.


cmd.exe /c start "TheDarkMod" /High "C:\darkmod\TheDarkMod.exe"
{{clear}}


</pre>
<font size="3">
=== White-list TheDarkMod.exe in Security Software ===
</font>


(Assuming you installed into C:\darkmod)
Make sure that Windows Defender or Anti-Virus, Anti-Spyware, etc aren't constantly scanning or interacting


* Then {{LMB}} click the Change Icon button and browse for the Darkmod.ico icon in your darkmod install path
with TheDarkMod.exe. Add it to your security white-list.
* {{LMB}} Click Apply


===== Set TheDarkMod Affinity =====
==== Windows 10 Granular Security Options ====


If you have a limited number of cores or heavy background tasks are always consuming the
With new attacks like Meltdown and Spectre, Windows 10 has added CPU architecture specific security fixes.
default cores, you can set The Dark Mod to run on a specific core via "affinity"
<br>Many of these have performance impacts. The impact is mostly on Storage access so loading times would
<br>normally be the only casualty of these changes. Still, it's possible that these protections might interfere
<br>with The Dark Mod in other ways.


* Launch TheDarkMod
Please review:
* {{key|Alt}} + {{key|Enter}} to exit fullscreen


''(Note: Do not start a mission or test map yet. If the 3D render is initialized it will take a long time to exit fullscreen and return to it.)''
https://learn.microsoft.com/en-us/microsoft-365/security/defender-endpoint/exploit-protection-reference?view=o365-worldwide


* {{key|Ctrl}} + {{key|Alt}} + {{key|Del}} to open your Task Manager
and disable the security options you feel are excessive.
* Click the Performance Tab and look at the CPU display to see which cores are the least busy
* (On Windows 10, click the "Open Resource Monitor" link and then click the CPU tab and expand the right pane)
* Close the Resource Monitor and click the Processes Tab in Task Manager
* {{RMB}} Right-click on TheDarkMod.exe the choose "Go to Details"
* (On the details\processes pane) {{RMB}} Right-click on TheDarkMod.exe
* Mouse-over then click "Set Affinity" and uncheck cores you want to prevent TDM from using
* {{key|Alt}} + {{key|Enter}} to return to fullscreen


As with Priority you can set Affinity in your shortcut.
==== Disable TDM Connectivity ====


Example Target:
If you decide to bypass / safelist TDM in security software, you can mitigate risks posed by TDM's network connection by setting:


<pre>
<pre>


cmd.exe /c start "TheDarkMod" /affinity 1 "C:\darkmod\TheDarkMod.exe"
seta tdm_allow_http_access "0"


</pre>
</pre>


The affinity number is not matched to the number in your performance screen.
in Darkmod.cfg to block connectivity.
For example "Core 0" in Task Manager is affinity 1. The values are in Hex but
are converted from binary where 1 represents an active core and 0 is disabled
in a descending order.


For example: Binary 1110 means Core 3, 2, and 1 are enabled while Core 0 is disabled.
This comes with the caveat that the in-game mission downloader won't work, you'll need to download missions from https://www.thedarkmod.com/missions
Converting from Binary to Hex gives you /affinty E. This is a useful config if the majority
<br>and copying them to your darkmod/fms folder
of your processes are running on Core 0. FE for an 8 core chip would accomplish the same result.


Another useful option is 0101 /affinity 5 which will select core 0 and 2 which are "real"
<font size="4">
cores in a Hyperthreading environment.


* Core 0 is 1
=== '''Disable Desktop Effects''' ===
* Core 1 is 2
</font>
* Core 2 is 4
* Core 3 is 8
* Core 4 is 10
* Core 5 is 20
* Core 6 is 40
* Core 7 is 80
* Core 8 is 100
* Core 9 is 200
* Core 10 is 400
* Core 11 is 800


Again, the core number does not exclude hyperthread cores so if you have an 8 Core \ 16 thread CPU
(If you are willing to sacrifice you desktop visual behavior and effects for better TDM performance. Note: This can be reverted.)
you must count all real and hyperthread virtual cores when setting affinity.


===== Windows Combined Example =====
To begin the process, type sysdm.cpl in Run box ({{key|Windows}} + {{key|R}}) and hit {{key|Enter}} to open the System Properties.


You can include both priority and affinity switches in your shortcut
Select the Advanced tab and under Performance, {{LMB}} click on Settings.


<pre>
In the Performance Options box, select the Visual Effects tab.


C:\Windows\System32\cmd.exe /c start "TheDarkMod" /High /affinity 5 "C:\darkmod\TheDarkMod.exe" +set r_softShadowsRadius 2.5 +r_useEntityCulling 1
Check "Adjust for Best Performance" then click Apply.


</pre>
{{clear}}
<br>


Start TheDarkMod with high priority on Cores 0 and 2 (real cores) and add two '''launch cvars''' ( See [[#Conventions|Conventions]]).
<font size="5">


As you can see, you can make a huge launch string but once you go past 2 or 3 cvars it's best to
=== '''Priority and Affinity (Advanced)''' ===
</font>
----


use Darkmod.cfg unless you wish to make multiple launchers for testing (etc).
<br>The following sub-section is a deep dive into forcing your Operating System to treat TDM as the '''most important application'''.
<br><br>A well behaved and maintained OS generally will not need to be configured like this so please consider these options
<br>to be an extreme last resort to ensure that no OS performance factors are slowing down TDM
<br><br>


===== Process Management Note =====
<font size="4">
==== Windows Priority and Affinity ====
</font>


''You can also either "End Task" on processes that you know you don't need or set them to "below normal" or "low" priority.''
Note: As of The Dark Mod 2.08 Frontend Acceleration, defaults to 2 threads. When configuring affinity you should
<br>ensure that at least 2 cores ( preferably 3 ) are allocated to TDM. If you increase the jobs_numThreads value
<br>you should correspondingly increase the number of cores available in process affinity.


''Moving these low priority processes to a different core via affinity is also an option.''
===== Set TheDarkMod to High Priority =====


''Some processes, such as OneDrive.exe (which is integrated into the OS) will keep restarting so it's best to set these to "low priority"''
* Launch TheDarkMod


''If you are unsure what a process does, do not change it until you've researched the process.''
''(Note: Do not start a mission or test map yet. If the 3D render is initialized it will take a long time to exit fullscreen and return to it.)''


<font size="4">
* {{key|Alt}} + {{key|Enter}} to exit fullscreen
==== Linux Priority and Affinity ====
* {{key|Ctrl}} + {{key|Alt}} + {{key|Del}} to open your Task Manager
</font>
* {{RMB}} Right-click on TheDarkMod.exe the choose "Go to Details"
* (On the details\processes pane) {{RMB}} Right-click on TheDarkMod.exe and mouse-over Set Priority and choose High
* {{key|Alt}} + {{key|Enter}} to return to fullscreen


Note: Linux generally does a good job of ensuring that other applications or processes are not impacting
You can also edit your Desktop shortcut to start in High priority:
<br>game performance ( or really any foreground application performance ).
<br>Managing affinity and\or priority usually has little to no effect in Linux unless you knowingly have lots of other heavy applications running.


===== Linux Priority =====
* {{RMB}} Right-click your Desktop shortcut to TheDarkMod and select Properties
* On the Shortcut Tab enter the following into the "Target:" field


NOTE: Some modern Linux distros that use pipewire audio will not render audio if
<pre>
<br>the initial command that invokes the application is run as root or sudo. I am currently investigating a workaround.


You can launch TDM with a very high priority via the "nice" command:
cmd.exe /c start "TheDarkMod" /High "C:\darkmod\TheDarkMod.exe"


<pre>
sudo nice --18 su -c /home/user/darkmod/thedarkmod.x64 username
</pre>
</pre>


There are two dashes in the above command. The first dash just tells the command that we are passing a parameter,
(Assuming you installed into C:\darkmod)
<br>the second dash indicates a "negative priority number". Confusingly, the larger the negative number the higher
<br>the priority with a maximum value of -20. Conversely the higher the positive integer, the lower the program priority!
<br>For the sake of responsiveness, it is probably best to avoid the top or bottom if the priority range.
<br>Also, note that the command must run as sudo to use negative priority and it's best to use "su -c program username"
<br>so that it is run as "you" (replace username with your username) rather than root so you don't end up with root owned files.
<br>See the visudo change in [[Performance_Tweaks#Linux_Combined_Example|Linux Combined Example]] for details on how to run as sudo without a password
 
Example to launch with lower priority ( lowest possible value 19 ):


<pre>
* Then {{LMB}} click the Change Icon button and browse for the Darkmod.ico icon in your darkmod install path
nice -10 /home/user/darkmod/thedarkmod.x64
* {{LMB}} Click Apply
</pre>


You can also change the priority of TDM while it is running via "renice" and "pidof"
===== Set TheDarkMod Affinity =====


<pre>
If you have a limited number of cores or heavy background tasks are always consuming the
renice -n --18 -p $(pidof thedarkmod.x64)
default cores, you can set The Dark Mod to run on a specific core via "affinity"
</pre>


===== Linux Affinity =====
* Launch TheDarkMod
* {{key|Alt}} + {{key|Enter}} to exit fullscreen


Modern Linux operating systems will list cores with a list starting with 0, so ( for example ) the top core number in an 8 core CPU will be 7.
''(Note: Do not start a mission or test map yet. If the 3D render is initialized it will take a long time to exit fullscreen and return to it.)''


You can identify cores and whether the cores are hyperthread ( HT ) cores via:
* {{key|Ctrl}} + {{key|Alt}} + {{key|Del}} to open your Task Manager
* Click the Performance Tab and look at the CPU display to see which cores are the least busy
* (On Windows 10, click the "Open Resource Monitor" link and then click the CPU tab and expand the right pane)
* Close the Resource Monitor and click the Processes Tab in Task Manager
* {{RMB}} Right-click on TheDarkMod.exe the choose "Go to Details"
* (On the details\processes pane) {{RMB}} Right-click on TheDarkMod.exe
* Mouse-over then click "Set Affinity" and uncheck cores you want to prevent TDM from using
* {{key|Alt}} + {{key|Enter}} to return to fullscreen


lscpu -e
As with Priority you can set Affinity in your shortcut.


Example:
Example Target:


    CPU NODE SOCKET CORE L1d:L1i:L2:L3 ONLINE MAXMHZ    MINMHZ
<pre>
    0  0    0      0    0:0:0:0      yes    4100.0000 400.0000
    1  0    0      1    1:1:1:0      yes    4100.0000 400.0000
    2  0    0      2    2:2:2:0      yes    4100.0000 400.0000
    3  0    0      3    3:3:3:0      yes    4100.0000 400.0000
    4  0    0      0    0:0:0:0      yes    4100.0000 400.0000
    5  0    0      1    1:1:1:0      yes    4100.0000 400.0000
    6  0    0      2    2:2:2:0      yes    4100.0000 400.0000
    7  0    0      3    3:3:3:0      yes    4100.0000 400.0000


The CPU number above is what the OS recognizes when using affinity commands, the core number is actual core number.
cmd.exe /c start "TheDarkMod" /affinity 1 "C:\darkmod\TheDarkMod.exe"
So in the above results, CPU's 4 to 7 are hyperthreading cores whereas cores 0 to 3 are real cores.


To pin TDM to specific cores, you can change the launch options to:
<pre>
taskset -c 1,2,3 /path/to/thedarkmod.x64
</pre>
</pre>


The above example forces TDM to run on real cores 1, 2, and 3. You may use a dash to specify a range of cores (1-3) or even
The affinity number is not matched to the number in your performance screen.
mix both syntax forms ( 1-3,6 ).
For example "Core 0" in Task Manager is affinity 1. The values are in Hex but
are converted from binary where 1 represents an active core and 0 is disabled
in a descending order.


You can also change the core of a running TDM instance by using pidof to auto-locate the PID of the running process:
For example: Binary 1110 means Core 3, 2, and 1 are enabled while Core 0 is disabled.
Converting from Binary to Hex gives you /affinty E. This is a useful config if the majority
of your processes are running on Core 0. FE for an 8 core chip would accomplish the same result.


<pre>
Another useful option is 0101 /affinity 5 which will select core 0 and 2 which are "real"
taskset -cp 1,2,3 $(pidof thedarkmod.x64)
cores in a Hyperthreading environment.
</pre>


More advanced users may wish to "cpuset" to create a new logical group of cores and caches (etc) then assign TDM to run under
* Core 0 is 1
<br>the new CPU Set
* Core 1 is 2
* Core 2 is 4
* Core 3 is 8
* Core 4 is 10
* Core 5 is 20
* Core 6 is 40
* Core 7 is 80
* Core 8 is 100
* Core 9 is 200
* Core 10 is 400
* Core 11 is 800


And (of course) you can instead use taskset to move other non-critical processes to other cores or HT cores.
Again, the core number does not exclude hyperthread cores so if you have an 8 Core \ 16 thread CPU
you must count all real and hyperthread virtual cores when setting affinity.


===== Linux Combined Example =====
===== Windows Combined Example =====


NOTE: Some modern Linux distros that use pipewire audio will not render audio if
You can include both priority and affinity switches in your shortcut
the initial command that invokes the application is run as root or sudo. I am currently investigating a workaround.
 
In Linux nice and taskset cannot be invoked at the same time to launch an application.
<br>You can launch TDM and use taskset to change the running process and likewise use renice to change priority
<br>To launch with both priority and affinity at once, you can use "schedtool"
<br>You will first need to use visudo to allow schedtool to run in sudo without a password
<br>visudo will open an editor where you may add the following to the bottom of the file


<pre>
<pre>


%sudo ALL = ( ALL ) NOPASSWD: /usr/bin/schedtool,/usr/bin/nice
C:\Windows\System32\cmd.exe /c start "TheDarkMod" /High /affinity 5 "C:\darkmod\TheDarkMod.exe" +set r_softShadowsRadius 2.5 +r_useEntityCulling 1


</pre>
</pre>


Then simply edit the "command field" for the properties page of your Darkmod launcher icon as follows:
Start TheDarkMod with high priority on Cores 0 and 2 (real cores) and add two '''launch cvars''' ( See [[#Conventions|Conventions]]).
 
As you can see, you can make a huge launch string but once you go past 2 or 3 cvars it's best to


<pre>
use Darkmod.cfg unless you wish to make multiple launchers for testing (etc).


sudo schedtool -R -p 50 -a 1,2,3,5,6,7 -e nice --17 su -c "/home/user/darkmod/thedarkmod.x64 +set r_shadows 1 +r_ssao 0" username
===== Process Management Note =====


</pre>
''You can also either "End Task" on processes that you know you don't need or set them to "below normal" or "low" priority.''


In the above example, priority (-p ) is set to -50 ( highest is -99 aka realtime ) and affinity ( -a ) is set to use real cores 2 to 4 and corresponding HT cores ).
''Moving these low priority processes to a different core via affinity is also an option.''
<br>Setting any application to -99 ( realtime ) priority is unsafe because it may be hard to exit or may lockup the OS trying to request resources.
<br>schedtool has a "-n" flag for the nice value but it only supports positive nice values so we added the nice invoke after the "-e" ( execute flag ) and
<br>made sure to su ( switch user ) to run thedarkmod.x64 as "username" ( eg whatever your username is ).
<br>Finally, for good measure we have set shadows to stencil ( 1 ) and SSAO off ( 0 ) using standard Doom 3 style launch options for example syntax


{{clear}}
''Some processes, such as OneDrive.exe (which is integrated into the OS) will keep restarting so it's best to set these to "low priority"''


<font size="5">
''If you are unsure what a process does, do not change it until you've researched the process.''


== '''Optimizing Dark Mod settings''' ==
<font size="4">
==== Linux Priority and Affinity ====
</font>
</font>


''The settings changes below generally can be changed independently of one another.''
Note: Linux generally does a good job of ensuring that other applications or processes are not impacting
<br>game performance ( or really any foreground application performance ).
<br>Managing affinity and\or priority usually has little to no effect in Linux unless you knowingly have lots of other heavy applications running.


''This means that if your want better settings in one aspect (such as AA) you can''
===== Linux Priority =====


''try reducing quality or disabling another aspect (such as post-processing, image_downsize, v-sync, etc)''
NOTE: Some modern Linux distros that use pipewire audio will not render audio if
<br>the initial command that invokes the application is run as root or sudo. I am currently investigating a workaround.


You can launch TDM with a very high priority via the "nice" command:


----
<pre>
sudo nice --18 su -c /home/user/darkmod/thedarkmod.x64 username
</pre>


<font size="4">
There are two dashes in the above command. The first dash just tells the command that we are passing a parameter,
<br>the second dash indicates a "negative priority number". Confusingly, the larger the negative number the higher
<br>the priority with a maximum value of -20. Conversely the higher the positive integer, the lower the program priority!
<br>For the sake of responsiveness, it is probably best to avoid the top or bottom if the priority range.
<br>Also, note that the command must run as sudo to use negative priority and it's best to use "su -c program username"
<br>so that it is run as "you" (replace username with your username) rather than root so you don't end up with root owned files.
<br>See the visudo change in [[Performance_Tweaks#Linux_Combined_Example|Linux Combined Example]] for details on how to run as sudo without a password
 
Example to launch with lower priority ( lowest possible value 19 ):


=== '''Reduce your resolution!''' ===
<pre>
</font>
nice -10 /home/user/darkmod/thedarkmod.x64
</pre>


On older cards (or integrated graphics), <s>Doom 3's</s> TDM's render engine is very expensive for every per pixel drawn, and reducing the resolution will help the most.
You can also change the priority of TDM while it is running via "renice" and "pidof"
<br>For instance, at 1600x1200 the game needs to draw '''four times''' as many pixels as when running 800x600.
<br>The result with 800x600 will not look as bad as one might think &ndash; but the frame rate improvements might make it much more playable.
<br><br>


<font size="3">
<pre>
renice -n --18 -p $(pidof thedarkmod.x64)
</pre>


==== Screen Resolution ====
===== Linux Affinity =====
</font>


On modern LCD, OLED, or MicroLED displays we advise against changing native resolution unless you know that your monitor
Modern Linux operating systems will list cores with a list starting with 0, so ( for example ) the top core number in an 8 core CPU will be 7.
<br>has an excellent internal resolution scaler. You should instead change your [[Performance_Tweaks#Lower_your_Render_Scale_(New_2.07)|Render Scale]] as described in the next sub-section.
<br>This section is more applicable to players using CRT or Plasma displays which naturally support a wide range of resolutions.
<br>Even if you have a CRT or other legacy display tech, it may be better to change Render Scale to avoid legibility issues in Menus and HUD / GUI.
<br><br>'''Note: While this section is mostly applicable to legacy displays, if TDM doesn't properly detect the native resolution of your modern display'''
<br>'''you will still need configure it ( as shown below ) before adjusting Render Scale'''


<br>If you cannot set the resolution you want in the video settings menu then enter it in Darkmod.cfg.<br>
You can identify cores and whether the cores are hyperthread ( HT ) cores via:
<br>For the lowest possible resolutions, search down for these cvars first and replace them with the values shown:


<pre>
lscpu -e


seta r_mode "-1"
Example:
seta r_customHeight "640"
seta r_customWidth "480"


</pre>
    CPU NODE SOCKET CORE L1d:L1i:L2:L3 ONLINE MAXMHZ    MINMHZ
 
    0  0    0      0    0:0:0:0      yes    4100.0000 400.0000
alternate for wide screen monitors:
    1  0    0      1    1:1:1:0      yes    4100.0000 400.0000
 
    2  0    0      2    2:2:2:0      yes    4100.0000 400.0000
16:9 ratio
    3  0    0      3    3:3:3:0      yes    4100.0000 400.0000
    4  0    0      0    0:0:0:0      yes    4100.0000 400.0000
    5  0    0      1    1:1:1:0      yes    4100.0000 400.0000
    6  0    0      2    2:2:2:0      yes    4100.0000 400.0000
    7  0    0      3    3:3:3:0      yes    4100.0000 400.0000
 
The CPU number above is what the OS recognizes when using affinity commands, the core number is actual core number.
So in the above results, CPU's 4 to 7 are hyperthreading cores whereas cores 0 to 3 are real cores.
 
To pin TDM to specific cores, you can change the launch options to:


<pre>
<pre>
seta r_mode "-1"
taskset -c 1,2,3 /path/to/thedarkmod.x64
seta r_customwidth "1280"
seta r_customheight "720"
seta r_aspectratio "1"
</pre>
</pre>


<font size="3">
The above example forces TDM to run on real cores 1, 2, and 3. You may use a dash to specify a range of cores (1-3) or even
'''See also: "[[Resolutions]]" (for a list of known configurations)'''
mix both syntax forms ( 1-3,6 ).
</font>


You can also change the core of a running TDM instance by using pidof to auto-locate the PID of the running process:


<font size="3">
<pre>
taskset -cp 1,2,3 $(pidof thedarkmod.x64)
</pre>


==== Lower your Render Scale (New 2.07) ====
More advanced users may wish to "cpuset" to create a new logical group of cores and caches (etc) then assign TDM to run under
</font>
<br>the new CPU Set


The new "Render Scale" slider in 2.07 allows you to reduce the internal resolution that TDM will render to.  
And (of course) you can instead use taskset to move other non-critical processes to other cores or HT cores.
<br>Lowering this has a similar performance impact as lowering your resolution and is the '''preferred way to improve performance via resolution change'''
 
<br>One additional benefit is that lowering Render Scale does not impact Menu and HUD / GUI resolution
===== Linux Combined Example =====
 
NOTE: Some modern Linux distros that use pipewire audio will not render audio if
the initial command that invokes the application is run as root or sudo. I am currently investigating a workaround.
 
In Linux nice and taskset cannot be invoked at the same time to launch an application.  
<br>You can launch TDM and use taskset to change the running process and likewise use renice to change priority
<br>To launch with both priority and affinity at once, you can use "schedtool"
<br>You will first need to use visudo to allow schedtool to run in sudo without a password
<br>visudo will open an editor where you may add the following to the bottom of the file


<pre>
<pre>


seta r_fboResolution "0.85"
%sudo ALL = ( ALL ) NOPASSWD: /usr/bin/schedtool,/usr/bin/nice


</pre>
</pre>


Note: With the r_fboResolution CVAR, you can also do the '''opposite'''...
Then simply edit the "command field" for the properties page of your Darkmod launcher icon as follows:
<br>You can also render to a '''HIGHER THAN NATIVE''' resolution and the down-scaled output will look '''sorta like SSAA'''.
<br>This is '''VERY''' expensive so we recommend going no higher than '''r_fboResolution 1.5'''.
 
===== Image Sharpening (New 2.09) =====
 
In 2.09 a new "Contrast Adaptive Sharpening" shader has been added and is enabled by default.
<br>At the default Render Scale this simply improves the quality of textures.
<br>When paired with lower Render Scale values it can substantially reduce the blur and make the screen look almost like full resolution!


<pre>
<pre>


seta r_postprocess_sharpen "1"
sudo schedtool -R -p 50 -a 1,2,3,5,6,7 -e nice --17 su -c "/home/user/darkmod/thedarkmod.x64 +set r_shadows 1 +r_ssao 0" username
seta r_postprocess_sharpness "0.7"


</pre>
</pre>


In the above example, priority (-p ) is set to -50 ( highest is -99 aka realtime ) and affinity ( -a ) is set to use real cores 2 to 4 and corresponding HT cores ).
<br>Setting any application to -99 ( realtime ) priority is unsafe because it may be hard to exit or may lockup the OS trying to request resources.
<br>schedtool has a "-n" flag for the nice value but it only supports positive nice values so we added the nice invoke after the "-e" ( execute flag ) and
<br>made sure to su ( switch user ) to run thedarkmod.x64 as "username" ( eg whatever your username is ).
<br>Finally, for good measure we have set shadows to stencil ( 1 ) and SSAO off ( 0 ) using standard Doom 3 style launch options for example syntax
{{clear}}


<font size="3">
<font size="5">


==== Lower Anti-aliasing ====
== '''Optimizing Dark Mod settings''' ==
</font>
</font>


The Dark Mod ships with standard "Multi-Sample Anti-Aliasing" ( MSAA ). This can reduce or eliminate jagged pixelization on geometry edges
''The settings changes below generally can be changed independently of one another.''
<br>by sampling sub-pixels near those edges and blending based on the average color. In practice this means that every visible geometry edge will get rendered
<br>at a multiple of it's native resolution ( depending on your setting; eg. 2x, 4x, 8x, 16x ).
<br>While this is still lower than increasing your screen resolution by the same factor, it can still increase the render workload by 50% or more in dense scenes.
<br>If you needs the extra performance, you may need accept some aliasing ( jaggies ).
<br>Since AA approximates a higher resolution, you may prefer disabling it in favor of choosing a higher resolution ( eg 1080p with 8xAA verses 1440p with no AA )
<br>Incidentally, if you have GPU power to spare you can either use your GPU driver settings to force even higher quality modes such as SSAA that performs sub-sampling to every pixel
<br>or configure TDM [[Performance_Tweaks#Lower_your_Render_Scale_(New_2.07)|Render Scale]] ( r_fboResolution ) above native resolution for a similar effect (see previous sub-section ).


<br>In the standard video settings, set AA to a lower value or 0
''This means that if your want better settings in one aspect (such as AA) you can''


<pre>
''try reducing quality or disabling another aspect (such as post-processing, image_downsize, v-sync, etc)''


seta r_multiSamples "0"


</pre>
----
in Darkmod.cfg


<font size="4">


Note: Nvidia's in driver FXAA anti-aliasing setting is substantially faster than the multi-samples settings
=== '''Reduce your resolution!''' ===
in game.
</font>


Doom 3 is far less susceptible to AA artifacts so this may be an acceptable alternative especially
On older cards (or integrated graphics), <s>Doom 3's</s> TDM's render engine is very expensive for every per pixel drawn, and reducing the resolution will help the most.
if you are are running the game at native resolution (or nearly native).  
<br>For instance, at 1600x1200 the game needs to draw '''four times''' as many pixels as when running 800x600.
<br>The result with 800x600 will not look as bad as one might think &ndash; but the frame rate improvements might make it much more playable.
<br><br>


AMD has MLAA which may also work well in the same way.
<font size="3">


Depending on your graphics performance, it may be better to use a lower Render Scale and then use a higher AA value to retain clean edges.
==== Screen Resolution ====
<br>
</font>
{{clear}}
<br>


<font size="4">
On modern LCD, OLED, or MicroLED displays we advise against changing native resolution unless you know that your monitor
<br>has an excellent internal resolution scaler. You should instead change your [[Performance_Tweaks#Lower_your_Render_Scale_(New_2.07)|Render Scale]] as described in the next sub-section.
<br>This section is more applicable to players using CRT or Plasma displays which naturally support a wide range of resolutions.
<br>Even if you have a CRT or other legacy display tech, it may be better to change Render Scale to avoid legibility issues in Menus and HUD / GUI.
<br><br>'''Note: While this section is mostly applicable to legacy displays, if TDM doesn't properly detect the native resolution of your modern display'''
<br>'''you will still need configure it ( as shown below ) before adjusting Render Scale'''


=== '''Enable Multi-Core (new in v2.06)''' ===
<br>If you cannot set the resolution you want in the video settings menu then enter it in Darkmod.cfg.<br>
</font>
<br>For the lowest possible resolutions, search down for these cvars first and replace them with the values shown:
 
In 2.06 the engine splits the Frontend and Backend into separate threads if you
enable the Experimental "Multi-Core" setting in the Advanced Video settings GUI menu.


<pre>
<pre>


seta com_smp "1"
seta r_mode "-1"
seta r_customHeight "640"
seta r_customWidth "480"


</pre>
</pre>


in Darkmod.cfg
alternate for wide screen monitors:


'''In 2.09 this is enabled by default. The setting is no longer in the GUI.'''
16:9 ratio
 
==== Frontend Acceleration (new in v2.09+) ====
 
In 2.09 the engine frontend can submit models to the render backend via parallel jobs on multiple CPU cores.
<br>This is similar to how Doom 3 BFG handles this.
<br> Enable "Frontend Accelleration" in the Advanced Video settings GUI menu.


<pre>
<pre>
 
seta r_mode "-1"
seta r_useParallelAddModels "1"
seta r_customwidth "1280"
 
seta r_customheight "720"
seta r_aspectratio "1"  
</pre>
</pre>


'''In TDM 2.11 this is enabled by default.'''
<font size="3">
'''See also: "[[Resolutions]]" (for a list of known configurations)'''
</font>


Also, you can increase the number of assigned cores:


<pre>
<font size="3">


seta jobs_numThreads "3"
==== Lower your Render Scale (New 2.07) ====
</font>
 
The new "Render Scale" slider in 2.07 allows you to reduce the internal resolution that TDM will render to.
<br>Lowering this has a similar performance impact as lowering your resolution and is the '''preferred way to improve performance via resolution change'''
<br>One additional benefit is that lowering Render Scale does not impact Menu and HUD / GUI resolution
 
<pre>
 
seta r_fboResolution "0.85"


</pre>
</pre>


'''( See the [[Performance_Tweaks#Priority_and_Affinity|Affinity section]] above regarding cpu core management in relation to these options. )'''
Note: With the r_fboResolution CVAR, you can also do the '''opposite'''...
{{clear}}
<br>You can also render to a '''HIGHER THAN NATIVE''' resolution and the down-scaled output will look '''sorta like SSAA'''.
<br>
<br>This is '''VERY''' expensive so we recommend going no higher than '''r_fboResolution 1.5'''.


<font size="4">
===== Image Sharpening (New 2.09) =====


=== '''Uncap FPS (New in v2.06)'''===
In 2.09 a new "Contrast Adaptive Sharpening" shader has been added and is enabled by default.
</font>
<br>At the default Render Scale this simply improves the quality of textures.
Run one game tick per graphics frame, rather than fixed 60 ticks per second.
<br>When paired with lower Render Scale values it can substantially reduce the blur and make the screen look almost like full resolution!
 
In 2.06 this is now a GUI option "Uncap FPS" in the Advanced Video settings GUI menu.
<br><br>This not only makes the player camera move more smoothly but can also improve performance
<br>since some drivers do not work well with the capped FPS design.


<pre>
<pre>


seta com_fixedTic "1"
seta r_postprocess_sharpen "1"
seta r_postprocess_sharpness "0.7"


</pre>
</pre>


in Darkmod.cfg


Note: '''Uncapping FPS is crucial to a smooth performance in most Linux environments'''.
<font size="3">
<br>The default capped design appears to have some flaw for frame timing against the native Linux timer
 
<br>Uncapping FPS or running TDM capped under Wine will resolve this.
==== Lower Anti-aliasing ====
<br>Native Doom 3 builds are also impacted by this problem so it predates The Dark Mod.
</font>
<br>The Dark Mod cannot use com_preciseTic 0 as a workaround ( some users have used this to improve Linux Doom 3 frame timing )
<br>This mode has the additional benefit of making video playback properly sync to audio.
<br>The Dark Mod team has worked hard to ensure that the uncapped mode is bug free at high FPS values but if you wish to
<br>reduce the risk of high-FPS related bugs, set your Max FPS ( com_maxFPS, see below section ) to 75 or less.


{{clear}}
The Dark Mod ships with standard "Multi-Sample Anti-Aliasing" ( MSAA ). This can reduce or eliminate jagged pixelization on geometry edges
<br>
<br>by sampling sub-pixels near those edges and blending based on the average color. In practice this means that every visible geometry edge will get rendered
==== Max FPS (New in 2.08 ) ====
<br>at a multiple of it's native resolution ( depending on your setting; eg. 2x, 4x, 8x, 16x ).
<br>While this is still lower than increasing your screen resolution by the same factor, it can still increase the render workload by 50% or more in dense scenes.
<br>If you needs the extra performance, you may need accept some aliasing ( jaggies ).
<br>Since AA approximates a higher resolution, you may prefer disabling it in favor of choosing a higher resolution ( eg 1080p with 8xAA verses 1440p with no AA )
<br>Incidentally, if you have GPU power to spare you can either use your GPU driver settings to force even higher quality modes such as SSAA that performs sub-sampling to every pixel
<br>or configure TDM [[Performance_Tweaks#Lower_your_Render_Scale_(New_2.07)|Render Scale]] ( r_fboResolution ) above native resolution for a similar effect (see previous sub-section ).


In 2.08 you can define the max FPS via the Max FPS setting in the Advanced Video settings GUI menu.
<br>In the standard video settings, set AA to a lower value or 0


<pre>
<pre>


seta com_maxFPS "90"
seta r_multiSamples "0"  


</pre>
</pre>
in Darkmod.cfg
in Darkmod.cfg


<font size="4">


=== '''Shadow Settings''' ===
Note: Nvidia's in driver FXAA anti-aliasing setting is substantially faster than the multi-samples settings
in game.
 
Doom 3 is far less susceptible to AA artifacts so this may be an acceptable alternative especially
if you are are running the game at native resolution (or nearly native).
 
AMD has MLAA which may also work well in the same way.


</font>
Depending on your graphics performance, it may be better to use a lower Render Scale and then use a higher AA value to retain clean edges.
<br>
{{clear}}
<br>


<font size="3">
<font size="4">


==== '''Change Shadow Mode (New 2.07)''' ====
=== '''Enable Multi-Core (new in v2.06)''' ===
</font>
</font>


<br>In TDM 2.07 we offer two different "Shadow Implementation" options in the GUI.
In 2.06 the engine splits the Frontend and Backend into separate threads if you
enable the Experimental "Multi-Core" setting in the Advanced Video settings GUI menu.
 
<pre>


* Maps (Shadow Maps)
seta com_smp "1"


* Stencil (Stencil Shadow Volumes)
</pre>


<br>Shadow Maps can perform better in scenes with fewer but larger light sources and less small shadow casters.
in Darkmod.cfg
<br>Shadow Map performance depends on the amount and speed of VRAM on you GPU
<br>Most of the calculations are done on the GPU in this mode so if you have a weak CPU and mid-range GPU ( usually old desktops ) this mode is preferred
<br>Stationary Lights + Big areas + Big Lights = Higher FPS with Maps
<br><br>Stencil can perform faster for systems with powerful CPU's and weak GPU's ( usually laptops ) because it mostly relies on fillrate.
<br>Stencil soft shadows sometimes run faster because they don't do calculations for "distance to blocker" ( contact hardening )
<br>Lots of small moving lights + confined spaces = Higher FPS with Stencil


Maps mode:
'''In 2.09 this is enabled by default. The setting is no longer in the GUI.'''
<pre>


seta r_shadows "2"
==== Frontend Acceleration (new in v2.09+) ====


</pre>
In 2.09 the engine frontend can submit models to the render backend via parallel jobs on multiple CPU cores.
 
<br>This is similar to how Doom 3 BFG handles this.
Stencil mode:
<br> Enable "Frontend Accelleration" in the Advanced Video settings GUI menu.


<pre>
<pre>


seta r_shadows "1"
seta r_useParallelAddModels "1"


</pre>
</pre>


in Darkmod.cfg
'''In TDM 2.11 this is enabled by default.'''


<font size="3">
Also, you can increase the number of assigned cores:
==== '''Lower or Disable Soft Shadows (New in v2.06)''' ====
</font>
Shadow Quality determines how many gradients ( color bands) that soft shadows use.
<br>In the advanced videos settings menu set the Soft Shadows quality slider to low or off


<pre>
<pre>


seta r_softShadowsQuality = 0
seta jobs_numThreads "3"


</pre>
</pre>


in Darkmod.cfg
'''( See the [[Performance_Tweaks#Priority_and_Affinity|Affinity section]] above regarding cpu core management in relation to these options. )'''
{{clear}}
<br>
 
<font size="4">


=== '''Uncap FPS (New in v2.06)'''===
</font>
Run one game tick per graphics frame, rather than fixed 60 ticks per second.


In the advanced videos settings menu set the Shadow Softness slider to make shadows softer
In 2.06 this is now a GUI option "Uncap FPS" in the Advanced Video settings GUI menu.
without increasing the quality level
<br><br>This not only makes the player camera move more smoothly but can also improve performance
<br>since some drivers do not work well with the capped FPS design.


<pre>
<pre>


seta r_softShadowsRadius 2.0
seta com_fixedTic "1"


</pre>
</pre>
Line 979: Line 995:
in Darkmod.cfg
in Darkmod.cfg


You can experiment with values between 1.5 and 3.5 or more.
Note: '''Uncapping FPS is crucial to a smooth performance in most Linux environments'''.
<br>The default capped design appears to have some flaw for frame timing against the native Linux timer
<br>Uncapping FPS or running TDM capped under Wine will resolve this.
<br>Native Doom 3 builds are also impacted by this problem so it predates The Dark Mod.  
<br>The Dark Mod cannot use com_preciseTic 0 as a workaround ( some users have used this to improve Linux Doom 3 frame timing )
<br>This mode has the additional benefit of making video playback properly sync to audio.
<br>The Dark Mod team has worked hard to ensure that the uncapped mode is bug free at high FPS values but if you wish to
<br>reduce the risk of high-FPS related bugs, set your Max FPS ( com_maxFPS, see below section ) to 75 or less.


===== Single Pass Shadow Maps =====
{{clear}}
<br>
==== Max FPS (New in 2.08 ) ====


Rather than calculating all shadows one-at-a-time, all shadow casting is calculated in one pass for every light.
In 2.08 you can define the max FPS via the Max FPS setting in the Advanced Video settings GUI menu.
'''THIS CAN OFFER SUBSTANTIAL PERFORMANCE IMPROVEMENT'''


<pre>
<pre>


seta "r_shadowMapSinglePass "1"
seta com_maxFPS "90"


</pre>
</pre>
Line 994: Line 1,018:
in Darkmod.cfg
in Darkmod.cfg


2.10 Issues:
<font size="4">


* The old backend does not work with this mode ( r_useNewBackend 0 )
=== '''Shadow Settings''' ===
* For some users, screenshots will be missing shadows for func_static geometry if this is enabled
* The screen-shot issue is resolved in 2.11+
'''NEW - This is enabled by default in 2.12'''


===== Shadow Map Size =====
</font>


The larger the Shadow Map texture, the more detail and less artifacts you have further away from the light center or for small objects.
<font size="3">
<br>Conversely, smaller Shadow Map textures perform much better (use less resources).
<br>Since stretching a low resolution shadow texture over a large area naturally causes bi-linear blurring,
<br>some players prefer lower resolution maps instead of increasing the quality and softening radius which produces less blur
<br>due to realistic contact hardening simulation in the light shaders.


<pre>
==== '''Change Shadow Mode (New 2.07)''' ====
</font>


seta r_shadowMapSize "384"
<br>In TDM 2.07 we offer two different "Shadow Implementation" options in the GUI.


</pre>
* Maps (Shadow Maps)


You can also increase this to reduce light leaks from the r_shadowMapCullFront optimization.
* Stencil (Stencil Shadow Volumes)
<br>On balance enabling that optimization may offset the pitfalls of a bigger shadow map.
<br>You can experiment with shadow map sizes that are slightly larger than 1024 such as 1280 or 1440.
<br>This setting can also be used to reduce the impact of '''Volumetric Lights''' because they always use Shadow Maps regardless of Shadow Mode


===== Max Light Size =====
<br>Shadow Maps can perform better in scenes with fewer but larger light sources and less small shadow casters.
 
<br>Shadow Map performance depends on the amount and speed of VRAM on you GPU
The larger the light, the more Shadow Map resolution you need (see Shadow Map Size).
<br>Most of the calculations are done on the GPU in this mode so if you have a weak CPU and mid-range GPU ( usually old desktops ) this mode is preferred
<br>There are some lights so large that Shadows will never look good without insane texture sizes.
<br>Stationary Lights + Big areas + Big Lights = Higher FPS with Maps
You can set a threshold to say if lights are bigger than X, use Stencil Shadows.
<br><br>Stencil can perform faster for systems with powerful CPU's and weak GPU's ( usually laptops ) because it mostly relies on fillrate.
<br>Stencil soft shadows sometimes run faster because they don't do calculations for "distance to blocker" ( contact hardening )
<br>Lots of small moving lights + confined spaces = Higher FPS with Stencil


Maps mode:
<pre>
<pre>


seta r_maxShadowMapLight "1500"
seta r_shadows "2"


</pre>
</pre>


<font size="4">
Stencil mode:
=== '''Lower or Disable Ambient Occlusion (New in 2.08)''' ===
</font>
 
In the advanced video settings menu make sure that Ambient Occlusion is set to low or off.


<pre>
<pre>


seta r_ssao "1"
seta r_shadows "1"


</pre>
</pre>


or
in Darkmod.cfg
 
<font size="3">
==== '''Lower or Disable Soft Shadows (New in v2.06)''' ====
</font>
Shadow Quality determines how many gradients ( color bands) that soft shadows use.
<br>In the advanced videos settings menu set the Soft Shadows quality slider to low or off


<pre>
<pre>


seta r_ssao "0"
seta r_softShadowsQuality = 0


</pre>
</pre>
Line 1,054: Line 1,074:
in Darkmod.cfg
in Darkmod.cfg


==== SSAO Radius ====


You can widen the SSAO radius to improve the appearance or shrink it to improve performance
In the advanced videos settings menu set the Shadow Softness slider to make shadows softer
without increasing the quality level


<pre>
<pre>


seta r_ssao_radius "24"
seta r_softShadowsRadius 2.0


</pre>
</pre>


<font size="4">
in Darkmod.cfg
 
You can experiment with values between 1.5 and 3.5 or more.


=== '''Reduce Color Depth (New in 2.08)''' ===
===== Single Pass Shadow Maps =====
</font>


In TDM 2.08 the default Frame Buffer was upgraded to use 64-bit color to reduce color banding.  
Rather than calculating all shadows one-at-a-time, all shadow casting is calculated in one pass for every light.
<br>Some GPU's have poor support for this format or render much slower. Consider reverting to 32-bit.
'''THIS CAN OFFER SUBSTANTIAL PERFORMANCE IMPROVEMENT'''
<br>Change Color to 32-bit under the Advanced Video settings menu or:


<pre>
<pre>


seta r_fboColorBits "32"
seta "r_shadowMapSinglePass "1"


</pre>
</pre>
Line 1,081: Line 1,101:
in Darkmod.cfg
in Darkmod.cfg


2.10 Issues:


<font size="4">
* The old backend does not work with this mode ( r_useNewBackend 0 )
* For some users, screenshots will be missing shadows for func_static geometry if this is enabled
* The screen-shot issue is resolved in 2.11+
'''NEW - This is enabled by default in 2.12'''


=== '''Disable Bloom''' ===
===== Shadow Map Size =====
</font>


In the advanced video settings menu make sure Bloom is disabled
The larger the Shadow Map texture, the more detail and less artifacts you have further away from the light center or for small objects.
<br>Conversely, smaller Shadow Map textures perform much better (use less resources).
<br>Since stretching a low resolution shadow texture over a large area naturally causes bi-linear blurring,
<br>some players prefer lower resolution maps instead of increasing the quality and softening radius which produces less blur
<br>due to realistic contact hardening simulation in the light shaders.


<pre>
<pre>


seta r_bloom "0"
seta r_shadowMapSize "384"


</pre>
</pre>


in Darkmod.cfg
You can also increase this to reduce light leaks from the r_shadowMapCullFront optimization.
<br>On balance enabling that optimization may offset the pitfalls of a bigger shadow map.
<br>You can experiment with shadow map sizes that are slightly larger than 1024 such as 1280 or 1440.
<br>This setting can also be used to reduce the impact of '''Volumetric Lights''' because they always use Shadow Maps regardless of Shadow Mode


'''TDM versions older than 2.08'''
===== Max Light Size =====


Disable Postprocess in the GUI or set:
The larger the light, the more Shadow Map resolution you need (see Shadow Map Size).
<br>There are some lights so large that Shadows will never look good without insane texture sizes.
You can set a threshold to say if lights are bigger than X, use Stencil Shadows.


<pre>
<pre>


seta r_postprocess "0"
seta r_maxShadowMapLight "1500"


</pre>
</pre>
in Darkmod.cfg


<font size="4">
<font size="4">
=== '''Run The Dark Mod in fullscreen''' ===
=== '''Lower or Disable Ambient Occlusion (New in 2.08)''' ===
</font>
</font>


Running Darkmod in windowed mode might be quite a bit slower than fullscreen mode.
In the advanced video settings menu make sure that Ambient Occlusion is set to low or off.


One reason for this is that windowed mode is sometimes forced to V-sync. ( See [[#Disable V-sync | Disable V-sync]] )
<pre>


seta r_ssao "1"
</pre>
or


<pre>
<pre>
seta r_fullscreen "1"
 
seta r_ssao "0"
 
</pre>
</pre>


in Darkmod.cfg
in Darkmod.cfg


==== SSAO Radius ====


In 2.08 you can choose between Windowed, Fullscreen, and Borderless Windowed.
You can widen the SSAO radius to improve the appearance or shrink it to improve performance
Fullscreen is the lowest latency option.


==== Fullscreen Windowed in Modern Windows Versions ====
<pre>


It has become widely recognized that v-sync is a source of input delay and forcing it for both Windowed and Fullscreen Windowed modes
seta r_ssao_radius "24"
<br>is not optimal. The latest Windows versions no longer force v-sync on Fullscreen Windowed applications but if you encounter any issues
<br>or have an older Windows release you should be able to force it off via your driver application profile settings:


If you have a Nvidia card
</pre>


* Open de Windows start menu and type: Nvidia control panel
<font size="4">
* Click Manage 3D settings, on the left pan
* Under "I would like to use the following 3D settings" scroll down until you see "Vertical sync."
* Select Vertical sync choose "Force off" or " disable" ... from the drop down.


For AMD
=== '''Reduce Color Depth (New in 2.08)''' ===
</font>


* Click the Start button or Windows icon.
In TDM 2.08 the default Frame Buffer was upgraded to use 64-bit color to reduce color banding.  
* Type "Catalyst control center" in the search bar.
<br>Some GPU's have poor support for this format or render much slower. Consider reverting to 32-bit.
* Press Enter on your keyboard.
<br>Change Color to 32-bit under the Advanced Video settings menu or:
* Click Gaming.
 
* Under "3D Application Settings" scroll down to "Wait for vertical refresh."
<pre>
* Move the slider down to the side that says "Performance" so the text beneath it says Always Off.
 
seta r_fboColorBits "32"


The above won't be necessary for users with variable refresh displays and video cards with variable refresh support such as G-Sync or Freesync. 
</pre>


in Darkmod.cfg


{{clear}}


<font size="4">
<font size="4">


=== '''Disable V-sync''' ===
=== '''Disable Bloom''' ===
</font>
</font>


<br>In the standard video settings, disable vsync
In the advanced video settings menu make sure Bloom is disabled


<pre>
<pre>
seta r_swapInterval "0"  
 
seta r_bloom "0"
 
</pre>
</pre>


in Darkmod.cfg<br><br><br>
in Darkmod.cfg
 
'''TDM versions older than 2.08'''


<font size="3">'''NEW INFO!!!!'''
Disable Postprocess in the GUI or set:


Setting '''r_swapInterval "-1"''' enables "Adaptive Vsync" which only performs the sync action when you are at or above refresh rate.
<pre>
<br>This has much less performance impact.<br><br>
'''NEWER''' TDM 2.10 has an Adaptive Vsync option in the Video Settings GUI
</font><br><br><br>
The Dark Mod has extremely variable FPS compared to modern titles due to it's substantial
CPU heavy renderer.


We strongly recommend disabling V-Sync altogether or forcing variable V-sync tech such as
seta r_postprocess "0"
G-Sync, Freesync, Fast-Sync or Enhanced Sync (new) in your driver settings.<br><br>


==== Force Refresh Timing ====
</pre>


(Related to vsync)
in Darkmod.cfg


Some newer video cards may not properly report the refresh rate to this engine (typically digital output like DVI, HDMI, or DisplayPort)
<font size="4">
This can cause lag, stutter, and uneven frame pacing.
=== '''Run The Dark Mod in fullscreen''' ===
</font>


create an autoexec.cfg in your darkmod directory and set:
Running Darkmod in windowed mode might be quite a bit slower than fullscreen mode.


<pre>
One reason for this is that windowed mode is sometimes forced to V-sync. ( See [[#Disable V-sync | Disable V-sync]] )


seta r_displayRefresh "60"


<pre>
seta r_fullscreen "1"
</pre>
</pre>


(Obviously increase to match your available mode.)
in Darkmod.cfg


<font size="4">
=== '''Set Object Detail to Low''' ===
</font>


In the advanced video settings menu lower the Object detail slider below normal
In 2.08 you can choose between Windowed, Fullscreen, and Borderless Windowed.
Fullscreen is the lowest latency option.


<pre>
==== Fullscreen Windowed in Modern Windows Versions ====
seta tdm_lod_bias "0.5"
</pre>


in Darkmod.cfg (see also [[Object_detail]] )
It has become widely recognized that v-sync is a source of input delay and forcing it for both Windowed and Fullscreen Windowed modes
<br>is not optimal. The latest Windows versions no longer force v-sync on Fullscreen Windowed applications but if you encounter any issues
<br>or have an older Windows release you should be able to force it off via your driver application profile settings:


If you have a Nvidia card


<font size="4">
* Open de Windows start menu and type: Nvidia control panel
* Click Manage 3D settings, on the left pan
* Under "I would like to use the following 3D settings" scroll down until you see "Vertical sync."
* Select Vertical sync choose "Force off" or " disable" ... from the drop down.


==='''Field of View Decrease'''===
For AMD


</font>
* Click the Start button or Windows icon.
* Type "Catalyst control center" in the search bar.
* Press Enter on your keyboard.
* Click Gaming.
* Under "3D Application Settings" scroll down to "Wait for vertical refresh."
* Move the slider down to the side that says "Performance" so the text beneath it says Always Off.


'''Note''' that this setting might occasionally produce odd effects such as a grabbed object seems to move a little on release.
The above won't be necessary for users with variable refresh displays and video cards with variable refresh support such as G-Sync or Freesync.


You can get a performance improvement if you decrease the field of view. By default this is 90 degrees but you might try entering in the console:


g_fov 85
{{clear}}
 
<font size="4">
 
=== '''Disable V-sync''' ===
</font>


or
<br>In the standard video settings, disable vsync


<pre>
<pre>
seta g_fov "85"
seta r_swapInterval "0"  
</pre>
</pre>


in Darkmod.cfg
in Darkmod.cfg<br><br><br>


In addition, if you are playing a mission that is too good to miss and reach a very low performance area which is almost unplayable on your machine,
<font size="3">'''NEW INFO!!!!'''
<br>you might consider setting the field of view extremely low temporarily to get you through then restore to 90 later...


g_fov 50
Setting '''r_swapInterval "-1"''' enables "Adaptive Vsync" which only performs the sync action when you are at or above refresh rate.
<br>This has much less performance impact.<br><br>
'''NEWER''' TDM 2.10 has an Adaptive Vsync option in the Video Settings GUI
</font><br><br><br>
The Dark Mod has extremely variable FPS compared to modern titles due to it's substantial
CPU heavy renderer.


or bind a toggle
We strongly recommend disabling V-Sync altogether or forcing variable V-sync tech such as
G-Sync, Freesync, Fast-Sync or Enhanced Sync (new) in your driver settings.<br><br>


<pre>
==== Force Refresh Timing ====
bind "z" "toggle g_fov 50 90";
</pre>


in Darkmod.cfg so you can tap a key to go between FOV ranges.
(Related to vsync)
 
Some newer video cards may not properly report the refresh rate to this engine (typically digital output like DVI, HDMI, or DisplayPort)
This can cause lag, stutter, and uneven frame pacing.
 
create an autoexec.cfg in your darkmod directory and set:
 
<pre>
 
seta r_displayRefresh "60"


See [[#Toggle_settings_in_realtime|Toggle Settings in Realtime]]
</pre>


Note from Fidcal: I have played comfortably on g_fov 75 and even think perhaps it makes nearby objects more realistically close so you can get right up to a table, etc.
(Obviously increase to match your available mode.)
<br>Not noticed any problem with restricted view.


<font size="4">
<font size="4">
=== '''Lower Anisotropic Filtering''' ===
=== '''Set Object Detail to Low''' ===
</font>
</font>


In the standard video settings, lower or disable AF
In the advanced video settings menu lower the Object detail slider below normal


<pre>
<pre>
seta tdm_lod_bias "0.5"
</pre>


seta image_anisotropy "0"
in Darkmod.cfg (see also [[Object_detail]] )


</pre>


in Darkmod.cfg<br>
<font size="4">


Note: This has '''very little''' performance benefit for most GPU hardware.
==='''Field of View Decrease'''===


<br>This is also one of the few graphic settings that can be adjusted without requiring a vid_restart or restarting the engine.
</font>


'''NEW''': In 2.09 if you change Anisotropic Filtering and have "r_useBindlessTextures 1" set (default) the game may stutter
'''Note''' that this setting might occasionally produce odd effects such as a grabbed object seems to move a little on release.
<br>when you return from the menu because it must rebuild all the textures.
<br>To avoid this, set "r_useBindlessTextures 0" then restart the game and test your preferred AF mode then once you have found your
<br>performace-to-image quality sweet spot set "r_useBindlessTextures 1" and restart TDM


'''NEW 2''': In 2.11, bindless texture support was removed due to multiple issues with AMD drivers.
You can get a performance improvement if you decrease the field of view. By default this is 90 degrees but you might try entering in the console:
<br>You should be able to change anisotropic filtering settings in the GUI without encountering stutters.


g_fov 85


=== Set the ambient shading to "Faster" '''( OBSOLETE in 2.09+)''' ===
or


Inside the settings, change the ambient rendering method to "Faster".
<s>
<pre>
<pre>
seta tdm_ambient_method "1"
seta g_fov "85"
</pre>
</pre>
</s>
 
in Darkmod.cfg
in Darkmod.cfg


(Note: Some preliminary tests in v2.05 show that the Enhanced Ambient is now faster than the "fast" texture based Ambient.)
In addition, if you are playing a mission that is too good to miss and reach a very low performance area which is almost unplayable on your machine,
(Note: This setting has been removed in 2.09 )
<br>you might consider setting the field of view extremely low temporarily to get you through then restore to 90 later...


=== Set the interaction.vfp to "Standard" '''(OBSOLETE in 2.09+)''' ===
g_fov 50


In the video settings menu, change the interaction shader to Standard.  Lighting will not look as good, but you may gain a few frames per second.
or bind a toggle


<s>
<pre>
<pre>
bind "z" "toggle g_fov 50 90";
</pre>


seta tdm_interaction_vfp_type "0"
in Darkmod.cfg so you can tap a key to go between FOV ranges.


</pre>
See [[#Toggle_settings_in_realtime|Toggle Settings in Realtime]]
</s>
 
Note from Fidcal: I have played comfortably on g_fov 75 and even think perhaps it makes nearby objects more realistically close so you can get right up to a table, etc.
<br>Not noticed any problem with restricted view.


in Darkmod.cfg
<font size="4">
=== '''Lower Anisotropic Filtering''' ===
</font>


'''In 2.08 this setting is'''
In the standard video settings, lower or disable AF


<pre>
<pre>


seta r_interactionProgram "0"
seta image_anisotropy "0"  


</pre>
</pre>


This setting doesn't work in 2.09+ It is a stub cvar that does nothing.
in Darkmod.cfg<br>
<br>If you wish to test interaction shaders, create a glprogs folder in your mission folder with new shaders having the same name as the default ones.
<br>You can keep the default shaders in the same folder in renamed form then swap filenames and execute reloadGLSLprograms to compare changes.
<br>For a more clean comparison also set g_stopTime to prevent dynamic light changes
{{clear}}


<font size="5">
Note: This has '''very little''' performance benefit for most GPU hardware.


== '''Slow loading times''' ==
<br>This is also one of the few graphic settings that can be adjusted without requiring a vid_restart or restarting the engine.
</font>


'''OBSOLETE! TDM 2.10 has very fast loading times!'''  
'''NEW''': In 2.09 if you change Anisotropic Filtering and have "r_useBindlessTextures 1" set (default) the game may stutter
<br>The only setting that might improve loading times is "seta image_preload 0"
<br>when you return from the menu because it must rebuild all the textures.
<br>To avoid this, set "r_useBindlessTextures 0" then restart the game and test your preferred AF mode then once you have found your
<br>performace-to-image quality sweet spot set "r_useBindlessTextures 1" and restart TDM


<s>
'''NEW 2''': In 2.11, bindless texture support was removed due to multiple issues with AMD drivers.
<br>You should be able to change anisotropic filtering settings in the GUI without encountering stutters.


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 [[FAQ#HDR-Lite_Post-Processing_problems|HDR-Lite Post-Processing Problems]].


Changing the following settings to 0 will also reduce loading time, but be warned:
=== Set the ambient shading to "Faster" '''( OBSOLETE in 2.09+)''' ===
if you have a lower-end system, poor graphics card, or low ram, you will likely notice a performance hit in-game since you will now be using uncompressed textures.


<pre style="max-width:35em">
Inside the settings, change the ambient rendering method to "Faster".
seta image_useNormalCompression "0"
<s>
seta image_useCompression "0"
<pre>
seta image_preload "0"
seta tdm_ambient_method "1"
</pre>
</pre>
</s>
</s>
New 2.10+ cvars ( defaults ) for fast loading times:
in Darkmod.cfg


<pre style="max-width:35em">
(Note: Some preliminary tests in v2.05 show that the Enhanced Ambient is now faster than the "fast" texture based Ambient.)
seta image_levelLoadParallel "1"
(Note: This setting has been removed in 2.09 )
seta image_useTexStorage "1"
seta image_mipmapMode "0"
</pre>


In 2.10 the RXGB normal map compression format has been replaced the higher quality RGTC format.
=== Set the interaction.vfp to "Standard" '''(OBSOLETE in 2.09+)''' ===


Note: Disabling compression may lead to Malloc errors due to memory consumption.  
In the video settings menu, change the interaction shader to Standard.  Lighting will not look as good, but you may gain a few frames per second.


You may be able to compensate by setting image_downsize options or use image_downsize instead of disabling compression. [[#Image downsizing|Image Downsizing]]
<s>
<pre>


See [[FAQ#Getting "Malloc Failure for #######" crash-to-desktop|Malloc Failure Errors]]
seta tdm_interaction_vfp_type "0"


</pre>
</s>


<font size="5">
in Darkmod.cfg


== The game is '''very''' slow! ==
'''In 2.08 this setting is'''  
</font>


Note: The advised performance defaults below should mostly already be set by default on upgrade.
<pre>
<br>Please consider [[Performance_Tweaks#Delete_Darkmod.cfg_after_upgrade|deleting darkmod.cfg]] after upgrading to restore these defaults.
<br><br>
If you get less than 10 FPS, or the game even stutters, please try this:


Look into your '''Darkmod.cfg''' inside your darkmod folder and check that the following settings are like shown below:
seta r_interactionProgram "0"


<pre style="max-width:35em">
</pre>
seta image_usePrecompressedTextures "1"
seta image_useNormalCompression "1"
seta image_useAllFormats "1"
seta image_useCompression "1"
seta image_preload "1"
seta r_useCachedDynamicModels "1"
seta r_useShadowVertexProgram "1"
seta r_useEntityCulling "1"
</pre>


Note: r_useShadowVertexProgram no longer exists in TDM. All shadow modes use GPU vertex operations.<br><br>
This setting doesn't work in 2.09+ It is a stub cvar that does nothing.  
<br>If you wish to test interaction shaders, create a glprogs folder in your mission folder with new shaders having the same name as the default ones.
<br>You can keep the default shaders in the same folder in renamed form then swap filenames and execute reloadGLSLprograms to compare changes.
<br>For a more clean comparison also set g_stopTime to prevent dynamic light changes
{{clear}}


'''OBSOLETE''' 2.09 performance defaults
<font size="5">
<pre style="max-width:35em">
seta r_useMultiDrawIndirect "1"
seta r_useBindlessTextures "1"
</pre>


2.11 new performance defaults ( in addition to the standard performance defaults above )
== '''Slow loading times''' ==
</font>


<pre style="max-width:35em">
'''OBSOLETE! TDM 2.10 has very fast loading times!'''
seta r_useNewBackend "1"
<br>The only setting that might improve loading times is "seta image_preload 0"
seta r_modelBvhBuild "1"
seta com_smp "1"
seta r_useParallelAddModels "1"
seta r_usePersistentMapping "1"
seta com_useMinorTics "1"
seta com_fixedTic "1"
seta com_maxFPS "166"
</pre>


2.12 new performance defaults ( in addition to the standard performance defaults above )
<s>
 
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 [[FAQ#HDR-Lite_Post-Processing_problems|HDR-Lite Post-Processing Problems]].
 
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 in-game since you will now be using uncompressed textures.


<pre style="max-width:35em">
<pre style="max-width:35em">
  seta r_useLightPortalFlow "2"
  seta image_useNormalCompression "0"
  seta r_useLightPortalFlowCulling "1"
  seta image_useCompression "0"
  seta r_softShadowsMipmaps "1"
  seta image_preload "0"
seta r_useEntityScissors "1"
seta r_animationBounds "1"
seta r_useNewRenderPasses "1"
seta r_shadowMapSinglePass "1"
</pre>
</pre>
</s>
New 2.10+ cvars ( defaults ) for fast loading times:


<pre style="max-width:35em">
seta image_levelLoadParallel "1"
seta image_useTexStorage "1"
seta image_mipmapMode "0"
</pre>


Note: 2.12 r_useNewRenderPasses replaces r_useNewBackend
In 2.10 the RXGB normal map compression format has been replaced the higher quality RGTC format.
<br>In 2.10 and newer you can control both the standard resolution and the "renderscale" whereas
<br>2.09 required you to change renderscale for lower the resolution. It is still preferable to lower renderscale unless you have a CRT monitor


<font size="4">
Note: Disabling compression may lead to Malloc errors due to memory consumption.


=== '''Frame Memory''' ===
You may be able to compensate by setting image_downsize options or use image_downsize instead of disabling compression. [[#Image downsizing|Image Downsizing]]
</font>


'''New in TDM 2.08'''
See [[FAQ#Getting "Malloc Failure for #######" crash-to-desktop|Malloc Failure Errors]]


<pre>
r_frameIndexMemory
</pre>


and
<font size="5">


<pre>
== The game is '''very''' slow! ==
r_frameVertexMemory
</font>
</pre>


Increasing frame memory may help avoid crashing or slow-down when a scene suddenly requires more resources.
Note: The advised performance defaults below should mostly already be set by default on upgrade.
<br>If you are VRAM limited, consider lowering texture quality ( [[#Image_downsizing|image_downsize]] ) or [[#Lower_your_Render_Scale_.28New_2.07.29|resolution scale]]
<br>Please consider [[Performance_Tweaks#Delete_Darkmod.cfg_after_upgrade|deleting darkmod.cfg]] after upgrading to restore these defaults.
before increasing these.
<br><br>
If you get less than 10 FPS, or the game even stutters, please try this:


<font size="4">
Look into your '''Darkmod.cfg''' inside your darkmod folder and check that the following settings are like shown below:


==='''Lightgem Calculation Optimizations'''===
<pre style="max-width:35em">
</font>
seta image_usePrecompressedTextures "1"
 
seta image_useNormalCompression "1"
<br>The Lightgem used to be a very taxing calculation because it required the entire scene to be rendered to an off-screen
seta image_useAllFormats "1"
<br>image that was then slowly passed to parser code to comb all pixels for the brightest value.
seta image_useCompression "1"
<br><br>As of '''TDM 2.05''' and newer, only shadow casting geometry is rendered during the Lightgem calculation and the
seta image_preload "1"
<br>pixels are read directly from an "OpenGL Buffer Object" at high speed.
seta r_useCachedDynamicModels "1"
<br><br>Further optimizations after 2.05 include:
seta r_useShadowVertexProgram "1"
* Moving the calculation to it's own Thread and utilizing SMP
seta r_useEntityCulling "1"
* Making the calculation part of the native Doom 3 sub-view system
</pre>
* Excluding Lightgem calculations from many phases of the render system that are not applicable
* Inheriting optimizations from the overall renderer ( Improving TDM render speeds, improves the Lightgem render speed )


<br>This means that the old configurations to reduce the impact of Lightgem calculation are mostly irrelevant
Note: r_useShadowVertexProgram no longer exists in TDM. All shadow modes use GPU vertex operations.<br><br>
<br>except for niche scenarios (such as 120FPS+ gaming), very old hardware ( Single Core CPU's ), or very old TDM versions ( older than 2.07).
<br><br>


<font size="3">
'''OBSOLETE''' 2.09 performance defaults
====Lightgem interleaved calculation====
</font>
<pre style="max-width:35em">
seta r_useMultiDrawIndirect "1"
seta r_useBindlessTextures "1"
</pre>


By default lightgem calculation occurs every frame. You can set lightgem calculation to happen only once
2.11 new performance defaults ( in addition to the standard performance defaults above )
<br> per several frames by setting tdm_lg_interleave console parameter to values higher than 1.
<br> For example, typing:


  tdm_lg_interleave 3
<pre style="max-width:35em">
  seta r_useNewBackend "1"
seta r_modelBvhBuild "1"
seta com_smp "1"
seta r_useParallelAddModels "1"
seta r_usePersistentMapping "1"
seta com_useMinorTics "1"
seta com_fixedTic "1"
seta com_maxFPS "166"
</pre>


in console tells TDM to recalculate lightgem value every third frame.
2.12 new performance defaults ( in addition to the standard performance defaults above )


This tweak can increase average FPS, but it often produces noticeable stuttering, especially on slow machines
<pre style="max-width:35em">
when your FPS is below 25 to 30FPS.
seta r_useLightPortalFlow "2"
seta r_useLightPortalFlowCulling "1"
seta r_softShadowsMipmaps "1"
seta r_useEntityScissors "1"
seta r_animationBounds "1"
seta r_useNewRenderPasses "1"
seta r_shadowMapSinglePass "1"
</pre>


<br>


{{clear}}
Note: 2.12 r_useNewRenderPasses replaces r_useNewBackend
<br>In 2.10 and newer you can control both the standard resolution and the "renderscale" whereas
<br>2.09 required you to change renderscale for lower the resolution. It is still preferable to lower renderscale unless you have a CRT monitor
 
<font size="4">


=====Lightgem interleave minimum FPS ( New in 2.05)=====
=== '''Frame Memory''' ===
</font>


In TDM 2.05 there is a new tdm_lg_interleave_min cvar that allows you to set a cutoff point
'''New in TDM 2.08'''
for FPS below which the Lightgem Interleave optimization takes effect.
<br>It is set to 40 by default. If your FPS goes below 40 then tdm_lg_interleave returns to the default value of 1 internally to prevent stutter.
<br>Depending on your sensitivity you may wish to increase this to 50 or more.


<pre>
<pre>
r_frameIndexMemory
</pre>


tdm_lg_interleave_min 40
and


<pre>
r_frameVertexMemory
</pre>
</pre>


<br> As the cost of lightgem calculation is (also) substantially lower in v2.05 and newer, you may be able to set this to 1 for most missions.
Increasing frame memory may help avoid crashing or slow-down when a scene suddenly requires more resources.
<br>
<br>If you are VRAM limited, consider lowering texture quality ( [[#Image_downsizing|image_downsize]] ) or [[#Lower_your_Render_Scale_.28New_2.07.29|resolution scale]]
<br> In testing, the only mission I found that suffered from "tdm_lg_interleave ( > 1) stuttering" was "Penny Dreadful 3: Erasing the Trail".
before increasing these.
<br> For that mission, I set tdm_lg_interleave_min to 50 to cure the stutter.
<br> This setting can also be used to boost already high FPS values for the new unbounded FPS options ( [[Performance_Tweaks#Disable_FPS_Lock | com_FixeTic 1]] ).
<br> (eg. If you have 90FPS set tdm_lg_interleave to 7 and tdm_lg_interleave_min to 75 to attempt a push towards 120FPS)


In 2.06 with the lightgem calculated on a different thread, this can likely stay at 1 regardless of how low the FPS gets.
<font size="4">


<font size="3">
==='''Lightgem Calculation Optimizations'''===
 
==== Weak Lightgem (Not Recommended)====
</font>
</font>


Setting:  
<br>The Lightgem used to be a very taxing calculation because it required the entire scene to be rendered to an off-screen
<br>image that was then slowly passed to parser code to comb all pixels for the brightest value.
<br><br>As of '''TDM 2.05''' and newer, only shadow casting geometry is rendered during the Lightgem calculation and the
<br>pixels are read directly from an "OpenGL Buffer Object" at high speed.
<br><br>Further optimizations after 2.05 include:
* Moving the calculation to it's own Thread and utilizing SMP
* Making the calculation part of the native Doom 3 sub-view system
* Excluding Lightgem calculations from many phases of the render system that are not applicable
* Inheriting optimizations from the overall renderer ( Improving TDM render speeds, improves the Lightgem render speed )


<pre>
<br>This means that the old configurations to reduce the impact of Lightgem calculation are mostly irrelevant
<br>except for niche scenarios (such as 120FPS+ gaming), very old hardware ( Single Core CPU's ), or very old TDM versions ( older than 2.07).
<br><br>


seta tdm_lg_weak "1"  
<font size="3">
====Lightgem interleaved calculation====
</font>


</pre>
By default lightgem calculation occurs every frame. You can set lightgem calculation to happen only once
<br> per several frames by setting tdm_lg_interleave console parameter to values higher than 1.
<br> For example, typing:


in Darkmod.cfg will disable the renderer based lightgem and use a simpler math-based solution.
tdm_lg_interleave 3
<br>It's a far less accurate lightgem but may allow weaker systems to play the game as a '''last resort'''.<br><br>


----
in console tells TDM to recalculate lightgem value every third frame.


<font size="5">
This tweak can increase average FPS, but it often produces noticeable stuttering, especially on slow machines
when your FPS is below 25 to 30FPS.


=== '''Disabling standard graphics features''' ===
<br>
</font>


At the cost of some pretty severe scene quality, you can disable a number of independent graphic features
{{clear}}


that are non-essential to play.
=====Lightgem interleave minimum FPS ( New in 2.05)=====


<font size="4">
In TDM 2.05 there is a new tdm_lg_interleave_min cvar that allows you to set a cutoff point
==== Texture Based Tweaks ====
for FPS below which the Lightgem Interleave optimization takes effect.
</font>
<br>It is set to 40 by default. If your FPS goes below 40 then tdm_lg_interleave returns to the default value of 1 internally to prevent stutter.  
 
<br>Depending on your sensitivity you may wish to increase this to 50 or more.
These changes reduce or remove texture data to improve performance on GPU's with low VRAM or low memory bandwidth
 
===== Image downsizing =====
 
TDM can automatically reduce texture resolution for all 3 supported texture types; diffuse,
<br>normal (bump), and specular. Systems with very low quantities of VRAM or low memory bandwidth benefit from this change.
 
In Darkmod.cfg, set '''image_downSize''' to '''1''' and then set a limit with '''image_downSizeLimit''',
e.g., '''"image_downSizeLimit" "256"'''.


<pre>
<pre>


seta image_downSize "1"
tdm_lg_interleave_min 40
seta image_downSizeLimit "256"


</pre>
</pre>


This reduces texture memory requirements and may completely alleviate hard drive thrashing.
<br> As the cost of lightgem calculation is (also) substantially lower in v2.05 and newer, you may be able to set this to 1 for most missions.
There are similar cvars for bump and specular maps as well.
<br>
<br> In testing, the only mission I found that suffered from "tdm_lg_interleave ( > 1) stuttering" was "Penny Dreadful 3: Erasing the Trail".
<br> For that mission, I set tdm_lg_interleave_min to 50 to cure the stutter.
<br> This setting can also be used to boost already high FPS values for the new unbounded FPS options ( [[Performance_Tweaks#Disable_FPS_Lock | com_FixeTic 1]] ).
<br> (eg. If you have 90FPS set tdm_lg_interleave to 7 and tdm_lg_interleave_min to 75 to attempt a push towards 120FPS)


Example: Downsize Normal Maps
In 2.06 with the lightgem calculated on a different thread, this can likely stay at 1 regardless of how low the FPS gets.


<pre>
<font size="3">


seta image_downSizeBump "1"
==== Weak Lightgem (Not Recommended)====
seta image_downSizeBumpLimit "256"
</font>


</pre>
Setting:  
 
Example: Downsize Specular maps


<pre>
<pre>


seta image_downSizeSpecular "1"
seta tdm_lg_weak "1"  
seta image_downSizeSpecularLimit "64"


</pre>
</pre>


====== Image Downsizing verses Lower Resolution ======
in Darkmod.cfg will disable the renderer based lightgem and use a simpler math-based solution.
<br>It's a far less accurate lightgem but may allow weaker systems to play the game as a '''last resort'''.<br><br>
 
----


<br>Higher resolutions require larger frame buffers thus more VRAM, likewise higher resolution textures also consume VRAM
<font size="5">
<br>This leads to the an interesting decision on visual tradeoffs.
<br><br>When you lower the resolution substantially, the overall visuals of the scene are roughly preserved in general way
<br>but the scene becomes sort of impressionistic, filled with artifacts, and somewhat hard to read
<br><br>When you instead lower texture resolution to the extreme, the scene remains sharp but takes on a more stylized \ cartoon aspect
<br>because all these high fidelity 3D objects are coated in blurry images. It makes TDM look like a beefed-up Nintendo 64 game.
<br>If you set image filtering to Nearest mode, TDM instead looks like a strange offset of Minecraft
<br><br>In this case, there is no objective winner.
<br><br>Some people actually prefer the low-texture options to the native presentation due to the interesting style or nostalgic appearance.
<br>Whereas others will consider the extreme style variance to violate the immersion of the scene and would prefer to suffer with less
<br>scene fidelity for the sake of cohesion.


<br>Thread:
=== '''Disabling standard graphics features''' ===
</font>


https://forums.thedarkmod.com/index.php?/topic/19498-image_downsize-in-206/
At the cost of some pretty severe scene quality, you can disable a number of independent graphic features
{{clear}}
<br><br>


===== Disable Specular Maps =====
that are non-essential to play.


Specular gives materials their shine. This option will make all surfaces shine-free.
<font size="4">
==== Texture Based Tweaks ====
</font>


Note: This may not work with the Enhanced Ambient
These changes reduce or remove texture data to improve performance on GPU's with low VRAM or low memory bandwidth


<pre>
===== Image downsizing =====


seta r_skipSpecular "1"
TDM can automatically reduce texture resolution for all 3 supported texture types; diffuse,
<br>normal (bump), and specular. Systems with very low quantities of VRAM or low memory bandwidth benefit from this change.


</pre>
In Darkmod.cfg, set '''image_downSize''' to '''1''' and then set a limit with '''image_downSizeLimit''',
e.g., '''"image_downSizeLimit" "256"'''. 
 
<pre>


in Darkmod.cfg
seta image_downSize "1"
seta image_downSizeLimit "256"


===== Disable Normal Maps =====
</pre>


The main detail attribute for textures in Doom 3 \ Darkmod is the Normal Map.
This reduces texture memory requirements and may completely alleviate hard drive thrashing. 
There are similar cvars for bump and specular maps as well.  


If you disable this your game will become really ugly.
Example: Downsize Normal Maps


<pre>
<pre>


seta r_skipBump "1"
seta image_downSizeBump "1"
seta image_downSizeBumpLimit "256"


</pre>
</pre>


in Darkmod.cfg
Example: Downsize Specular maps
 
===== Disable all Ambient Surfaces =====
 
Related to skipping particles, r_skipAmbient will get rid of any non-lit* particles
<br>(*most particles are additive blends and don't react to light)
<br>along with any other surfaces that don't change based on illumination (most decals, additive glowing windows, etc.).


<pre>
<pre>


seta r_skipAmbient "1"
seta image_downSizeSpecular "1"
seta image_downSizeSpecularLimit "64"


</pre>
</pre>


in Darkmod.cfg
====== Image Downsizing verses Lower Resolution ======


<font size="4">
<br>Higher resolutions require larger frame buffers thus more VRAM, likewise higher resolution textures also consume VRAM
<br>This leads to the an interesting decision on visual tradeoffs.
<br><br>When you lower the resolution substantially, the overall visuals of the scene are roughly preserved in general way
<br>but the scene becomes sort of impressionistic, filled with artifacts, and somewhat hard to read
<br><br>When you instead lower texture resolution to the extreme, the scene remains sharp but takes on a more stylized \ cartoon aspect
<br>because all these high fidelity 3D objects are coated in blurry images. It makes TDM look like a beefed-up Nintendo 64 game.
<br>If you set image filtering to Nearest mode, TDM instead looks like a strange offset of Minecraft
<br><br>In this case, there is no objective winner.
<br><br>Some people actually prefer the low-texture options to the native presentation due to the interesting style or nostalgic appearance.
<br>Whereas others will consider the extreme style variance to violate the immersion of the scene and would prefer to suffer with less
<br>scene fidelity for the sake of cohesion.


==== Light and Fog tweaks ====
<br>Thread:
</font>


These tweaks reduce or eliminate the impact of fogs and volumetric light effects which are often heavier than normal lights.
https://forums.thedarkmod.com/index.php?/topic/19498-image_downsize-in-206/
{{clear}}
<br><br>


<font size="3">
===== Disable Specular Maps =====


===== Disable Volumetric Lights (New in v2.11) =====
Specular gives materials their shine. This option will make all surfaces shine-free.
</font>


Volumetric lights force shadow map rendering for their light radius ( per light ).
Note: This may not work with the Enhanced Ambient
<br>If you have a GPU with low VRAM or poor VRAM bandwidth ( less than 128-bit bus, integrated graphics, etc),
<br>it may be worthwhile to disable them or reduce your default [[Performance_Tweaks#Shadow_Map_Size |shadow map resolution]] ( r_shadowMapSize ).
 
To disable volumetrics entirely, set:


<pre>
<pre>


seta r_volumetricEnable "0"
seta r_skipSpecular "1"


</pre>
</pre>
Line 1,655: Line 1,708:
in Darkmod.cfg
in Darkmod.cfg


====== Disable Volumetric Shadows ======
===== Disable Normal Maps =====
 
The main detail attribute for textures in Doom 3 \ Darkmod is the Normal Map.


Volumetric Lights force expensive Shadow Maps in Stencil Mode. You can disable that via
If you disable this your game will become really ugly.


<pre>
<pre>


seta r_volumetricForceShadowMaps "0"
seta r_skipBump "1"


</pre>
</pre>
Line 1,667: Line 1,722:
in Darkmod.cfg
in Darkmod.cfg


====== Lower Volumetric Samples ======
===== Disable all Ambient Surfaces =====


The more samples the smoother the volumetric lights at the cost of lots of performance.
Related to skipping particles, r_skipAmbient will get rid of any non-lit* particles
<br>Try lowering the samples. Also try changing the r_volumetricBlur and r_volumetricDither values.
<br>(*most particles are additive blends and don't react to light)
<br>along with any other surfaces that don't change based on illumination (most decals, additive glowing windows, etc.).


<pre>
<pre>


seta r_volumetricSamples "16"
seta r_skipAmbient "1"


</pre>
</pre>
Line 1,680: Line 1,736:
in Darkmod.cfg
in Darkmod.cfg


<font size="3">
<font size="4">


===== Disable BlendLights =====
==== Light and Fog tweaks ====
</font>
</font>


<pre>
These tweaks reduce or eliminate the impact of fogs and volumetric light effects which are often heavier than normal lights.


seta r_skipBlendLights "1"  
<font size="3">


</pre>
===== Disable Volumetric Lights (New in v2.11) =====
</font>


in Darkmod.cfg
Volumetric lights force shadow map rendering for their light radius ( per light ).
<br>If you have a GPU with low VRAM or poor VRAM bandwidth ( less than 128-bit bus, integrated graphics, etc),
<br>it may be worthwhile to disable them or reduce your default [[Performance_Tweaks#Shadow_Map_Size |shadow map resolution]] ( r_shadowMapSize ).


<font size="3">
To disable volumetrics entirely, set:
 
===== Disable Fog =====
</font>


<pre>
<pre>


seta r_skipFogLights "2"  
seta r_volumetricEnable "0"


</pre>
</pre>
Line 1,706: Line 1,762:
in Darkmod.cfg
in Darkmod.cfg


As of 2.08 and newer there are several modes of fog disable behavior. Mode 1 only disables it for opaque objects (etc)
====== Disable Volumetric Shadows ======


<font size="4">
Volumetric Lights force expensive Shadow Maps in Stencil Mode. You can disable that via


==== Particle Tweaks ====
<pre>
</font>


Particles mostly impact CPU performance but can impact the GPU due to lots of alpha operations and overdraw
seta r_volumetricForceShadowMaps "0"


===== Disable Soft Particles ( New in 2.03 )=====
</pre>


The new Soft Particle effects in v2.03 and newer use a little more GPU than the previous particles.
in Darkmod.cfg


This is offset by the fact that v2.03 and higher don't render particles during the lightgem calculation.
====== Lower Volumetric Samples ======


Still, if you want an extra boost then set:
The more samples the smoother the volumetric lights at the cost of lots of performance.
<br>Try lowering the samples. Also try changing the r_volumetricBlur and r_volumetricDither values.


<pre>
<pre>


seta r_useSoftParticles "0"
seta r_volumetricSamples "16"


</pre>
</pre>
Line 1,731: Line 1,787:
in Darkmod.cfg
in Darkmod.cfg


===== Disable Particles =====
<font size="3">


This will '''<u>seriously mar your image quality</u>'''. Flames, glares, and smoke will all be gone.
===== Disable BlendLights =====
</font>


<pre>
<pre>


seta r_skipParticles "1"
seta r_skipBlendLights "1"  


</pre>
</pre>


in Darkmod.cfg
in Darkmod.cfg
.
<font size="4">


==== Entity Shadow Tweaks ====
<font size="3">
 
===== Disable Fog =====
</font>
</font>


===== Disable Player Shadow=====
<pre>


The player shadow slightly reduces performance. It has no game effect at all (not seen by AI for instance) apart from atmospheric effect so if you want to disable it enter in the console:
seta r_skipFogLights "2"


g_showplayershadow 0
</pre>


Or, in Darkmod.cfg (see above) change the following line from "1" to "0":
in Darkmod.cfg


seta g_showplayershadow "0"
As of 2.08 and newer there are several modes of fog disable behavior. Mode 1 only disables it for opaque objects (etc)


This is the default setting as of TDM 1.02 and newer.
<font size="4">


===== Disable Player Lantern Shadow=====
==== Particle Tweaks ====
</font>


You may notice a drop in performance while using the player lantern.
Particles mostly impact CPU performance but can impact the GPU due to lots of alpha operations and overdraw
 
===== Disable Soft Particles ( New in 2.03 )=====


Add "noshadows" "1" to entitydef light_lantern_moving in tdm_playertools_lantern.def and this stops the player lantern casting shadows.<br>This helps improve performance slightly when using the lantern.<br><br>
The new Soft Particle effects in v2.03 and newer use a little more GPU than the previous particles.


<font size="4">
This is offset by the fact that v2.03 and higher don't render particles during the lightgem calculation.


==== Disable Sky ====
Still, if you want an extra boost then set:
</font>


(New in v2.05) Pitch black sky with no clouds, Moon, or stars
<pre>
<pre>


seta g_enablePortalSky "0"
seta r_useSoftParticles "0"


</pre>
</pre>
Line 1,780: Line 1,838:
in Darkmod.cfg
in Darkmod.cfg


<font size="4">
===== Disable Particles =====


==== Disable Lip Sync ====
This will '''<u>seriously mar your image quality</u>'''. Flames, glares, and smoke will all be gone.
</font>


AI will not play lipsync animations
<pre>
<pre>


seta tdm_ai_opt_nolipsync "1"
seta r_skipParticles "1"


</pre>
</pre>


in Darkmod.cfg
in Darkmod.cfg
.
<font size="4">


<font size="3">
==== Entity Shadow Tweaks ====
 
===OBSOLETE Drop in Frame Rates when Viewing Water===
</font>
</font>


Some players have reported a drastic drop in performance when an agitated water surface is in view. (This on a Radeon card.)
===== Disable Player Shadow=====
<br>Try entering this in the console. It disables the water visible surface effects but at least it might let you play normally...


<pre>
The player shadow slightly reduces performance. It has no game effect at all (not seen by AI for instance) apart from atmospheric effect so if you want to disable it enter in the console:


  seta r_skipPostProcess "1"
  g_showplayershadow 0


</pre>
Or, in Darkmod.cfg (see above) change the following line from "1" to "0":


or
seta g_showplayershadow "0"


<s>
This is the default setting as of TDM 1.02 and newer.
<pre>


seta r_postprocess "0"
===== Disable Player Lantern Shadow=====


</pre>
You may notice a drop in performance while using the player lantern.
</s>


<pre>
Add "noshadows" "1" to entitydef light_lantern_moving in tdm_playertools_lantern.def and this stops the player lantern casting shadows.<br>This helps improve performance slightly when using the lantern.<br><br>


seta r_bloom "0"
<font size="4">


</pre>
==== Disable Sky ====
 
</font>
You can also set a key-bind to toggle this instead:


(New in v2.05) Pitch black sky with no clouds, Moon, or stars
<pre>
<pre>


bind "z" "toggle r_bloom 0 1"
seta g_enablePortalSky "0"


</pre>
</pre>


See [[#Toggle_settings_in_realtime|Toggle Settings in Realtime]]
in Darkmod.cfg


See also [[FAQ#(OBSOLETE_in_2.12)_Underwater_performance_poor|Underwater performance poor]]
<font size="4">
 
==== Disable Lip Sync ====
</font>
 
AI will not play lipsync animations
<pre>


TDM 2.12 has improved underwater performance. It no longer uses the postprocess pipeline.
seta tdm_ai_opt_nolipsync "1"


<font size="5">
</pre>


== '''Experimental Features''' ==
in Darkmod.cfg
</font>


These settings may offer some performance benefits with caveats \ bugs.
<font size="3">


=== Shadow Map Cull Front ===
===OBSOLETE Drop in Frame Rates when Viewing Water===
</font>


The default shadow map mode calculates shadows for both polygons that are on the side facing
Some players have reported a drastic drop in performance when an agitated water surface is in view. (This on a Radeon card.)  
<br>the light (front) and the side facing away from the light (back).
<br>Try entering this in the console. It disables the water visible surface effects but at least it might let you play normally...
<br>This mode improves performance by only calculating the back side shadows.
<br>This mode is almost production ready. It actually fixes or improves some visuals that the default mode produces
<br>but it has some glaring artifacts such as light leaks where surfaces meet in corner areas.
<br>In most missions, you will not be able to tell the difference other than the '''improved performance'''


<pre>
<pre>


seta r_shadowMapCullFront "1"
seta r_skipPostProcess "1"


</pre>
</pre>


=== Alpha Tested Shadow Maps ( New 2.12 ) ===
or
 
Shadow Maps can cast shadows through transparent parts of textures. This is not currently possible with stencil shadows.
<br>To enable this feature:


<s>
<pre>
<pre>


seta r_shadowMapsAlphaTested "1"
seta r_postprocess "0"


</pre>
</pre>
</s>
<pre>


in Darkmod.cfg
seta r_bloom "0"


<br>Note: Be advised that this consumes more performance so if this is enabled then consider disabling it if you are struggling with performance
</pre>
<br>


=== OBSOLETE Single Pass Light Rendering ( 2.09 ) ===
You can also set a key-bind to toggle this instead:
<br>
'''THIS OPTION DOES NOT WORK IN 2.11'''
<br><br>
Similar to modern "Forward+" rendering, all '''lights''' and shadows are calculated beforehand and rendered in one pass.


<pre>
<pre>


seta r_shadowMapSinglePass "2"
bind "z" "toggle r_bloom 0 1"


</pre>
</pre>


in Darkmod.cfg
See [[#Toggle_settings_in_realtime|Toggle Settings in Realtime]]
<br><br>


You have probably noticed that this uses the same CVAR that single pass shadows uses.
See also [[FAQ#(OBSOLETE_in_2.12)_Underwater_performance_poor|Underwater performance poor]]
<br>Single Pass lighting requires Single Pass shadows.


This mode (2) does not seem to improve FPS for some Nvidia hardware.
TDM 2.12 has improved underwater performance. It no longer uses the postprocess pipeline.
<br>This is probably because of the Nvidia's tiling (deferred rendering) hardware optimizations.
 
<font size="5">
 
== '''Experimental Features''' ==
</font>


=== Use BFG style Portal Culling (new in v2.06) ===
These settings may offer some performance benefits with caveats \ bugs.


If you have a system that works well with Multi-Core ( com_smp 1) then you may
=== Shadow Map Cull Front ===
consider enabling r_useAnonReclaimer to reduce cache thrashing.


2.07 and newer
The default shadow map mode calculates shadows for both polygons that are on the side facing
<br>the light (front) and the side facing away from the light (back).
<br>This mode improves performance by only calculating the back side shadows.
<br>This mode is almost production ready. It actually fixes or improves some visuals that the default mode produces
<br>but it has some glaring artifacts such as light leaks where surfaces meet in corner areas.
<br>In most missions, you will not be able to tell the difference other than the '''improved performance'''


<pre>
<pre>


seta r_useAnonReclaimer "1"  
seta r_shadowMapCullFront "1"


</pre>
</pre>


2.06
=== Alpha Tested Shadow Maps ( New 2.12 ) ===
 
Shadow Maps can cast shadows through transparent parts of textures. This is not currently possible with stencil shadows.
<br>To enable this feature:


<pre>
<pre>


seta r_useBfgPortalCulling "1"
seta r_shadowMapsAlphaTested "1"


</pre>
</pre>
Line 1,920: Line 1,980:
in Darkmod.cfg
in Darkmod.cfg


<br>Note: Be advised that this consumes more performance so if this is enabled then consider disabling it if you are struggling with performance
<br>


 
=== OBSOLETE Single Pass Light Rendering ( 2.09 ) ===
 
<br>
=== Skip Dynamic Shadows ===
'''THIS OPTION DOES NOT WORK IN 2.11'''
 
<br><br>
Only render shadows from Stationary lights.
Similar to modern "Forward+" rendering, all '''lights''' and shadows are calculated beforehand and rendered in one pass.
This will break missions where players might need to hide in a moving shadow.


<pre>
<pre>


seta r_skipDynamicShadows "1"
seta r_shadowMapSinglePass "2"


</pre>
</pre>


<font size="5">
in Darkmod.cfg
<br><br>


== '''Lower Sound Quality''' ==
You have probably noticed that this uses the same CVAR that single pass shadows uses.
</font>
<br>Single Pass lighting requires Single Pass shadows.


=== Force 22khz ===
This mode (2) does not seem to improve FPS for some Nvidia hardware.
<br>This is probably because of the Nvidia's tiling (deferred rendering) hardware optimizations.


'''<s>2.06: Do not use this optimization. It is known to cause issues with loading missions on some OpenAL hardware:<br>
=== Use BFG style Portal Culling (new in v2.06) ===
http://bugs.thedarkmod.com/view.php?id=4814</s>
'''


'''(This is fixed in 2.07)'''
If you have a system that works well with Multi-Core ( com_smp 1) then you may
consider enabling r_useAnonReclaimer to reduce cache thrashing.
 
2.07 and newer


You can force 22khz audio processing to reduce the CPU overhead of audio processing.
<pre>


Obviously, EAX effects will increase CPU load for audio so you should consider disabling
seta r_useAnonReclaimer "1"


those before lowering audio quality. If normal audio plays fine but EAX causes performace,
</pre>


this change might give you a boost while EAX is enabled.
2.06


<pre>
<pre>


seta s_force22kHz "1"
seta r_useBfgPortalCulling "1"


</pre>
</pre>


=== Disable EFX reverb (new 2.06) ===
in Darkmod.cfg


The new EFX audio option (equivalent to EAX) has some impact on mission performance, due to additional reverb calculation by the CPU.
<br>Disable this option for extra performance. Especially if you get big stutter or lockup events opening doors from indoor
to outdoor areas.
<br>This option, disabled by default, is toggled with the main menu's "Audio/OpenAL EFX".


Turning on this option makes no performance or audio difference if the mapper didn't include an EFX file. For more about that, see [[Setting Reverb Data of Rooms (EAX)]].


<font size="5">


=='''Gameplay Performance Tips'''==
=== Skip Dynamic Shadows ===
</font>


If you have done everything else you can and performance is still poor then one or two things you might do in game to help:<br><br>
Only render shadows from Stationary lights.
This will break missions where players might need to hide in a moving shadow.


* '''Revert to 2.03 Search behavior'''<br>
<pre>
 
seta r_skipDynamicShadows "1"


<pre>
seta tdm_ai_search_type "1"
</pre>
</pre>
'''The new AI "hiding spot" routines in 2.04 (and newer) are more CPU intensive that 2.03's search method'''<br><br>
* Close all doors after you have passed through. Generally the game has to process both areas until you close the door if the doorway is still in sight.
* Kill or KO every AI you can. You might not like to play that way but generally, AI still hog resources even out of sight (depending on how set up in the game.)
* Avoid alerts. A dozen guards searching for you will really slow things down on a low-end machine.
* Try to look down at the ground when moving along. Gazing up at a grand vista will slow you down. Best to do your gazing while standing still.
{{clear}}


<font size="5">
<font size="5">


== '''Hardware Considerations''' ==
== '''Lower Sound Quality''' ==
</font>
</font>


=== Compile Darkmod for your own Hardware ===
=== Force 22khz ===


The Dark Mod already contains many hardware specific optimizations and can detect when your system has the needed hardware so that it can accelerate parts of the engine.
'''<s>2.06: Do not use this optimization. It is known to cause issues with loading missions on some OpenAL hardware:<br>
<br>Though unlikely, it is possible that MSVC++ or GCC compilers can improve the performance of the executable further when told what hardware you have.
http://bugs.thedarkmod.com/view.php?id=4814</s>
<br>You can try compiling The Dark Mod yourself and add any compiler configurations that are specific to your hardware.<br><br>
'''
[[The_Dark_Mod_-_Compilation_Guide|Darkmod Compiling Guide]]
<br><br>For Windows \ MSVC++ you may wish to add an AVX flag:
  https://learn.microsoft.com/en-us/cpp/build/reference/arch-x64?view=msvc-170
<br><br>For Linux you can add -DCMAKE_CXX_FLAGS=-march=native to your cmake string.
<br><br>Example:
  cmake -DCMAKE_BUILD_TYPE="Release" .. -DGAME_DIR=/home/user/darkmod -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 -DCMAKE_CXX_FLAGS=-march=native


{{clear}}
'''(This is fixed in 2.07)'''


=== OBSOLETE Configure Video RAM ===
You can force 22khz audio processing to reduce the CPU overhead of audio processing.


Change:
Obviously, EAX effects will increase CPU load for audio so you should consider disabling


<pre>
those before lowering audio quality. If normal audio plays fine but EAX causes performace,


seta com_videoRam "128"
this change might give you a boost while EAX is enabled.
 
</pre>
 
to the appropriate value (in MB) for your GPU in Darkmod.cfg
 
Eg. A 2GB video card would have 2048 there.


<pre>
<pre>


seta com_videoRam "2048"  
seta s_force22kHz "1"


</pre>
</pre>


{{clear}}
=== Disable EFX reverb (new 2.06) ===


=== Upgrade your BIOS ===
The new EFX audio option (equivalent to EAX) has some impact on mission performance, due to additional reverb calculation by the CPU.
<br>Disable this option for extra performance. Especially if you get big stutter or lockup events opening doors from indoor
to outdoor areas.
<br>This option, disabled by default, is toggled with the main menu's "Audio/OpenAL EFX".


Sometimes bugs or unintended specification limits in the BIOS on an older motherboard will prevent it from
Turning on this option makes no performance or audio difference if the mapper didn't include an EFX file. For more about that, see [[Setting Reverb Data of Rooms (EAX)]].
allowing the CPU or GPU to meet their potential.  


If your manufacturer has an updated motherboard BIOS available, consider applying it.
<font size="5">


=== Last resort: Upgrade your hardware ===
=='''Gameplay Performance Tips'''==
</font>


Modern games need a lot of computing power, and while you don't need the absolutely newest hardware to play them, upgrading single components of your machine can help tremendously:
If you have done everything else you can and performance is still poor then one or two things you might do in game to help:<br><br>


* If you got '''less than 2 GByte''' main memory, consider upgrading your memory. This really helps to reduce swapping, which introduces quite noticeable slowdowns.
* '''Revert to 2.03 Search behavior'''<br>
* If you got a graphic card from NVidia older than the Geforce 8x00 series, consider upgrading it.
* For comparison, see '''[[Known_System_Configurations|Known System Configurations]]''' to see the weakest hardware known to run current TDM versions.


Upgrading your CPU is possible in most cases but can be quite complicated
<pre>
seta tdm_ai_search_type "1"
</pre>
'''The new AI "hiding spot" routines in 2.04 (and newer) are more CPU intensive that 2.03's search method'''<br><br>


and the cost might be so high that upgrading your whole PC might be a better value.  
* Close all doors after you have passed through. Generally the game has to process both areas until you close the door if the doorway is still in sight.
 
* Kill or KO every AI you can. You might not like to play that way but generally, AI still hog resources even out of sight (depending on how set up in the game.)
Upgrading the hard disk will usually not help much with gaming, unless you are running out of free space.
* Avoid alerts. A dozen guards searching for you will really slow things down on a low-end machine.
 
* Try to look down at the ground when moving along. Gazing up at a grand vista will slow you down. Best to do your gazing while standing still.
SSD / NVME storage have improved loading times, especially on 2.10 and newer


{{clear}}


<font size="5">
<font size="5">

Revision as of 06:19, 19 April 2024

For Players

This article relates to performance issues for players. For performance information for mappers, see Performance: Essential Must-Knows

Minimum Specifications

  • CPU: 1.5Ghz with x64 instructions (64-bit) and SSE2 SIMD support
  • GPU: OpenGL 3.2 compatible with at least 512MB of VRAM ( roughly the performance of a Geforce GT 8800 )
  • RAM: 2GB
  • Storage: 30GB free space ( depending amount of missions you download )

You may be able to play on weaker hardware using config tips in this wiki but you will likely encounter many missions that are too taxing.

The Dark Mod 1.0 was originally released in 2009. The average mission designer and player of that time had a Geforce 6600GT and AMD Athlon 64 X2 2GHZ.
While some missions were playable all the way down to a Pentium 4 2.8GHZ with an Geforce FX 5200, this is well below the expected audience for this project.
Current Intel integrated GPU's have better performance than the Geforce 8800 that was a very high-end card in 2009.
See Hardware Considerations for additional details.

Note: Low-power mobile chips are known to throttle under heavy load, especially when using integrated graphics.

Conventions

Most of the changes demonstrated in this article are via "Console variables" CVARS.

The "seta" prefix is intended to save these settings permanently so that they are retained on restart and that is what is used by Darkmod.cfg.


seta r_softShadowsRadius "2"

OBSOLETE Suggestions

Some configuration suggestions in this wiki are no longer applicable in the latest TDM versions and are only
preserved for players running old versions. Where applicable these are labelled OBSOLETE so you can ignore them.

Temporary Testing

To temporarily test any settings, you can drop the "seta" and simply invoke the cvar and it's value (without double quotes) in the console.

Example:

Open the console with Ctrl+Alt+~ (tilde, ^ on German keyboards) and type:


r_softShadowsRadius 2

Note: Some CVAR changes in the console, such as vid_mode (resolution), r_multisamples (AA), r_swapInterval (V-Synch), image_anisotropy (AF) cannot be changed without also invoking vid_restart.

NEW: As of TDM 2.07, almost all conventional settings can be altered without restarting the engine!

Toggle settings in realtime

With the exception of Resolution ( "Render Scale" can be changed realtime), most of the above settings can be changed in realtime in the console or via a bind in Darkmod.cfg.

For example, you could bind both post-processing and enhanced interaction to the Z key to enable and disable them both by pressing that key


bind "z" "toggle r_postprocess 0 1; toggle tdm_interaction_vfp_type 0 1"

in Darkmod.cfg

Mission.cfg (New in 2.12)

When TDM was a Doom 3 mod, you could add a DoomConfig.cfg file to specific missions under doom3/darkmod/fms/mission_name
This allowed you customize settings on a per mission basis
TDM introduces a new config file called mission.cfg that is meant to allow mission authors to make fleeting setting changes to dynamic settings
You can use this file to replicate the old per mission concept

  • Make a mission.cfg file and place it under your darkmod folder. This is your global setting file.
  • Make another mission.cfg file and place it under darkmod/fms/<mission_name>. This is your per mission setting file
  • Add cvars to the per mission file in the format of seta r_something "0"
  • For each cvar added to the per mission file, add the preferred default version to the global setting file

To ensure the global setting gets re-applied, uninstall the current mission before installing a new one


Launch Options

You can also add the value as part of your target in your shortcut:

Example with two cvars:

  • Click the right mouse button Right click your Desktop shortcut to TheDarkMod and select Properties
  • On the Shortcut Tab enter the following into the "Target:" field

"C:\darkmod\TheDarkMod.exe" +set r_softShadowsRadius 2 1 +r_useEntityCulling 1

(Assuming you installed into C:\darkmod)

  • Then Click the left mouse button click the Change Icon button and browse for the Darkmod.ico icon in your darkmod install path
  • Click the left mouse button Click Apply

See also Set TheDarkMod to High Priority


Evaluation and Diagnostics

Show FPS

First, you can check how many FPS are achieved by opening the console with Ctrl+Alt+~ (tilde, ^ on German keyboards) and type:

com_showFPS 1

Show Position

To identify the locations where problems are found, use these two cvars to render the positions as an overlay display while playing.

Open the console with Ctrl+Alt+~ (tilde, ^ on German keyboards) and type:


g_showviewpos 1

con_noPrint 0

TDM Show Viewpos ( New 2.12 )

To accomplish the basically the same thing ( a little more refined ) the new tdm_show_viewpos cvar is now available


tdm_show_viewpos 1

Stop Time

Moving and Thinking can impact performance in unexpected ways.
When comparing graphical settings it might be best to "Stop Time" so that the entire scene is frozen
and the FPS changes due to graphics options can be more easily compared.
Open the console with Ctrl+Alt+~ (tilde is ^ on German keyboards) and type:


g_stopTime 1

Delete Darkmod.cfg after upgrade

If you run tdm_installer to upgrade TDM, it offers you the option to Restore Darkmod.cfg.
When you do this, you may be reverting newer configuration defaults that have been changed in the latest release.
While it may be inconvenient to reconfigure all your preferred settings from scratch, it may be best to start with this step ( deleting Darkmod.cfg )
before tinkering with any other setting changes. ( Especially if you haven't done this for a few upgrade cycles. )

Newer TDM versions keep your keybindings and controller settings in a separate file
so you will just need to change resolution, brightness \ gamma, and other graphic quality settings
in addition to game-play difficulty settings.

Mission Updates

Mission authors often discover performance problems after they release their missions.
They will occasionally issue new mission versions that have improved performance.
Also, the TDM team will sometimes apply fixes to missions that can improve performance and stability in new release versions.
We recommend checking the Mission Downloader for updates to your existing missions ( denoted with an asterisk )
Note: Savegames do not work between different mission versions.

Known Taxing Missions

TDM performance can vary wildly depending on what any specific mission author has done to design their mission.
Before deciding that TDM is unplayable on your hardware, please try less demanding missions
The following are a few missions that are known to challenge low-end hardware configurations

  • Scroll of Remembrance
  • Briarwood Manor
  • The Rats Triumphant
  • Rightful Property


Conversely, here are a few missions that should run well on low-end hardware ( in addition to the included "official" missions )

  • Closemouthed Shadows
  • The Outpost
  • The Parcel
  • Special Delivery
  • The Thieves
  • Thief's Den 1
  • The Golden Skull
  • Coercion
  • Sir Talbot's Collatoral


Also, some very large missions will not load when running 32-bit TDM versions on Windows ( or may have anomalies on 32-bit Linux )
They simply cause TDM to exceed the limit of 32-bit mission loading.

  • The Painter's Wife
  • Penny Dreadful 3: Erasing the Trail


( Note: You may be able to use image_downSize cvars to lower VRAM resources and load these missions on 32-bit Windows. )



Hardware Considerations

If you can correct hardware deficiencies you may not need to perform as many tweaks or setting changes.
Sometimes it is as simple as a Driver or BIOS update. Other times, you may need to consider updating hardware.


Driver Considerations


(IdTech4) The Dark Mod was originally based on OpenGL 2.0. (the same as Doom 3)

GPU manufacturers have largely ignored issues with this older specification so a number of workarounds have been

compiled by the community to attend to erroneous behaviors or poor performance.

As of TDM 2.06 and newer The Dark Mod uses OpenGL 3.x so many of these suggestions are no longer applicable.

That said, even OpenGL 3.2 (current requirement) is an old standard so some newer workarounds may be needed.


Intel ( new 2.09 )

Some Intel drivers do not perform well with persistent mapping enabled.
In 2.09 there is a special persistent mapping mode that works better for this hardware.
You must disable standard persistent mapping to use this mode.


r_gpuBufferNonpersistentUpdateMode "1"

r_usePersistentMapping 0


(AMD\ATI) Disable Catalyst AI

2018: The latest Radeon Crimson and Adrenalin Drivers:

Surface Format Optimization = OFF

Disable Catalyst AI in recent AMD Drivers

(AMD\ATI) Rename the executable

Most modern drivers have built-in profiles for the executable names of commercial games.

Renaming TheDarkMod.exe to the name of a commercial OpenGL game may gain you some optimizations

or even a Crossfire profile (I believe DarkAthena.exe had one.)

Known working renames:

DarkAthena.exe (thus far the most consistent improvement)

Doom3BFG.exe

Wolf2MP.exe

Amnesia.exe

Brink.exe

Prey.exe

(Nvidia) Optimus Laptop wont use your Nvidia GPU

See also: [1]

Many Laptops now have the ability to use the GPU that is built into the CPU when not "gaming".
Unfortunately, sometimes the drivers for these Laptops don't detect TDM as a "game".

The easiest solution is to create a Driver Profile for TheDarkMod.exe or TheDarkModx64.exe in your driver settings.

  • Right click Click the right mouse button anywhere on your desktop where no icon is shown
  • Left Click Click the left mouse button Nvidia Control Panel
  • Then Click on the Programs Tab
  • Click "Add" and browse for TheDarkMod.exe or TheDarkModx64.exe
  • Then scroll down the settings list and find "OpenGL Rendering GPU"
  • Then select your Nvidia GPU from the list of options

Nvidia Profiles.jpg



(Nvidia) Disable the Streamer Service

Open your run dialog (Windows + R) or command prompt and type services.msc

On the Extended Tab locate "Nvidia Streamer Network Service"

Click the right mouse button Right-click it and choose "Stop"

Once the service is stopped, Click the right mouse button right click it again and choose Properties

On the General Tab set Startup Type = Disabled then Click the left mouse button click Apply.

Do the same for "Nvidia Streamer Service"

Do the same for "Nvidia Telemetry" service(s).

Note: There is a GUI option to disable streaming in the newest Geforce Experience settings page.

You would still be advised to disable the Telemetry service for extra performance.


You can also perform these steps for any services that you know can be manually started

or are not needed for your daily usage. (Obviously) Do not disable any service that you don't

recognize or know is safe to disable.


NEW INFO:

The Nvidia Streamer Service is now tied to the "Geforce Experience" "In-Game Overlay" setting.
Disabling that feature in Geforce Experience should accomplish the same as the above.



(Nvidia) Disable Threaded Optimizations

Open Nvidia Control Panel ->

Manage 3D Settings ->

Bottom half of list locate "Threaded Optimization" <-- Set to NO / Off

Also set "Multi-display/Mixed GPU acceleration" to "Single display performance mode"

This can also reduce or eliminate driver crashes or rendering anomalies.

  • Note: This might be obsolete information.
    With the latest Nvidia drivers, some users have reported that disabling Threaded Optimizations
    has significantly reduced performance. (Down from 60 to 25FPS in one case.)



Lower in-driver quality settings

AMD, Nvidia, and Intel all give users the option to lower texture quality and

also have various quality "optimization" levels for texture LOD Bias and Anisotropy (Filtering).

Try different driver versions

Sometimes updating to the latest driver version or reverting to an older version

will improve performance. Try a few revisions or ask about known good driver versions.

This applies to both GPU drivers and "Motherboard Chipset Drivers".

See also Upgrade your BIOS


Upgrade your BIOS

Sometimes bugs or unintended specification limits in the BIOS on an older motherboard will prevent it from allowing the CPU or GPU to meet their potential.

If your manufacturer has an updated motherboard BIOS available, consider applying it.

Compile Darkmod for your own Hardware

The Dark Mod already contains many hardware specific optimizations and can detect when your system has the needed hardware so that it can accelerate parts of the engine.
Though unlikely, it is possible that MSVC++ or GCC compilers can improve the performance of the executable further when told what hardware you have.
You can try compiling The Dark Mod yourself and add any compiler configurations that are specific to your hardware.

Darkmod Compiling Guide

For Windows \ MSVC++ you may wish to add an AVX flag:

 https://learn.microsoft.com/en-us/cpp/build/reference/arch-x64?view=msvc-170



For Linux you can add -DCMAKE_CXX_FLAGS=-march=native to your cmake string.

Example:

 cmake -DCMAKE_BUILD_TYPE="Release" .. -DGAME_DIR=/home/user/darkmod -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 -DCMAKE_CXX_FLAGS=-march=native

OBSOLETE Configure Video RAM

Change:


seta com_videoRam "128" 

to the appropriate value (in MB) for your GPU in Darkmod.cfg

Eg. A 2GB video card would have 2048 there.


seta com_videoRam "2048" 

Last resort: Upgrade your hardware


This whole wiki is meant to assist players with making TDM run as best as possible on their current hardware.

That said, you may find that the needed compromises are too harsh or that some missions still do not perform
well enough even with an optimized configuration. As such, it may be time to consider hardware upgrades.

Before upgrading it may still be advised to open a support thread in the forums, especially if your hardware is above the minimum specifications


Modern games need a lot of computing power, and while you don't need the absolutely newest hardware to play them,
upgrading single components of your machine can help tremendously:

  • If you got less than 2 GByte main memory, consider upgrading your memory. This really helps to reduce swapping, which introduces quite noticeable slowdowns.
  • If you got a graphic card from NVidia older than the Geforce 8x00 series, consider upgrading it.
  • Upgrading the (spinning) hard disk to SSD / NVME "Solid State" storage should improved loading times, especially on 2.10 and newer.
  • For comparison, see Known System Configurations to see the weakest hardware known to run current TDM versions.


Upgrading your CPU is possible in most cases but can be quite complicated and the cost might be so high that upgrading your whole PC might be a better value.



Optimizing the OS performance

Historically, TDM had significantly better performance on Windows because Doom 3 had no SIMD optimizations under Linux.
As of 2.06 and newer Linux TDM has both SSE SIMD and AVX optimizations so it can run faster under Linux due to less OS overhead.
Unfortunately, the default "capped FPS mode" has never worked well under Linux so out-of-box Linux still performs worse.
Hence we advise switching to uncapped mode under Linux.
If you have a weaker CPU and can install Linux ( dual boot, etc ) you may see 5 to 10% performance uplift when configured properly


All OS Variants: File Permissions

Make sure your darkmod folder is located in a non-protected location.

On Windows, "Program Files" is protected and will cause problems saving any settings or installing Fan Missions.

On Linux, you should consider creating your darkmod directory under your /home/<username>/ folder to avoid permission issues.

Linux UEFI Secure Boot

With Secure Boot enabled in the BIOS, some Linux distros will fallback to (slow) open drivers and wont have access to most hardware features.
If your Linux distro doesn't offer "Signed Kernels" and "Signed Drivers" disabling UEFI may be the only way to have acceptable performance
We recommend that you consider using a Linux distro that offers Signed Kernels such as the latest Ubuntu, OpenSUSE, Debian, Linux Mint versions

Stop running programs in the background

Programs running in the background might either eat up memory that is needed for Doom 3 The Dark Mod, and thus cause swapping to the hard disk, or they might consume CPU time or other resources.

This can cause either general slowdowns or hickups during game play.

Ensure that Programs are the main priority in the OS

To begin the process, type sysdm.cpl in Run box (Windows + R) and hit Enter to open the System Properties.

Select the Advanced tab and under Performance, Click the left mouse button click on Settings.

In the Performance Options box, select the Advanced Tab again.

You will see a section Processor Scheduling

Choose "Programs" then Click the left mouse button click Apply.

White-list TheDarkMod.exe in Security Software

Make sure that Windows Defender or Anti-Virus, Anti-Spyware, etc aren't constantly scanning or interacting

with TheDarkMod.exe. Add it to your security white-list.

Windows 10 Granular Security Options

With new attacks like Meltdown and Spectre, Windows 10 has added CPU architecture specific security fixes.
Many of these have performance impacts. The impact is mostly on Storage access so loading times would
normally be the only casualty of these changes. Still, it's possible that these protections might interfere
with The Dark Mod in other ways.

Please review:

https://learn.microsoft.com/en-us/microsoft-365/security/defender-endpoint/exploit-protection-reference?view=o365-worldwide

and disable the security options you feel are excessive.

Disable TDM Connectivity

If you decide to bypass / safelist TDM in security software, you can mitigate risks posed by TDM's network connection by setting:


seta tdm_allow_http_access "0"

in Darkmod.cfg to block connectivity.

This comes with the caveat that the in-game mission downloader won't work, you'll need to download missions from https://www.thedarkmod.com/missions
and copying them to your darkmod/fms folder

Disable Desktop Effects

(If you are willing to sacrifice you desktop visual behavior and effects for better TDM performance. Note: This can be reverted.)

To begin the process, type sysdm.cpl in Run box (Windows + R) and hit Enter to open the System Properties.

Select the Advanced tab and under Performance, Click the left mouse button click on Settings.

In the Performance Options box, select the Visual Effects tab.

Check "Adjust for Best Performance" then click Apply.


Priority and Affinity (Advanced)



The following sub-section is a deep dive into forcing your Operating System to treat TDM as the most important application.

A well behaved and maintained OS generally will not need to be configured like this so please consider these options
to be an extreme last resort to ensure that no OS performance factors are slowing down TDM

Windows Priority and Affinity

Note: As of The Dark Mod 2.08 Frontend Acceleration, defaults to 2 threads. When configuring affinity you should
ensure that at least 2 cores ( preferably 3 ) are allocated to TDM. If you increase the jobs_numThreads value
you should correspondingly increase the number of cores available in process affinity.

Set TheDarkMod to High Priority
  • Launch TheDarkMod

(Note: Do not start a mission or test map yet. If the 3D render is initialized it will take a long time to exit fullscreen and return to it.)

  • Alt + Enter to exit fullscreen
  • Ctrl + Alt + Del to open your Task Manager
  • Click the right mouse button Right-click on TheDarkMod.exe the choose "Go to Details"
  • (On the details\processes pane) Click the right mouse button Right-click on TheDarkMod.exe and mouse-over Set Priority and choose High
  • Alt + Enter to return to fullscreen

You can also edit your Desktop shortcut to start in High priority:

  • Click the right mouse button Right-click your Desktop shortcut to TheDarkMod and select Properties
  • On the Shortcut Tab enter the following into the "Target:" field

cmd.exe /c start "TheDarkMod" /High "C:\darkmod\TheDarkMod.exe"

(Assuming you installed into C:\darkmod)

  • Then Click the left mouse button click the Change Icon button and browse for the Darkmod.ico icon in your darkmod install path
  • Click the left mouse button Click Apply
Set TheDarkMod Affinity

If you have a limited number of cores or heavy background tasks are always consuming the default cores, you can set The Dark Mod to run on a specific core via "affinity"

  • Launch TheDarkMod
  • Alt + Enter to exit fullscreen

(Note: Do not start a mission or test map yet. If the 3D render is initialized it will take a long time to exit fullscreen and return to it.)

  • Ctrl + Alt + Del to open your Task Manager
  • Click the Performance Tab and look at the CPU display to see which cores are the least busy
  • (On Windows 10, click the "Open Resource Monitor" link and then click the CPU tab and expand the right pane)
  • Close the Resource Monitor and click the Processes Tab in Task Manager
  • Click the right mouse button Right-click on TheDarkMod.exe the choose "Go to Details"
  • (On the details\processes pane) Click the right mouse button Right-click on TheDarkMod.exe
  • Mouse-over then click "Set Affinity" and uncheck cores you want to prevent TDM from using
  • Alt + Enter to return to fullscreen

As with Priority you can set Affinity in your shortcut.

Example Target:


cmd.exe /c start "TheDarkMod" /affinity 1 "C:\darkmod\TheDarkMod.exe"

The affinity number is not matched to the number in your performance screen. For example "Core 0" in Task Manager is affinity 1. The values are in Hex but are converted from binary where 1 represents an active core and 0 is disabled in a descending order.

For example: Binary 1110 means Core 3, 2, and 1 are enabled while Core 0 is disabled. Converting from Binary to Hex gives you /affinty E. This is a useful config if the majority of your processes are running on Core 0. FE for an 8 core chip would accomplish the same result.

Another useful option is 0101 /affinity 5 which will select core 0 and 2 which are "real" cores in a Hyperthreading environment.

  • Core 0 is 1
  • Core 1 is 2
  • Core 2 is 4
  • Core 3 is 8
  • Core 4 is 10
  • Core 5 is 20
  • Core 6 is 40
  • Core 7 is 80
  • Core 8 is 100
  • Core 9 is 200
  • Core 10 is 400
  • Core 11 is 800

Again, the core number does not exclude hyperthread cores so if you have an 8 Core \ 16 thread CPU you must count all real and hyperthread virtual cores when setting affinity.

Windows Combined Example

You can include both priority and affinity switches in your shortcut


C:\Windows\System32\cmd.exe /c start "TheDarkMod" /High /affinity 5 "C:\darkmod\TheDarkMod.exe" +set r_softShadowsRadius 2.5 +r_useEntityCulling 1

Start TheDarkMod with high priority on Cores 0 and 2 (real cores) and add two launch cvars ( See Conventions).

As you can see, you can make a huge launch string but once you go past 2 or 3 cvars it's best to

use Darkmod.cfg unless you wish to make multiple launchers for testing (etc).

Process Management Note

You can also either "End Task" on processes that you know you don't need or set them to "below normal" or "low" priority.

Moving these low priority processes to a different core via affinity is also an option.

Some processes, such as OneDrive.exe (which is integrated into the OS) will keep restarting so it's best to set these to "low priority"

If you are unsure what a process does, do not change it until you've researched the process.

Linux Priority and Affinity

Note: Linux generally does a good job of ensuring that other applications or processes are not impacting
game performance ( or really any foreground application performance ).
Managing affinity and\or priority usually has little to no effect in Linux unless you knowingly have lots of other heavy applications running.

Linux Priority

NOTE: Some modern Linux distros that use pipewire audio will not render audio if
the initial command that invokes the application is run as root or sudo. I am currently investigating a workaround.

You can launch TDM with a very high priority via the "nice" command:

sudo nice --18 su -c /home/user/darkmod/thedarkmod.x64 username

There are two dashes in the above command. The first dash just tells the command that we are passing a parameter,
the second dash indicates a "negative priority number". Confusingly, the larger the negative number the higher
the priority with a maximum value of -20. Conversely the higher the positive integer, the lower the program priority!
For the sake of responsiveness, it is probably best to avoid the top or bottom if the priority range.
Also, note that the command must run as sudo to use negative priority and it's best to use "su -c program username"
so that it is run as "you" (replace username with your username) rather than root so you don't end up with root owned files.
See the visudo change in Linux Combined Example for details on how to run as sudo without a password

Example to launch with lower priority ( lowest possible value 19 ):

nice -10 /home/user/darkmod/thedarkmod.x64

You can also change the priority of TDM while it is running via "renice" and "pidof"

renice -n --18 -p $(pidof thedarkmod.x64)
Linux Affinity

Modern Linux operating systems will list cores with a list starting with 0, so ( for example ) the top core number in an 8 core CPU will be 7.

You can identify cores and whether the cores are hyperthread ( HT ) cores via:

lscpu -e

Example:

    CPU NODE SOCKET CORE L1d:L1i:L2:L3 ONLINE MAXMHZ    MINMHZ
    0   0    0      0    0:0:0:0       yes    4100.0000 400.0000
    1   0    0      1    1:1:1:0       yes    4100.0000 400.0000
    2   0    0      2    2:2:2:0       yes    4100.0000 400.0000
    3   0    0      3    3:3:3:0       yes    4100.0000 400.0000
    4   0    0      0    0:0:0:0       yes    4100.0000 400.0000
    5   0    0      1    1:1:1:0       yes    4100.0000 400.0000
    6   0    0      2    2:2:2:0       yes    4100.0000 400.0000
    7   0    0      3    3:3:3:0       yes    4100.0000 400.0000

The CPU number above is what the OS recognizes when using affinity commands, the core number is actual core number. So in the above results, CPU's 4 to 7 are hyperthreading cores whereas cores 0 to 3 are real cores.

To pin TDM to specific cores, you can change the launch options to:

taskset -c 1,2,3 /path/to/thedarkmod.x64

The above example forces TDM to run on real cores 1, 2, and 3. You may use a dash to specify a range of cores (1-3) or even mix both syntax forms ( 1-3,6 ).

You can also change the core of a running TDM instance by using pidof to auto-locate the PID of the running process:

taskset -cp 1,2,3 $(pidof thedarkmod.x64)

More advanced users may wish to "cpuset" to create a new logical group of cores and caches (etc) then assign TDM to run under
the new CPU Set

And (of course) you can instead use taskset to move other non-critical processes to other cores or HT cores.

Linux Combined Example

NOTE: Some modern Linux distros that use pipewire audio will not render audio if the initial command that invokes the application is run as root or sudo. I am currently investigating a workaround.

In Linux nice and taskset cannot be invoked at the same time to launch an application.
You can launch TDM and use taskset to change the running process and likewise use renice to change priority
To launch with both priority and affinity at once, you can use "schedtool"
You will first need to use visudo to allow schedtool to run in sudo without a password
visudo will open an editor where you may add the following to the bottom of the file


%sudo ALL = ( ALL ) NOPASSWD: /usr/bin/schedtool,/usr/bin/nice

Then simply edit the "command field" for the properties page of your Darkmod launcher icon as follows:


sudo schedtool -R -p 50 -a 1,2,3,5,6,7 -e nice --17 su -c "/home/user/darkmod/thedarkmod.x64 +set r_shadows 1 +r_ssao 0" username

In the above example, priority (-p ) is set to -50 ( highest is -99 aka realtime ) and affinity ( -a ) is set to use real cores 2 to 4 and corresponding HT cores ).
Setting any application to -99 ( realtime ) priority is unsafe because it may be hard to exit or may lockup the OS trying to request resources.
schedtool has a "-n" flag for the nice value but it only supports positive nice values so we added the nice invoke after the "-e" ( execute flag ) and
made sure to su ( switch user ) to run thedarkmod.x64 as "username" ( eg whatever your username is ).
Finally, for good measure we have set shadows to stencil ( 1 ) and SSAO off ( 0 ) using standard Doom 3 style launch options for example syntax

Optimizing Dark Mod settings

The settings changes below generally can be changed independently of one another.

This means that if your want better settings in one aspect (such as AA) you can

try reducing quality or disabling another aspect (such as post-processing, image_downsize, v-sync, etc)



Reduce your resolution!

On older cards (or integrated graphics), Doom 3's TDM's render engine is very expensive for every per pixel drawn, and reducing the resolution will help the most.
For instance, at 1600x1200 the game needs to draw four times as many pixels as when running 800x600.
The result with 800x600 will not look as bad as one might think – but the frame rate improvements might make it much more playable.

Screen Resolution

On modern LCD, OLED, or MicroLED displays we advise against changing native resolution unless you know that your monitor
has an excellent internal resolution scaler. You should instead change your Render Scale as described in the next sub-section.
This section is more applicable to players using CRT or Plasma displays which naturally support a wide range of resolutions.
Even if you have a CRT or other legacy display tech, it may be better to change Render Scale to avoid legibility issues in Menus and HUD / GUI.

Note: While this section is mostly applicable to legacy displays, if TDM doesn't properly detect the native resolution of your modern display
you will still need configure it ( as shown below ) before adjusting Render Scale


If you cannot set the resolution you want in the video settings menu then enter it in Darkmod.cfg.

For the lowest possible resolutions, search down for these cvars first and replace them with the values shown:


 seta r_mode "-1"
 seta r_customHeight "640"
 seta r_customWidth "480"

alternate for wide screen monitors:

16:9 ratio

seta r_mode "-1"
seta r_customwidth "1280"
seta r_customheight "720"
seta r_aspectratio "1" 

See also: "Resolutions" (for a list of known configurations)


Lower your Render Scale (New 2.07)

The new "Render Scale" slider in 2.07 allows you to reduce the internal resolution that TDM will render to.
Lowering this has a similar performance impact as lowering your resolution and is the preferred way to improve performance via resolution change
One additional benefit is that lowering Render Scale does not impact Menu and HUD / GUI resolution


seta r_fboResolution "0.85"

Note: With the r_fboResolution CVAR, you can also do the opposite...
You can also render to a HIGHER THAN NATIVE resolution and the down-scaled output will look sorta like SSAA.
This is VERY expensive so we recommend going no higher than r_fboResolution 1.5.

Image Sharpening (New 2.09)

In 2.09 a new "Contrast Adaptive Sharpening" shader has been added and is enabled by default.
At the default Render Scale this simply improves the quality of textures.
When paired with lower Render Scale values it can substantially reduce the blur and make the screen look almost like full resolution!


seta r_postprocess_sharpen "1"
seta r_postprocess_sharpness "0.7"


Lower Anti-aliasing

The Dark Mod ships with standard "Multi-Sample Anti-Aliasing" ( MSAA ). This can reduce or eliminate jagged pixelization on geometry edges
by sampling sub-pixels near those edges and blending based on the average color. In practice this means that every visible geometry edge will get rendered
at a multiple of it's native resolution ( depending on your setting; eg. 2x, 4x, 8x, 16x ).
While this is still lower than increasing your screen resolution by the same factor, it can still increase the render workload by 50% or more in dense scenes.
If you needs the extra performance, you may need accept some aliasing ( jaggies ).
Since AA approximates a higher resolution, you may prefer disabling it in favor of choosing a higher resolution ( eg 1080p with 8xAA verses 1440p with no AA )
Incidentally, if you have GPU power to spare you can either use your GPU driver settings to force even higher quality modes such as SSAA that performs sub-sampling to every pixel
or configure TDM Render Scale ( r_fboResolution ) above native resolution for a similar effect (see previous sub-section ).


In the standard video settings, set AA to a lower value or 0


seta r_multiSamples "0" 

in Darkmod.cfg


Note: Nvidia's in driver FXAA anti-aliasing setting is substantially faster than the multi-samples settings in game.

Doom 3 is far less susceptible to AA artifacts so this may be an acceptable alternative especially if you are are running the game at native resolution (or nearly native).

AMD has MLAA which may also work well in the same way.

Depending on your graphics performance, it may be better to use a lower Render Scale and then use a higher AA value to retain clean edges.


Enable Multi-Core (new in v2.06)

In 2.06 the engine splits the Frontend and Backend into separate threads if you enable the Experimental "Multi-Core" setting in the Advanced Video settings GUI menu.


seta com_smp "1"

in Darkmod.cfg

In 2.09 this is enabled by default. The setting is no longer in the GUI.

Frontend Acceleration (new in v2.09+)

In 2.09 the engine frontend can submit models to the render backend via parallel jobs on multiple CPU cores.
This is similar to how Doom 3 BFG handles this.
Enable "Frontend Accelleration" in the Advanced Video settings GUI menu.


seta r_useParallelAddModels "1"

In TDM 2.11 this is enabled by default.

Also, you can increase the number of assigned cores:


seta jobs_numThreads "3"

( See the Affinity section above regarding cpu core management in relation to these options. )


Uncap FPS (New in v2.06)

Run one game tick per graphics frame, rather than fixed 60 ticks per second.

In 2.06 this is now a GUI option "Uncap FPS" in the Advanced Video settings GUI menu.

This not only makes the player camera move more smoothly but can also improve performance
since some drivers do not work well with the capped FPS design.


seta com_fixedTic "1"

in Darkmod.cfg

Note: Uncapping FPS is crucial to a smooth performance in most Linux environments.
The default capped design appears to have some flaw for frame timing against the native Linux timer
Uncapping FPS or running TDM capped under Wine will resolve this.
Native Doom 3 builds are also impacted by this problem so it predates The Dark Mod.
The Dark Mod cannot use com_preciseTic 0 as a workaround ( some users have used this to improve Linux Doom 3 frame timing )
This mode has the additional benefit of making video playback properly sync to audio.
The Dark Mod team has worked hard to ensure that the uncapped mode is bug free at high FPS values but if you wish to
reduce the risk of high-FPS related bugs, set your Max FPS ( com_maxFPS, see below section ) to 75 or less.


Max FPS (New in 2.08 )

In 2.08 you can define the max FPS via the Max FPS setting in the Advanced Video settings GUI menu.


seta com_maxFPS "90"

in Darkmod.cfg

Shadow Settings

Change Shadow Mode (New 2.07)


In TDM 2.07 we offer two different "Shadow Implementation" options in the GUI.

  • Maps (Shadow Maps)
  • Stencil (Stencil Shadow Volumes)


Shadow Maps can perform better in scenes with fewer but larger light sources and less small shadow casters.
Shadow Map performance depends on the amount and speed of VRAM on you GPU
Most of the calculations are done on the GPU in this mode so if you have a weak CPU and mid-range GPU ( usually old desktops ) this mode is preferred
Stationary Lights + Big areas + Big Lights = Higher FPS with Maps

Stencil can perform faster for systems with powerful CPU's and weak GPU's ( usually laptops ) because it mostly relies on fillrate.
Stencil soft shadows sometimes run faster because they don't do calculations for "distance to blocker" ( contact hardening )
Lots of small moving lights + confined spaces = Higher FPS with Stencil

Maps mode:


seta r_shadows "2"

Stencil mode:


seta r_shadows "1"

in Darkmod.cfg

Lower or Disable Soft Shadows (New in v2.06)

Shadow Quality determines how many gradients ( color bands) that soft shadows use.
In the advanced videos settings menu set the Soft Shadows quality slider to low or off


seta r_softShadowsQuality = 0

in Darkmod.cfg


In the advanced videos settings menu set the Shadow Softness slider to make shadows softer without increasing the quality level


seta r_softShadowsRadius 2.0

in Darkmod.cfg

You can experiment with values between 1.5 and 3.5 or more.

Single Pass Shadow Maps

Rather than calculating all shadows one-at-a-time, all shadow casting is calculated in one pass for every light. THIS CAN OFFER SUBSTANTIAL PERFORMANCE IMPROVEMENT


seta "r_shadowMapSinglePass "1"

in Darkmod.cfg

2.10 Issues:

  • The old backend does not work with this mode ( r_useNewBackend 0 )
  • For some users, screenshots will be missing shadows for func_static geometry if this is enabled
  • The screen-shot issue is resolved in 2.11+

NEW - This is enabled by default in 2.12

Shadow Map Size

The larger the Shadow Map texture, the more detail and less artifacts you have further away from the light center or for small objects.
Conversely, smaller Shadow Map textures perform much better (use less resources).
Since stretching a low resolution shadow texture over a large area naturally causes bi-linear blurring,
some players prefer lower resolution maps instead of increasing the quality and softening radius which produces less blur
due to realistic contact hardening simulation in the light shaders.


seta r_shadowMapSize "384"

You can also increase this to reduce light leaks from the r_shadowMapCullFront optimization.
On balance enabling that optimization may offset the pitfalls of a bigger shadow map.
You can experiment with shadow map sizes that are slightly larger than 1024 such as 1280 or 1440.
This setting can also be used to reduce the impact of Volumetric Lights because they always use Shadow Maps regardless of Shadow Mode

Max Light Size

The larger the light, the more Shadow Map resolution you need (see Shadow Map Size).
There are some lights so large that Shadows will never look good without insane texture sizes. You can set a threshold to say if lights are bigger than X, use Stencil Shadows.


seta r_maxShadowMapLight "1500"

Lower or Disable Ambient Occlusion (New in 2.08)

In the advanced video settings menu make sure that Ambient Occlusion is set to low or off.


seta r_ssao "1"

or


seta r_ssao "0"

in Darkmod.cfg

SSAO Radius

You can widen the SSAO radius to improve the appearance or shrink it to improve performance


seta r_ssao_radius "24"

Reduce Color Depth (New in 2.08)

In TDM 2.08 the default Frame Buffer was upgraded to use 64-bit color to reduce color banding.
Some GPU's have poor support for this format or render much slower. Consider reverting to 32-bit.
Change Color to 32-bit under the Advanced Video settings menu or:


seta r_fboColorBits "32"

in Darkmod.cfg


Disable Bloom

In the advanced video settings menu make sure Bloom is disabled


seta r_bloom "0"

in Darkmod.cfg

TDM versions older than 2.08

Disable Postprocess in the GUI or set:


seta r_postprocess "0"

in Darkmod.cfg

Run The Dark Mod in fullscreen

Running Darkmod in windowed mode might be quite a bit slower than fullscreen mode.

One reason for this is that windowed mode is sometimes forced to V-sync. ( See Disable V-sync )


seta r_fullscreen "1"

in Darkmod.cfg


In 2.08 you can choose between Windowed, Fullscreen, and Borderless Windowed. Fullscreen is the lowest latency option.

Fullscreen Windowed in Modern Windows Versions

It has become widely recognized that v-sync is a source of input delay and forcing it for both Windowed and Fullscreen Windowed modes
is not optimal. The latest Windows versions no longer force v-sync on Fullscreen Windowed applications but if you encounter any issues
or have an older Windows release you should be able to force it off via your driver application profile settings:

If you have a Nvidia card

  • Open de Windows start menu and type: Nvidia control panel
  • Click Manage 3D settings, on the left pan
  • Under "I would like to use the following 3D settings" scroll down until you see "Vertical sync."
  • Select Vertical sync choose "Force off" or " disable" ... from the drop down.

For AMD

  • Click the Start button or Windows icon.
  • Type "Catalyst control center" in the search bar.
  • Press Enter on your keyboard.
  • Click Gaming.
  • Under "3D Application Settings" scroll down to "Wait for vertical refresh."
  • Move the slider down to the side that says "Performance" so the text beneath it says Always Off.

The above won't be necessary for users with variable refresh displays and video cards with variable refresh support such as G-Sync or Freesync.


Disable V-sync


In the standard video settings, disable vsync

seta r_swapInterval "0" 

in Darkmod.cfg


NEW INFO!!!!

Setting r_swapInterval "-1" enables "Adaptive Vsync" which only performs the sync action when you are at or above refresh rate.
This has much less performance impact.

NEWER TDM 2.10 has an Adaptive Vsync option in the Video Settings GUI



The Dark Mod has extremely variable FPS compared to modern titles due to it's substantial CPU heavy renderer.

We strongly recommend disabling V-Sync altogether or forcing variable V-sync tech such as G-Sync, Freesync, Fast-Sync or Enhanced Sync (new) in your driver settings.

Force Refresh Timing

(Related to vsync)

Some newer video cards may not properly report the refresh rate to this engine (typically digital output like DVI, HDMI, or DisplayPort) This can cause lag, stutter, and uneven frame pacing.

create an autoexec.cfg in your darkmod directory and set:


seta r_displayRefresh "60"

(Obviously increase to match your available mode.)

Set Object Detail to Low

In the advanced video settings menu lower the Object detail slider below normal

seta tdm_lod_bias "0.5"

in Darkmod.cfg (see also Object_detail )


Field of View Decrease

Note that this setting might occasionally produce odd effects such as a grabbed object seems to move a little on release.

You can get a performance improvement if you decrease the field of view. By default this is 90 degrees but you might try entering in the console:

g_fov 85

or

seta g_fov "85"

in Darkmod.cfg

In addition, if you are playing a mission that is too good to miss and reach a very low performance area which is almost unplayable on your machine,
you might consider setting the field of view extremely low temporarily to get you through then restore to 90 later...

g_fov 50

or bind a toggle

bind "z" "toggle g_fov 50 90";

in Darkmod.cfg so you can tap a key to go between FOV ranges.

See Toggle Settings in Realtime

Note from Fidcal: I have played comfortably on g_fov 75 and even think perhaps it makes nearby objects more realistically close so you can get right up to a table, etc.
Not noticed any problem with restricted view.

Lower Anisotropic Filtering

In the standard video settings, lower or disable AF


seta image_anisotropy "0" 

in Darkmod.cfg

Note: This has very little performance benefit for most GPU hardware.


This is also one of the few graphic settings that can be adjusted without requiring a vid_restart or restarting the engine.

NEW: In 2.09 if you change Anisotropic Filtering and have "r_useBindlessTextures 1" set (default) the game may stutter
when you return from the menu because it must rebuild all the textures.
To avoid this, set "r_useBindlessTextures 0" then restart the game and test your preferred AF mode then once you have found your
performace-to-image quality sweet spot set "r_useBindlessTextures 1" and restart TDM

NEW 2: In 2.11, bindless texture support was removed due to multiple issues with AMD drivers.
You should be able to change anisotropic filtering settings in the GUI without encountering stutters.


Set the ambient shading to "Faster" ( OBSOLETE in 2.09+)

Inside the settings, change the ambient rendering method to "Faster".

seta tdm_ambient_method "1"

in Darkmod.cfg

(Note: Some preliminary tests in v2.05 show that the Enhanced Ambient is now faster than the "fast" texture based Ambient.) (Note: This setting has been removed in 2.09 )

Set the interaction.vfp to "Standard" (OBSOLETE in 2.09+)

In the video settings menu, change the interaction shader to Standard. Lighting will not look as good, but you may gain a few frames per second.


seta tdm_interaction_vfp_type "0"

in Darkmod.cfg

In 2.08 this setting is


seta r_interactionProgram "0"

This setting doesn't work in 2.09+ It is a stub cvar that does nothing.
If you wish to test interaction shaders, create a glprogs folder in your mission folder with new shaders having the same name as the default ones.
You can keep the default shaders in the same folder in renamed form then swap filenames and execute reloadGLSLprograms to compare changes.
For a more clean comparison also set g_stopTime to prevent dynamic light changes

Slow loading times

OBSOLETE! TDM 2.10 has very fast loading times!
The only setting that might improve loading times is "seta image_preload 0"

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.

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 in-game since you will now be using uncompressed textures.

 seta image_useNormalCompression "0"
 seta image_useCompression "0"
 seta image_preload "0"

New 2.10+ cvars ( defaults ) for fast loading times:

 seta image_levelLoadParallel "1"
 seta image_useTexStorage "1"
 seta image_mipmapMode "0"

In 2.10 the RXGB normal map compression format has been replaced the higher quality RGTC format.

Note: Disabling compression may lead to Malloc errors due to memory consumption.

You may be able to compensate by setting image_downsize options or use image_downsize instead of disabling compression. Image Downsizing

See Malloc Failure Errors


The game is very slow!

Note: The advised performance defaults below should mostly already be set by default on upgrade.
Please consider deleting darkmod.cfg after upgrading to restore these defaults.

If you get less than 10 FPS, or the game even stutters, please try this:

Look into your Darkmod.cfg inside your darkmod folder and check that the following settings are like shown below:

 seta image_usePrecompressedTextures "1"
 seta image_useNormalCompression "1"
 seta image_useAllFormats "1"
 seta image_useCompression "1"
 seta image_preload "1"
 seta r_useCachedDynamicModels "1"
 seta r_useShadowVertexProgram "1"
 seta r_useEntityCulling "1"
 

Note: r_useShadowVertexProgram no longer exists in TDM. All shadow modes use GPU vertex operations.

OBSOLETE 2.09 performance defaults

 seta r_useMultiDrawIndirect "1"
 seta r_useBindlessTextures "1"

2.11 new performance defaults ( in addition to the standard performance defaults above )

 seta r_useNewBackend "1"
 seta r_modelBvhBuild "1"
 seta com_smp "1"
 seta r_useParallelAddModels "1"
 seta r_usePersistentMapping "1"
 seta com_useMinorTics "1"
 seta com_fixedTic "1"
 seta com_maxFPS "166"

2.12 new performance defaults ( in addition to the standard performance defaults above )

 seta r_useLightPortalFlow "2"
 seta r_useLightPortalFlowCulling "1"
 seta r_softShadowsMipmaps "1"
 seta r_useEntityScissors "1" 
 seta r_animationBounds "1"
 seta r_useNewRenderPasses "1"
 seta r_shadowMapSinglePass "1"


Note: 2.12 r_useNewRenderPasses replaces r_useNewBackend
In 2.10 and newer you can control both the standard resolution and the "renderscale" whereas
2.09 required you to change renderscale for lower the resolution. It is still preferable to lower renderscale unless you have a CRT monitor

Frame Memory

New in TDM 2.08

r_frameIndexMemory 

and

r_frameVertexMemory

Increasing frame memory may help avoid crashing or slow-down when a scene suddenly requires more resources.
If you are VRAM limited, consider lowering texture quality ( image_downsize ) or resolution scale before increasing these.

Lightgem Calculation Optimizations


The Lightgem used to be a very taxing calculation because it required the entire scene to be rendered to an off-screen
image that was then slowly passed to parser code to comb all pixels for the brightest value.

As of TDM 2.05 and newer, only shadow casting geometry is rendered during the Lightgem calculation and the
pixels are read directly from an "OpenGL Buffer Object" at high speed.

Further optimizations after 2.05 include:

  • Moving the calculation to it's own Thread and utilizing SMP
  • Making the calculation part of the native Doom 3 sub-view system
  • Excluding Lightgem calculations from many phases of the render system that are not applicable
  • Inheriting optimizations from the overall renderer ( Improving TDM render speeds, improves the Lightgem render speed )


This means that the old configurations to reduce the impact of Lightgem calculation are mostly irrelevant
except for niche scenarios (such as 120FPS+ gaming), very old hardware ( Single Core CPU's ), or very old TDM versions ( older than 2.07).

Lightgem interleaved calculation

By default lightgem calculation occurs every frame. You can set lightgem calculation to happen only once
per several frames by setting tdm_lg_interleave console parameter to values higher than 1.
For example, typing:

tdm_lg_interleave 3

in console tells TDM to recalculate lightgem value every third frame.

This tweak can increase average FPS, but it often produces noticeable stuttering, especially on slow machines when your FPS is below 25 to 30FPS.


Lightgem interleave minimum FPS ( New in 2.05)

In TDM 2.05 there is a new tdm_lg_interleave_min cvar that allows you to set a cutoff point for FPS below which the Lightgem Interleave optimization takes effect.
It is set to 40 by default. If your FPS goes below 40 then tdm_lg_interleave returns to the default value of 1 internally to prevent stutter.
Depending on your sensitivity you may wish to increase this to 50 or more.


tdm_lg_interleave_min 40


As the cost of lightgem calculation is (also) substantially lower in v2.05 and newer, you may be able to set this to 1 for most missions.

In testing, the only mission I found that suffered from "tdm_lg_interleave ( > 1) stuttering" was "Penny Dreadful 3: Erasing the Trail".
For that mission, I set tdm_lg_interleave_min to 50 to cure the stutter.
This setting can also be used to boost already high FPS values for the new unbounded FPS options ( com_FixeTic 1 ).
(eg. If you have 90FPS set tdm_lg_interleave to 7 and tdm_lg_interleave_min to 75 to attempt a push towards 120FPS)

In 2.06 with the lightgem calculated on a different thread, this can likely stay at 1 regardless of how low the FPS gets.

Weak Lightgem (Not Recommended)

Setting:


seta tdm_lg_weak "1" 

in Darkmod.cfg will disable the renderer based lightgem and use a simpler math-based solution.
It's a far less accurate lightgem but may allow weaker systems to play the game as a last resort.


Disabling standard graphics features

At the cost of some pretty severe scene quality, you can disable a number of independent graphic features

that are non-essential to play.

Texture Based Tweaks

These changes reduce or remove texture data to improve performance on GPU's with low VRAM or low memory bandwidth

Image downsizing

TDM can automatically reduce texture resolution for all 3 supported texture types; diffuse,
normal (bump), and specular. Systems with very low quantities of VRAM or low memory bandwidth benefit from this change.

In Darkmod.cfg, set image_downSize to 1 and then set a limit with image_downSizeLimit, e.g., "image_downSizeLimit" "256".


seta image_downSize "1"
seta image_downSizeLimit "256"

This reduces texture memory requirements and may completely alleviate hard drive thrashing. There are similar cvars for bump and specular maps as well.

Example: Downsize Normal Maps


seta image_downSizeBump "1"
seta image_downSizeBumpLimit "256"

Example: Downsize Specular maps


seta image_downSizeSpecular "1"
seta image_downSizeSpecularLimit "64"

Image Downsizing verses Lower Resolution


Higher resolutions require larger frame buffers thus more VRAM, likewise higher resolution textures also consume VRAM
This leads to the an interesting decision on visual tradeoffs.

When you lower the resolution substantially, the overall visuals of the scene are roughly preserved in general way
but the scene becomes sort of impressionistic, filled with artifacts, and somewhat hard to read

When you instead lower texture resolution to the extreme, the scene remains sharp but takes on a more stylized \ cartoon aspect
because all these high fidelity 3D objects are coated in blurry images. It makes TDM look like a beefed-up Nintendo 64 game.
If you set image filtering to Nearest mode, TDM instead looks like a strange offset of Minecraft

In this case, there is no objective winner.

Some people actually prefer the low-texture options to the native presentation due to the interesting style or nostalgic appearance.
Whereas others will consider the extreme style variance to violate the immersion of the scene and would prefer to suffer with less
scene fidelity for the sake of cohesion.


Thread:

https://forums.thedarkmod.com/index.php?/topic/19498-image_downsize-in-206/



Disable Specular Maps

Specular gives materials their shine. This option will make all surfaces shine-free.

Note: This may not work with the Enhanced Ambient


seta r_skipSpecular "1"

in Darkmod.cfg

Disable Normal Maps

The main detail attribute for textures in Doom 3 \ Darkmod is the Normal Map.

If you disable this your game will become really ugly.


seta r_skipBump "1"

in Darkmod.cfg

Disable all Ambient Surfaces

Related to skipping particles, r_skipAmbient will get rid of any non-lit* particles
(*most particles are additive blends and don't react to light)
along with any other surfaces that don't change based on illumination (most decals, additive glowing windows, etc.).


seta r_skipAmbient "1"

in Darkmod.cfg

Light and Fog tweaks

These tweaks reduce or eliminate the impact of fogs and volumetric light effects which are often heavier than normal lights.

Disable Volumetric Lights (New in v2.11)

Volumetric lights force shadow map rendering for their light radius ( per light ).
If you have a GPU with low VRAM or poor VRAM bandwidth ( less than 128-bit bus, integrated graphics, etc),
it may be worthwhile to disable them or reduce your default shadow map resolution ( r_shadowMapSize ).

To disable volumetrics entirely, set:


seta r_volumetricEnable "0"

in Darkmod.cfg

Disable Volumetric Shadows

Volumetric Lights force expensive Shadow Maps in Stencil Mode. You can disable that via


seta r_volumetricForceShadowMaps "0"

in Darkmod.cfg

Lower Volumetric Samples

The more samples the smoother the volumetric lights at the cost of lots of performance.
Try lowering the samples. Also try changing the r_volumetricBlur and r_volumetricDither values.


seta r_volumetricSamples "16"

in Darkmod.cfg

Disable BlendLights


seta r_skipBlendLights "1" 

in Darkmod.cfg

Disable Fog


seta r_skipFogLights "2" 

in Darkmod.cfg

As of 2.08 and newer there are several modes of fog disable behavior. Mode 1 only disables it for opaque objects (etc)

Particle Tweaks

Particles mostly impact CPU performance but can impact the GPU due to lots of alpha operations and overdraw

Disable Soft Particles ( New in 2.03 )

The new Soft Particle effects in v2.03 and newer use a little more GPU than the previous particles.

This is offset by the fact that v2.03 and higher don't render particles during the lightgem calculation.

Still, if you want an extra boost then set:


seta r_useSoftParticles "0"

in Darkmod.cfg

Disable Particles

This will seriously mar your image quality. Flames, glares, and smoke will all be gone.


seta r_skipParticles "1"

in Darkmod.cfg .

Entity Shadow Tweaks

Disable Player Shadow

The player shadow slightly reduces performance. It has no game effect at all (not seen by AI for instance) apart from atmospheric effect so if you want to disable it enter in the console:

g_showplayershadow 0

Or, in Darkmod.cfg (see above) change the following line from "1" to "0":

seta g_showplayershadow "0"

This is the default setting as of TDM 1.02 and newer.

Disable Player Lantern Shadow

You may notice a drop in performance while using the player lantern.

Add "noshadows" "1" to entitydef light_lantern_moving in tdm_playertools_lantern.def and this stops the player lantern casting shadows.
This helps improve performance slightly when using the lantern.

Disable Sky

(New in v2.05) Pitch black sky with no clouds, Moon, or stars


seta g_enablePortalSky "0"

in Darkmod.cfg

Disable Lip Sync

AI will not play lipsync animations


seta tdm_ai_opt_nolipsync "1"

in Darkmod.cfg

OBSOLETE Drop in Frame Rates when Viewing Water

Some players have reported a drastic drop in performance when an agitated water surface is in view. (This on a Radeon card.)
Try entering this in the console. It disables the water visible surface effects but at least it might let you play normally...


 seta r_skipPostProcess "1"

or


seta r_postprocess "0"


seta r_bloom "0"

You can also set a key-bind to toggle this instead:


bind "z" "toggle r_bloom 0 1"

See Toggle Settings in Realtime

See also Underwater performance poor

TDM 2.12 has improved underwater performance. It no longer uses the postprocess pipeline.

Experimental Features

These settings may offer some performance benefits with caveats \ bugs.

Shadow Map Cull Front

The default shadow map mode calculates shadows for both polygons that are on the side facing
the light (front) and the side facing away from the light (back).
This mode improves performance by only calculating the back side shadows.
This mode is almost production ready. It actually fixes or improves some visuals that the default mode produces
but it has some glaring artifacts such as light leaks where surfaces meet in corner areas.
In most missions, you will not be able to tell the difference other than the improved performance


seta r_shadowMapCullFront "1"

Alpha Tested Shadow Maps ( New 2.12 )

Shadow Maps can cast shadows through transparent parts of textures. This is not currently possible with stencil shadows.
To enable this feature:


seta r_shadowMapsAlphaTested "1"

in Darkmod.cfg


Note: Be advised that this consumes more performance so if this is enabled then consider disabling it if you are struggling with performance

OBSOLETE Single Pass Light Rendering ( 2.09 )


THIS OPTION DOES NOT WORK IN 2.11

Similar to modern "Forward+" rendering, all lights and shadows are calculated beforehand and rendered in one pass.


seta r_shadowMapSinglePass "2"

in Darkmod.cfg

You have probably noticed that this uses the same CVAR that single pass shadows uses.
Single Pass lighting requires Single Pass shadows.

This mode (2) does not seem to improve FPS for some Nvidia hardware.
This is probably because of the Nvidia's tiling (deferred rendering) hardware optimizations.

Use BFG style Portal Culling (new in v2.06)

If you have a system that works well with Multi-Core ( com_smp 1) then you may consider enabling r_useAnonReclaimer to reduce cache thrashing.

2.07 and newer


seta r_useAnonReclaimer "1" 

2.06


seta r_useBfgPortalCulling "1"

in Darkmod.cfg



Skip Dynamic Shadows

Only render shadows from Stationary lights. This will break missions where players might need to hide in a moving shadow.


seta r_skipDynamicShadows "1"

Lower Sound Quality

Force 22khz

2.06: Do not use this optimization. It is known to cause issues with loading missions on some OpenAL hardware:
http://bugs.thedarkmod.com/view.php?id=4814

(This is fixed in 2.07)

You can force 22khz audio processing to reduce the CPU overhead of audio processing.

Obviously, EAX effects will increase CPU load for audio so you should consider disabling

those before lowering audio quality. If normal audio plays fine but EAX causes performace,

this change might give you a boost while EAX is enabled.


seta s_force22kHz "1"

Disable EFX reverb (new 2.06)

The new EFX audio option (equivalent to EAX) has some impact on mission performance, due to additional reverb calculation by the CPU.
Disable this option for extra performance. Especially if you get big stutter or lockup events opening doors from indoor to outdoor areas.
This option, disabled by default, is toggled with the main menu's "Audio/OpenAL EFX".

Turning on this option makes no performance or audio difference if the mapper didn't include an EFX file. For more about that, see Setting Reverb Data of Rooms (EAX).

Gameplay Performance Tips

If you have done everything else you can and performance is still poor then one or two things you might do in game to help:

  • Revert to 2.03 Search behavior
 
seta tdm_ai_search_type "1"
The new AI "hiding spot" routines in 2.04 (and newer) are more CPU intensive that 2.03's search method

  • Close all doors after you have passed through. Generally the game has to process both areas until you close the door if the doorway is still in sight.
  • Kill or KO every AI you can. You might not like to play that way but generally, AI still hog resources even out of sight (depending on how set up in the game.)
  • Avoid alerts. A dozen guards searching for you will really slow things down on a low-end machine.
  • Try to look down at the ground when moving along. Gazing up at a grand vista will slow you down. Best to do your gazing while standing still.

Configuration Based Issues

A few configuration changes that players apply for performance benefit can cause unexpected problems.

A Warning about cm_backFaceCull

Some users have reported AI pathfinding and tread-milling issues with this enabled. While this can be the fault of poor map design or monsterclip placement,
one thing that can cause this is the performance cvar:


seta cm_backFaceCull "1"

This cvar does improve performance but it is not worth the hassle in most cases.
We recommend disabling it (cm_backFaceCull "0" ) unless you know the mission you're playing has been tested with it enabled.

Blurry Briefing and Menu Screens

  • Obsolete info. This is fixed in TDM 2.05 (and later.)

If you get blurry briefing and menu screens then in Darkmod.cfg make sure you do NOT have image_downSize 0.

Instead set it to 1. But see also Image Downsizing as there is a patch available to allow

image_downsize without making menus blurry.

Related FXAA

( 2.07+ )

If you disable in-game AA in favor of FXAA in your driver settings, text will be a little blurrier. This is a known problem with FXAA in general.

See also

| Tweakguides Doom 3

See also the FAQ.