Performance Tweaks: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
(393 intermediate revisions by 2 users not shown)
Line 2: Line 2:


== Show FPS ==
== Show FPS ==


First, you can check how many {{abbr|FPS|frames per second}} are achieved by opening the console with {{key|Ctrl}}+{{key|Alt}}+{{key|~}} (tilde, {{key|^}} on German keyboards) and type:
First, you can check how many {{abbr|FPS|frames per second}} are achieved by opening the console with {{key|Ctrl}}+{{key|Alt}}+{{key|~}} (tilde, {{key|^}} on German keyboards) and type:
Line 7: Line 8:
  com_showFPS 1
  com_showFPS 1


== Optimizing the OS performance ==
==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 {{key|Ctrl}}+{{key|Alt}}+{{key|~}} (tilde, {{key|^}} on German keyboards) and type:
 
<pre>
 
g_showviewpos 1
 
con_noPrint 0 
 
</pre>
 
== Stop Time ==
 
Moving and Thinking can impact performance in unexpected ways.
<br>When comparing graphical settings it might be best to "Stop Time" so that the entire scene is frozen
<br>and the FPS changes due to '''graphics options''' can be more easily compared.
<br>Open the console with {{key|Ctrl}}+{{key|Alt}}+{{key|~}} (tilde, {{key|^}} on German keyboards) and type:
 
<pre>
 
g_stopTime 1
 
</pre>
 
 
<font size="5">
 
== '''Optimizing the OS performance'''==
</font>
 
=== Linux UEFI Secure Boot ===
 
With Secure Boot enabled in the BIOS, most Linux distros will fallback to (slow) open drivers
<br>and wont have access to most hardware acceleration features. Disable Secure Boot for the best performance.


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


Programs running in the background might either eat up memory that is needed for Doom3, and thus cause swapping to the hard disk, or they might consume CPU time or other resources.  
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.  


This can cause either general slowdowns or ''hickups'' during game play.
This can cause either general slowdowns or ''hickups'' during game play.
Line 17: Line 54:
{{clear}}
{{clear}}


=== Ensure that Programs are the main priority in the OS ===
To begin the process, type sysdm.cpl in Run box ({{key|Windows}} + {{key|R}}) and hit {{key|Enter}} to open the System Properties.
Select the Advanced tab and under Performance, {{LMB}} click on Settings.
In the Performance Options box, select the Advanced Tab again.
You will see a section Processor Scheduling
Choose "Programs" then {{LMB}} click Apply.
{{clear}}
<font size="3">
=== White-list TheDarkMod.exe in Security Software ===
=== White-list TheDarkMod.exe in Security Software ===
</font>


Make sure that Windows Defender or Anti-Virus, Anti-Spyware, etc aren't constantly scanning or interacting
Make sure that Windows Defender or Anti-Virus, Anti-Spyware, etc aren't constantly scanning or interacting
Line 23: Line 76:
with TheDarkMod.exe. Add it to your security white-list.
with TheDarkMod.exe. Add it to your security white-list.


=== Set TheDarkMod to High Priority ===
==== Windows 10 Granular Security Options ====
 
With new attacks like Meltdown and Spectre, Windows 10 has added CPU architecture specific security fixes.
<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://docs.microsoft.com/en-us/windows/security/threat-protection/windows-defender-exploit-guard/customize-exploit-protection
 
and disable the security options you feel are excessive.
 
<font size="4">
 
=== '''Priority and Affinity''' ===
</font>
 
==== 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.)''
 
* {{key|Alt}} + {{key|Enter}} to exit fullscreen
* {{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:
 
* {{RMB}} Right-click your Desktop shortcut to TheDarkMod and select Properties
* On the Shortcut Tab enter the following into the "Target:" field
 
<pre>
 
cmd.exe /c start "TheDarkMod" /High "C:\darkmod\TheDarkMod.exe"
 
</pre>
 
(Assuming you installed into C:\darkmod)
 
* Then {{LMB}} click the Change Icon button and browse for the Darkmod.ico icon in your darkmod install path
* {{LMB}} 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
* Launch TheDarkMod
* {{key|Alt}} + {{key|Enter}} to exit fullscreen
* {{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.)''
* {{key|Ctrl}} + {{key|Alt}} + {{key|Del}} to open your Task Manager
* {{key|Ctrl}} + {{key|Alt}} + {{key|Del}} to open your Task Manager
* Right-click on TheDarkMod.exe the choose "Go to Details"
* Click the Performance Tab and look at the CPU display to see which cores are the least busy
* (On the details\processes pane) Right-click on TheDarkMod.exe and mouse-over Set Priority and choose High
* (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
* {{key|Alt}} + {{key|Enter}} to return to fullscreen


As with Priority you can set Affinity in your shortcut.
Example Target:
<pre>
cmd.exe /c start "TheDarkMod" /affinity 1 "C:\darkmod\TheDarkMod.exe"
</pre>


Note:
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.


''You can also either "End Task" on processes that you know you don't need or set them to "below normal" or "low" priority.''
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.
 
==== Combined Example ====
 
You can include both priority and affinity switches in your shortcut
 
<pre>
 
C:\Windows\System32\cmd.exe /c start "TheDarkMod" /High /affinity 5 "C:\darkmod\TheDarkMod.exe" +r_softShadowsRadius 2.5 +r_useEntityCulling 1


''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"''
</pre>


''If you are unsure what a process does, do not change it until you've researched the process.''
Start TheDarkMod with high priority on Cores 0 and 2 (real cores) and add two '''launch cvars''' ( See [[#Conventions|Conventions]]).


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


=== Ensure that Programs are the main priority in the OS ===
use Darkmod.cfg unless you wish to make multiple launchers for testing (etc).


To begin the process, type sysdm.cpl in Run box and hit {{key|Enter}} to open the System Properties.
==== Process Management Note ====


Select the Advanced tab and under Performance, click on Settings.  
''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 Performance Options box, select the Advanced Tab again.
''Moving these low priority processes to a different core via affinity is also an option.''


You will see a section Processor Scheduling
''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"''


Choose "Programs" then click Apply.
''If you are unsure what a process does, do not change it until you've researched the process.''


{{clear}}
{{clear}}
Line 61: Line 211:
(If you are willing to sacrifice you desktop visual behavior and effects for better TDM performance. Note: This can be reverted.)
(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 and hit {{key|Enter}} to open the System Properties.  
To begin the process, type sysdm.cpl in Run box ({{key|Windows}} + {{key|R}}) and hit {{key|Enter}} to open the System Properties.  


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


In the Performance Options box, select the Visual Effects tab.
In the Performance Options box, select the Visual Effects tab.
Line 71: Line 221:
{{clear}}
{{clear}}


=== Try different driver versions ===
<font size="4">


Sometimes updating to the latest driver version or reverting to an older version
=== '''Driver Considerations''' ===
</font>
 
''(IdTech4) The Dark Mod is based on OpenGL 2.0. 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.''


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


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


See also [[#Upgrade_your_BIOS|Upgrade your BIOS]]
==== (AMD\ATI) Disable Catalyst AI ====


=== (AMD\ATI) Disable Catalyst AI ===
2018: The latest Radeon Crimson and Adrenalin Drivers:


(This is probably deprecated.)
Surface Format Optimization = OFF


[[FAQ#Disable_Catalyst_AI_in_recent_AMD_ATI_drivers|Disable Catalyst AI in recent AMD Drivers]]
[[FAQ#Disable_Catalyst_AI_in_recent_AMD_ATI_drivers|Disable Catalyst AI in recent AMD Drivers]]


=== (AMD\ATI) Rename the executable ===
==== (AMD\ATI) Rename the executable ====


Most modern drivers have built-in profiles for the executable names of commercial games.
Most modern drivers have built-in profiles for the executable names of commercial games.
Line 107: Line 263:
Prey.exe
Prey.exe


=== (Nvidia) Disable Index Buffers ===  
==== (Nvidia) Optimus Laptop wont use your Nvidia GPU ====
 
See also: [https://nvidia.custhelp.com/app/answers/detail/a_id/2615/~/how-do-i-customize-optimus-profiles-and-settings%3F]
 
Many Laptops now have the ability to use the GPU that is built into the CPU when not "gaming".
<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.
 
* 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
 
[[Image:Nvidia_Profiles.jpg|600px]]
<br><br><br><br>
 
{{clear}}
 
==== (Nvidia) Disable Index Buffers ====  


<pre>
<pre>
Line 117: Line 294:
in Darkmod.cfg
in Darkmod.cfg


(Note: This tweak may not work with upcoming changes to The Dark Mod so revert it before upgrading)
(Notes: This tweak is the default in v2.05 and newer)


{{clear}}
{{clear}}


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


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


On the Extended Tab locate "Nvidia Streamer Network Service"
On the Extended Tab locate "Nvidia Streamer Network Service"


Right-click it and choose "Stop"
{{RMB}} Right-click it and choose "Stop"


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


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


Do the same for "Nvidia Streamer Service"
Do the same for "Nvidia Streamer Service"


{{clear}}
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.




Line 144: Line 325:


''recognize or know is safe to disable.''
''recognize or know is safe to disable.''
'''NEW INFO:'''
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.


{{clear}}
{{clear}}


=== (Nvidia) Disable Threaded Optimizations ===
 
 
 
{{clear}}
 
==== (Nvidia) Disable Threaded Optimizations ====


Open Nvidia Control Panel ->
Open Nvidia Control Panel ->
Line 159: Line 351:
This can also reduce or eliminate driver crashes or rendering anomalies.
This can also reduce or eliminate driver crashes or rendering anomalies.


<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>
==== 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]]




{{clear}}
{{clear}}


== Optimizing Dark Mod settings ==
<font size="5">


The settings changes below generally can be changed independently of one another.
== '''Optimizing Dark Mod settings''' ==
</font>


This means that if your want better settings in one aspect (such as AA) you can
''The settings changes below generally can be changed independently of one another.''


try reducing quality or disabling another aspect (such as post-processing, image_downsize, v-sync, etc)  
''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)''


=== Run TheDarkMod in fullscreen ===
<font size="4">
=== '''Conventions''' ===
</font>


Running TheDarkMod in windowed mode might be quite a bit slower than fullscreen mode.
Most of the changes demonstrated in this article are via "Console variables" [[Cvars_in_The_Dark_Mod|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.


<pre>
<pre>
seta r_fullscreen "1"
 
seta r_softShadowsRadius "2"
 
</pre>
 
==== 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 {{key|Ctrl}}+{{key|Alt}}+{{key|~}} (tilde, {{key|^}} on German keyboards) and type:
 
<pre>
 
r_softShadowsRadius 2
 
</pre>
 
<s>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.</s>
 
NEW: As of TDM 2.07, almost all conventional settings can be altered without restarting the engine!
 
See also: [[#Toggle_settings_in_realtime|Toggle settings in realtime]]
 
{{clear}}
 
==== Launch Options ====
 
You can also add the value as part of your of your target in your shortcut:
 
Example with two cvars:
 
*  {{RMB}} Right click your Desktop shortcut to TheDarkMod and select Properties
*  On the Shortcut Tab enter the following into the "Target:" field
 
<pre>
 
"C:\darkmod\TheDarkMod.exe" +r_softShadowsRadius 2 1 +r_useEntityCulling 1
 
</pre>
 
(Assuming you installed into C:\darkmod)
 
* Then {{LMB}} click the Change Icon button and browse for the Darkmod.ico icon in your darkmod install path
* {{LMB}} Click Apply
 
See also [[#Set_TheDarkMod_to_High_Priority|Set TheDarkMod to High Priority]]
 
=== '''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.
 
<pre>
 
seta com_smp "1"
 
</pre>
</pre>


in Darkmod.cfg
in Darkmod.cfg


{{clear}}
=== '''Uncap FPS (New in v2.06)'''===
Run one game tick per graphics frame, rather than fixed 60 ticks per second.
(Limited to 166hz)
In 2.06 this is now a GUI option "Uncap FPS" in the Advanced Video settings GUI menu.
 
<pre>
 
seta com_fixedTic "1"
 
</pre>
 
in Darkmod.cfg


<font size="4">


=== Disable Post-Processing ===
=== '''Lower or Disable Soft Shadows (New in v2.06)''' ===
</font>


In the advanced video settings menu make sure post-processing is disabled
In the advanced videos settings menu set the Soft Shadows quality slider to low or off


<pre>
<pre>


seta r_postprocess "0"
seta r_softShadowsQuality = 0


</pre>
</pre>
Line 197: Line 486:
in Darkmod.cfg
in Darkmod.cfg


=== Set Object Detail to Low ===
<font size="3">'''Note 1:'''
 
(OBSOLETE)
<s>In game Anti-aliasing should be disabled when using Soft Shadows on Nvidia hardware.
<br>Use FXAA in your driver settings instead.</s>
 
NEW:
 
TDM 2.07 allow Nvidia user to use real MSAA with FBO mode
 
See [[#Lower_Anti-aliasing | Lower Anti-aliasing]]
 
'''Note 2:'''
 
(OBSOLETE)


In the advanced video settings menu lower the Object detail slider below normal
<s>For many players the only way to achieve substantial shadow softness in the GUI is to
<br>set quality to High or better. This causes the misleading perception that soft shadows
<br>are too expensive for most hardware.</s>
 
To improve shadow softness without increasing the quality setting, set:
 
<pre>
 
seta r_softShadowsRadius 2.0
 
</pre>
 
You can experiment with values between 1.5 and 3.5 or more.
 
 
</font>
(The "softness" slider is now included in 2.07 GUI)
 
<font size="3">
 
=== '''Change Shadow Mode (New 2.07)''' ===
</font>
 
<br>In TDM 2.07 we offer two different "Shadow Implementation" options in the GUI.
 
* Maps (Shadow Maps)
 
* Stencil (Stencil Shadow Volumes)
 
<br>Shadow Maps can perform better in scenes with fewer but larger light sources<br>
and less small shadow casters. Big areas + Big Lights + Shadow Maps = HIGH FPS


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


in Darkmod.cfg (see also [[Object_detail]] )


=== Set the ambient shading to "Faster" ===
==== '''Shadow Map Size''' ====
 
The larger the Shadow Map texture, the more detail and less artifacts you have further away<br>
from the light center or for small objects. Conversely, smaller Shadow Map textures perform better.
 
<pre>
 
seta r_shadowMapSize "384"
 
</pre>
 
==== '''Max Light Size''' ====


Inside the settings, change the ambient rendering method to "Faster".
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 tdm_ambient_method "1"
 
seta r_maxShadowMapLight "1500"
 
</pre>
</pre>
in Darkmod.cfg


=== Set the interaction.vfp to 'Standard' ===
<font size="3">
=== '''Disable Post-Processing''' ===
</font>


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.
In the advanced video settings menu make sure post-processing is disabled


<pre>
<pre>


seta tdm_interaction_vfp_type "0"
seta r_postprocess "0"


</pre>
</pre>
Line 228: Line 578:
in Darkmod.cfg
in Darkmod.cfg


=== Lower Anti-aliasing ===
<font size="4">
 
=== '''Lower Anti-aliasing''' ===
</font>


In the standard video settings, set AA to a lower value or 0
In the standard video settings, set AA to a lower value or 0
Line 239: Line 592:
in Darkmod.cfg
in Darkmod.cfg


=== Disable V-sync ===


In the standard video settings, disable vsync
(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.)
 
 
'''LATEST DEVELOPMENT:'''
 
2.07 allows Nvidia users to use real MSAA with FBO mode
 
 
'''(OBSOLETE)'''
 
<font size="3"><s>When Nvidia hardware owners enable Soft Shadows in 2.06, this forces "Frame Buffer Objects" (r_useFBO 1) to be active.
FBO does not work with MSAA in 2.06 so as a workaround MSAA settings are converted to Resolution Scaling factors (r_fboResolution x.x).
Resolution scaling is MUCH more expensive than MSAA.
 
We recommend the following options:
 
* 1) Disable MSAA when using Soft Shadows and use FXAA, MLAA, or SMAA in your driver instead
* 2) Disable FBO using the follwing switches
 
    r_nvidiaOverride 0
    r_useFBO 0
 
    Note: Disabling FBO will result in flickering shadows on some "noSelfShadows" objects.</s>
 
</font>
 
=== '''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 forced to V-sync. ( See [[#Disable V-sync | Disable V-sync]] )
 
 
<pre>
seta r_fullscreen "1"
</pre>
 
in Darkmod.cfg
 
{{clear}}
 
 
<font size="3">
 
=== '''Disable V-sync''' ===
</font>
 
<br>In the standard video settings, disable vsync


<pre>
<pre>
Line 247: Line 652:
</pre>
</pre>


in Darkmod.cfg
in Darkmod.cfg<br><br><br>
 
<font size="3">'''NEW INFO!!!!'''
 
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.</font><br><br><br>


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


We strongly recommend disabling V-Sync altogether or forcing variable
We strongly recommend disabling V-Sync altogether or forcing variable V-sync tech such as  
V-sync tech such as G-Sync or Freesync in your driver settings while disabling it in-game.
G-Sync, Freesync, Fast-Sync or Enhanced Sync (new) in your driver settings.<br><br>
 
==== 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:
 
<pre>


=== Reduce your resolution! ===
seta r_displayRefresh "60"


On older cards, Doom3'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 &ndash; but the frame rate improvements might make it much more playable.
</pre>
 
(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
 
<pre>
seta tdm_lod_bias "0.5"
</pre>
 
in Darkmod.cfg (see also [[Object_detail]] )
 
=== '''Set the ambient shading to "Faster"''' ===
 
Inside the settings, change the ambient rendering method to "Faster".
 
<pre>
seta tdm_ambient_method "1"
</pre>
in Darkmod.cfg
 
(Note: Some preliminary tests in v2.05 show that the Enhanced Ambient is now faster than the "fast" texture based Ambient.)
 
=== '''Set the interaction.vfp to "Standard"''' ===
 
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.
 
<pre>
 
seta tdm_interaction_vfp_type "0"
 
</pre>
 
in Darkmod.cfg
 
 
<font size="3">
 
=== '''Reduce your resolution!''' ===
</font>
 
On older cards, <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. 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 &ndash; but the frame rate improvements might make it much more playable.


If you cannot set the resolution you want in the settings menu then enter it in Darkmod.cfg.
If you cannot set the resolution you want in the settings menu then enter it in Darkmod.cfg.
Line 294: Line 758:
'''See also: [[Resolutions]]'''
'''See also: [[Resolutions]]'''


=== Lower Anisotropic Filtering ===
Note: The r_nvidiaOverride cvar forces Nvidia hardware with Soft Shadows to r_useFBO 1.
<br>This will force resolution to native resolution.
 
==== Lower your Render Scale (New 2.07) ====
 
The new "Render Scale" slider in 2.07 allows you to reduce the internal resolution that TDM
<br>will render to. Lowering this has a similar performance impact as lowering your resolution
<br>but may have less visual degradation as the down-scaled pixels as bilinear filtered.
<br>(Below 65% of native resolution, the filtering makes the scene very blurry.)
 
<pre>
 
seta r_fboResolution "0.85"
 
</pre>
 
Note: With the r_fboResolution CVAR, you can also do the opposite...
<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'''.
 
==='''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
 
<pre>
seta g_fov "85"
</pre>
 
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
 
<pre>
bind "z" "toggle g_fov 50 90";
</pre>
 
in Darkmod.cfg so you can tap a key to go between FOV ranges.
 
See [[#Toggle_settings_in_realtime|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
In the standard video settings, lower or disable AF
Line 304: Line 820:
</pre>
</pre>


in Darkmod.cfg
in Darkmod.cfg<br>
 
Note: This has '''very little''' performance benefit for most GPU hardware.
<br>This is also one of the few graphic settings that can be adjusted without requiring a
<br>vid_restart or restarting the engine.
 
{{clear}}
 
<font size="5">
 
== '''Slow loading times''' ==
</font>
 
''Loading times for The Dark Mod are known to be on the long side. The main culprit is that the engine encodes mip-maps''
 
''when loading textures. In the future, we may be able to address this by [[#RGTC_Normal_Map_Compression|compressing the normal maps]] or encoding them''
 
''in a format that includes mip-maps.''
 
 
''Some users have reported modest benefits to loading time when upgrading to an SSD but given the bottle-neck above CPU''
 
''and RAM upgrades would likely be more beneficial.''
 
 
''Sometimes, beyond the normal expectation of slow loading, the load times are egregiously slow. In those cases it's''
 
''best to review the tuning options and workarounds below.''
 
 
 
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 ingame since you will now be using uncompressed textures.
 
<pre style="max-width:35em">
seta image_useNormalCompression "0"
seta image_useCompression "0"
</pre>
 
<s>NEW INFO: The Dark Mod has never really used Normal Map compression because it is incompatible with heightmap images
<br> and it produces nasty artifacts for the texture scales we use.
<br> The current builds have had the RXGB swizzle disabled as of at least 2.0 standalone. (Probably as of v1.08 when the GPL executable sources were released.)
<br> There is no benefit to enabling normal map compression currently so feel free to set this to 0.</s>
 
The above "NEW INFO" appears to be wrong and is under investigation. Enabling normal map compression seems to reduce VRAM usage even though
we don't natively use it.
 
NEW INFO 2: v2.05 will have a new image_mipmapmode cvar. 0 = Software (original), 1 = Legacy GL, 2 Modern (default).
<br> This will offload Mipmap generation to the video driver. Depending on the quality of your GPU driver this may improve or
<br> degrade texture loading performance. In my testing, mode 2 is a little slower than mode 0 on initial load but is substantially
<br> faster on reload or loading new FM's that use the same textures )
 
 
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|Image Downsizing]]


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


<font size="3">
See [[#RGTC_Normal_Map_Compression|RGTC Normal Map Compression]] (hint hint)
</font>


{{clear}}
<font size="5">


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


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


<pre style="max-width:35em">
<pre style="max-width:35em">
seta r_fboResolution "1"
  seta image_usePrecompressedTextures "1"
  seta image_usePrecompressedTextures "1"
  seta image_useNormalCompression "2"
  seta image_useNormalCompression "1"
  seta image_useAllFormats "1"
  seta image_useAllFormats "1"
  seta image_useCompression "1"
  seta image_useCompression "1"
Line 325: Line 905:
  seta r_useShadowVertexProgram "1"
  seta r_useShadowVertexProgram "1"
  seta r_useEntityCulling "1"
  seta r_useEntityCulling "1"
seta cm_backFaceCull "1"
</pre>
</pre>
<s>NEW INFO: The Dark Mod has never really used Normal Map compression because it is incompatible with heightmap images
<br> and it produces nasty artifacts for the texture scales we use.
<br>The current builds have had the RXGB swizzle disabled as of at least 2.0 standalone. (Probably as of v1.08 when the GPL executable sources were released.)
<br> There is no benefit to enabling normal map compression currently so feel free to set this to 0 as shown above. </s>
(The above "NEW INFO" must be wrong somehow as disabling Normal Compression leads to significant VRAM usage. To be determined.)


Note: image_preload can increase the memory usage at load time, some lowend users have disabled this ( 0 ) to
Note: image_preload can increase the memory usage at load time, some lowend users have disabled this ( 0 ) to
get past [[FAQ#Getting_.22Malloc_Failure_for_.23.23.23.23.23.23.23.22_crash-to-desktop | malloc errors]] for going over your memory limits.
get past [[FAQ#Getting_.22Malloc_Failure_for_.23.23.23.23.23.23.23.22_crash-to-desktop | malloc errors]] for going over your memory limits.


=== Configure Video RAM ===
<font size="4">
===Lightgem Calculation Optimizations===
</font>
 
<font size="3">
====Lightgem interleaved calculation====
</font>
 
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:
 
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.
 
{{clear}}
 
=====Lightgem interleave minimum FPS=====


Change:
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.


<pre>
<pre>


seta com_videoRam "128"
tdm_lg_interleave_min 40


</pre>
</pre>


to the appropriate value (in MB) for your GPU in Darkmod.cfg
<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.
<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)
 
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="3">
==== Weak Lightgem (Not Recommended)====
</font>


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


<pre>
<pre>


seta com_videoRam "2048"  
seta tdm_lg_weak "1"  


</pre>
</pre>


{{clear}}
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>
===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:
(Note: The cost of lightgem calculation has been substantially lowered in TDM v2.05 and newer.
<br>This may be an obsolete option in future releases.)


tdm_lg_interleave 3
====Split Lightgem (Obsolete)====


in console tells TDM to recalculate lightgem value every third frame.
* '''Obsolete info. In TDM 2.07 split lightgem is always enabled. The CVAR is gone.'''
 
This tweak can increase average FPS, but it often produces noticeable stuttering, especially on slow machines
when your FPS is below 25 to 30FPS.


You can also split the calculation across frames so that part is done in one frame and part is done in the next:
<s>You can also split the calculation across frames so that part is done in one frame and part is done in the next:


  tdm_lg_split 1
  tdm_lg_split 1
Line 384: Line 1,002:
substantially reduced.
substantially reduced.


'''See also [[#Weak_Lightgem | Weak Lightgem]]'''
NEW INFO:
 
In v2.05 and later tdm_lg_split is enabled (1) by default.</s>
 
====Lightgem Interleave vs MapBufferRange (Obsolete) ====
 
{{clear}}
 
 
<s>In v2.06, the new r_useMapBufferRange cvar can conflict with LightGem interleave and split optimizations.
 
Lightgem split and interleave options are best for helping systems that do not work well with Multi-Core (com_smp 1).
 
If you have a system that runs well with Multi-Core optimization enabled, consider disabling split and interleave
 
in favor of r_useMapBufferRange and r_useBfgPortalCulling.</s>
 
{{clear}}
 
 
'''See also [[#Enable_MapBufferRange_.28Obsolete.29 | r_useMapBufferRange ]]'''
 
 
<font size="4">
 
=== Disabling standard graphics features ===
</font>
 
At the cost of some pretty severe scene quality, you can disable a number of independent graphic features
 
that are non-essential to play.
 
==== Image downsizing ====


=== 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.


As a last resort, you may enable image downsizing:  in Darkmod.cfg, set '''image_downSize''' to '''1''' and then set a limit with '''image_downSizeLimit''', e.g., '''"image_downSizeLimit" "256"'''.   
In Darkmod.cfg, set '''image_downSize''' to '''1''' and then set a limit with '''image_downSizeLimit''',  
e.g., '''"image_downSizeLimit" "256"'''.   


<pre>
<pre>
Line 413: Line 1,065:
<pre>
<pre>


seta image_downSizeSpecular "0"
seta image_downSizeSpecular "1"
seta image_downSizeSpecularLimit "64"
seta image_downSizeSpecularLimit "64"


</pre>
</pre>


'''Note: This may result in very blurry briefing and menu screens.'''
'''Obsolete Info: As of TDM 2.06 you may use image_downSize with post-processing (bloom) enabled!'''
This patch will prevent that until the fix is included in a TDM release:
 
<s>Note: We recommend that you disable post-processing before using image_downsize.
 
If you set image_downsizeLimit below 512, part or all of the screen wont render when post-processing enabled.
 
If any image_downSizeLimit is set below your screen resolution, you will see visual errors when post-processing is enabled.</s>
 
 
==== Disable Soft Particles ====
 
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:
 
<pre>
 
seta r_useSoftParticles "0"
 
</pre>
 
in Darkmod.cfg
 
==== Disable Fog ====
<pre>
 
seta r_skipFogLights "1"
 
</pre>
 
in Darkmod.cfg
 
==== Disable BlendLights ====
 
<pre>
 
seta r_skipBlendLights "1"
 
</pre>
 
in Darkmod.cfg
 
==== 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"
 
==== 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.<br>This helps improve performance slightly when using the lantern.<br><br>
 
==== Disable Particles ====
 
This will '''<u>seriously mar your image quality</u>'''. Flames, glares, and smoke will all be gone.
 
<pre>
 
seta r_skipParticles "1"
 
</pre>
 
in Darkmod.cfg
 
===== 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>
 
seta r_skipAmbient "1"
 
</pre>
 
in Darkmod.cfg
 
==== 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
 
<pre>
 
seta r_skipSpecular "1"
 
</pre>
 
in Darkmod.cfg


http://forums.thedarkmod.com/topic/11058-things-that-could-be-improved/page-73#entry392752


'''Note: We recommend that you disable post-processing before using image_downsize.'''
==== Disable Normal Maps ====


''' If you set image_downsizeLimit below 512, part or all of the screen wont render with'''
The main detail attribute for textures in Doom 3 \ Darkmod is the Normal Map.


'''post-processing enabled and any image_downSizeLimit value will cause visual errors'''
If you disable this your game will become really ugly.


'''when post-processing is enabled.'''
<pre>


seta r_skipBump "1"
</pre>
in Darkmod.cfg
==== Disable Sky ====
(New in v2.05) Pitch black sky with no clouds, Moon, or stars
<pre>
seta g_enablePortalSky "0"
</pre>
in Darkmod.cfg
==== Disable Lip Sync ====
AI will not play lipsync animations
<pre>
seta tdm_ai_opt_nolipsync "1"
</pre>
in Darkmod.cfg
=== 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_useBfgPortalCulling to reduce cache thrashing.
<pre>
seta r_useBfgPortalCulling "1"
</pre>
in Darkmod.cfg
=== Enable MapBufferRange (Obsolete) ===
'''( Obsolete info. This is not optional in 2.07 )'''
<s>If you have a system that works well with Multi-Core ( com_smp 1) then you may
consider enabling r_useMapBufferRange to optimize the way that Vertex cache is loaded.
<pre>
seta r_useMapBufferRange "1"
</pre>
in Darkmod.cfg
Note: Using this option with Split Lightgem (tdm_lg_split 1) or Lightgem interleave (tdm_lg_interleave > 1)
can result in rendering bugs.</s>
'''See [[#Lightgem_Calculation_Optimizations | Lightgem Calculation Optimizations]]'''
<font size="3">
===Drop in Frame Rates when Viewing Water===
===Drop in Frame Rates when Viewing Water===
</font>


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


<pre>
<pre>
Line 457: Line 1,269:
</pre>
</pre>


See [[#Toggle_settings_in_realtime|Toggle Settings in Realtime]]


See also [[FAQ#Underwater_performance_poor|Underwater performance poor]]
See also [[FAQ#Underwater_performance_poor|Underwater performance poor]]


=== Disable Soft Particles ===
<font size="5">


The new Soft Particle effects in v2.03 and newer use a little more GPU than the previous particles.
== '''2.07 Experimental Features''' ==
</font>
 
These settings may offer some performance benefits with caveats \ bugs.


This is offset by the fact that v2.03 and higher don't render particles during the lightgem calculation.
=== Single Pass Shadow Maps ===


Still, if you want an extra boost then set:
In attempt to mimic the Shadow tech in DOOM 2016, TDM 2.07 has a Shadow Map mode
where all shadow casting is gathered for a full scene in one pass:


<pre>
<pre>


seta r_useSoftParticles "0"
seta r_shadowMapSinglePass "1"


</pre>
</pre>


in Darkmod.cfg
This mode does not seem to improve FPS for Nvidia hardware.
<br>This is probably because of the Nvidia's tiling (deferred rendering) hardware optimizations.
 
=== Multi-light Shading ===
 
Meant to be paired with single pass shadows (above), multi-light shading
gathers all the lights of the same type into one pass.


=== Disable Fog ===
<pre>
<pre>


seta r_skipFogLights "1"  
seta r_testARBProgram "2"


</pre>
</pre>


in Darkmod.cfg
Note: This mode does not offer "Enhanced Ambient" rendering
 
This mode does not seem to improve FPS for Nvidia hardware.
<br>This is probably because of the Nvidia's tiling (deferred rendering) hardware optimizations.
 
=== RGTC Normal Map Compression ===


=== Disable BlendLights ===
Doom 3's original Normal Map compression RXGB was just a swizzled version of the S3TC compression
<br>used elsewhere in the game. The swizzle allowed allowed artists to store more detail
<br>as the alpha channel has more bits of storage than the red.
<br>In practice, RXGB still doesn't look so great and nobody has done much work on compression optimization
<br>to improve how encoders use this format.<br><br>
ATI introduced a new way of compressing Normal Maps in 2004 called 3Dc which only requires 2 colors
<br>This has morphed into a few variants (BC5 or DXN built into DirectX, and LATC or RGTC in OpenGL).
<br>We chose RGTC since Intel supports it on very old hardware. It's the most cross-compatible.
<br>When RGTC is fully working, missions will require far less VRAM and memory bandwidth.
<br><br>'''Currently, it's almost completely working with only some Glass and Water shaders having bugs'''


<pre>
<pre>


seta r_skipBlendLights "1"  
seta image_useNormalMapCompression "2"


</pre>
</pre>


in Darkmod.cfg
<br>The main benefit of compressed normal maps other than reduced memory footprint, is [[#Slow_loading_times|Loading Time]].
<br>This will especially be true when the engine can use pre-compressed normal maps with mip-maps
<br>rather than encoding them on load.<br><br>


=== Disable Particles ===
=== Skip Dynamic Shadows ===


This will seriously mar your image quality. Flames, glares, and smoke will all be gone.
Only render shadows from Stationary lights.
This will break missions where players might need to hide in a moving shadow.


<pre>
<pre>


seta r_skipParticles "1"
seta r_skipDynamicShadows "1"


</pre>
</pre>


in Darkmod.cfg
<font size="5">
 
== '''Lower Sound Quality''' ==
</font>


==Field of View Decrease==
=== Force 22khz ===


'''Note''' that this setting might occasionally produce odd effects such as a grabbed object seems to move a little on release.
'''<s>2.06: Do not use this optimization. It is known to cause issues with loading missions on some OpenAL hardware:<br>
http://bugs.thedarkmod.com/view.php?id=4814</s>
'''


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 or in your doomconfig.cfg...
'''(This is fixed in 2.07)'''


g_fov 85
You can force 22khz audio processing to reduce the CPU overhead of audio processing.


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...
Obviously, EAX effects will increase CPU load for audio so you should consider disabling


g_fov 50
those before lowering audio quality. If normal audio plays fine but EAX causes performace,


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.
this change might give you a boost while EAX is enabled.


== 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 s_force22kHz "1"


g_showplayershadow 0
</pre>


Or, in Darkmod.cfg (see above) change the following line from "1" to "0":
=== Disable EFX reverb (new 2.06) ===


seta g_showplayershadow "0"
The new EFX audio option (equivalent to EAX) has some impact on mission performance due to additional reverb calculation.
<br>Disable this option for extra performance. Especially if you get big stutter or lockup events opening doors from indoor
to outdoor areas


== Player Lantern Shadow==
<font size="5">


You may notice a drop in performance while using the player lantern.
=='''Gameplay Performance Tips'''==
</font>


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.
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>


==Gameplay Performance Tips==
* '''Revert to 2.03 Search behavior'''<br>


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:
<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>


* 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.
* 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.
Line 546: Line 1,396:
* 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.
* 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.


== Weak Lightgem ==
<font size="5">


Setting:  
== '''Hardware Considerations''' ==
</font>
 
The Dark Mod 1.0 was 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 P4 2.8GHZ with an FX5200, 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 high-end card in 2009.
Low-power mobile chips are known to throttle under heavy load, especially when using integrated graphics.
 
=== Configure Video RAM ===
 
Change:  
 
<pre>
 
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.


<pre>
<pre>


seta tdm_lg_weak "1"  
seta com_videoRam "2048"  


</pre>
</pre>


in Darkmod.cfg will disable the renderer based lightgem and use a simpler math-based solution.
{{clear}}
It's a far less accurate lightgem but may allow weaker systems to play the game as a second to last resort.
 
=== 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.
 
=== Last resort: Upgrade your hardware ===
 
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 GF 7x00 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
 
and the cost might be so high that upgrading your whole PC might be a better value.
 
Upgrading the hard disk will usually not help much with gaming, unless you are running out of free space.
 
Some users have reported that SSD has improved loading times but the bigger problem with load times
 
is Mip-Map generation which is CPU \ Memory bandwidth limited.
 
<font size="5">


== Toggle settings in realtime ==
== '''Toggle settings in realtime''' ==
</font>


With the exception of Resolution, AA, and AF settings; most of the above settings can be changed in realtime
With the exception of Resolution, AA, and AF settings; most of the above settings can be changed in realtime
Line 574: Line 1,473:
in Darkmod.cfg
in Darkmod.cfg


== Upgrade your BIOS ==
<font size="5">
 
== '''A Warning about cm_backFaceCull''' ==
</font>
 
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,
<br>'''one thing that <u>can cause this</u> is the performance cvar:'''
 
<pre>


Sometimes bugs or unintended specification limits in the BIOS on an older motherboard will prevent it from
seta cm_backFaceCull "1"
allowing the CPU or GPU to meet their potential. If your manufacturer has an updated motherboard BIOS available, consider
applying it.


== Last resort: Upgrade your hardware ==
</pre>


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:
This cvar does improve performance but it is not worth the hassle in most cases.
<br>We recommend disabling it (cm_backFaceCull "0" ) unless you know the mission you're playing has been tested with it enabled.


* If you got '''less than 2 GByte''' main memory, consider upgrading your memory. This really helps to reduce swapping, which introduces quite noticeable slowdowns.
<font size="5">
* If you got a graphic card from NVidia older than the GF 7x00 series, consider upgrading it.


Upgrading your CPU will be quite complicated and the cost might be so sadly high that you could rather buy a new complete computer. Upgrading the hard disk will usually not help much with gaming, unless you are running out of free space.
=='''Blurry Briefing and Menu Screens'''==
</font>


==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.  
<s>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|Image Downsizing]] as there is a patch available to allow
Instead set it to 1. But see also [[#Image downsizing|Image Downsizing]] as there is a patch available to allow


image_downsize without making menus blurry.
image_downsize without making menus blurry.</s>
 
=== 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 ==
== See also ==

Revision as of 08:30, 26 May 2019

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

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  

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, ^ on German keyboards) and type:


g_stopTime 1


Optimizing the OS performance

Linux UEFI Secure Boot

With Secure Boot enabled in the BIOS, most Linux distros will fallback to (slow) open drivers
and wont have access to most hardware acceleration features. Disable Secure Boot for the best performance.

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://docs.microsoft.com/en-us/windows/security/threat-protection/windows-defender-exploit-guard/customize-exploit-protection

and disable the security options you feel are excessive.

Priority and 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.

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" +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.

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.

Driver Considerations

(IdTech4) The Dark Mod is based on OpenGL 2.0. 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.


(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)

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 Index Buffers


seta r_useIndexBuffers "0" 

in Darkmod.cfg

(Notes: This tweak is the default in v2.05 and newer)

(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


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)

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"

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!

See also: Toggle settings in realtime

Launch Options

You can also add the value as part of your 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" +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

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

Uncap FPS (New in v2.06)

Run one game tick per graphics frame, rather than fixed 60 ticks per second. (Limited to 166hz) In 2.06 this is now a GUI option "Uncap FPS" in the Advanced Video settings GUI menu.


seta com_fixedTic "1"

in Darkmod.cfg

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

In the advanced videos settings menu set the Soft Shadows quality slider to low or off


seta r_softShadowsQuality = 0

in Darkmod.cfg

Note 1:

(OBSOLETE) In game Anti-aliasing should be disabled when using Soft Shadows on Nvidia hardware.
Use FXAA in your driver settings instead.

NEW:

TDM 2.07 allow Nvidia user to use real MSAA with FBO mode

See Lower Anti-aliasing

Note 2:

(OBSOLETE)

For many players the only way to achieve substantial shadow softness in the GUI is to
set quality to High or better. This causes the misleading perception that soft shadows
are too expensive for most hardware.

To improve shadow softness without increasing the quality setting, set:


seta r_softShadowsRadius 2.0

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


(The "softness" slider is now included in 2.07 GUI)

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. Big areas + Big Lights + Shadow Maps = HIGH FPS


seta r_shadows "2"


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 better.


seta r_shadowMapSize "384"

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"

Disable Post-Processing

In the advanced video settings menu make sure post-processing is disabled


seta r_postprocess "0"

in Darkmod.cfg

Lower Anti-aliasing

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.)


LATEST DEVELOPMENT:

2.07 allows Nvidia users to use real MSAA with FBO mode


(OBSOLETE)

When Nvidia hardware owners enable Soft Shadows in 2.06, this forces "Frame Buffer Objects" (r_useFBO 1) to be active. FBO does not work with MSAA in 2.06 so as a workaround MSAA settings are converted to Resolution Scaling factors (r_fboResolution x.x). Resolution scaling is MUCH more expensive than MSAA.

We recommend the following options:

  • 1) Disable MSAA when using Soft Shadows and use FXAA, MLAA, or SMAA in your driver instead
  • 2) Disable FBO using the follwing switches
   r_nvidiaOverride 0
   r_useFBO 0
   Note: Disabling FBO will result in flickering shadows on some "noSelfShadows" objects.

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 forced to V-sync. ( See Disable V-sync )


seta r_fullscreen "1"

in Darkmod.cfg


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.



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 )

Set the ambient shading to "Faster"

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.)

Set the interaction.vfp to "Standard"

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


Reduce your resolution!

On older cards, 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.

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

To edit Darkmod.cfg:

  • Uninstall any current mission in the New Mission menu.
  • Close Dark Mod
  • Edit Darkmod.cfg in the darkmod folder
  • Re-install the mission.
  • Whenever you UNinstall and install another mission, these changes will migrate to those FMs as well.

(Alternatively, edit both the Darkmod.cfg in the darkmod folder AND the one in the current FM game folder, eg, fms\chalice.)

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

Note: The r_nvidiaOverride cvar forces Nvidia hardware with Soft Shadows to r_useFBO 1.
This will force resolution to native resolution.

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
but may have less visual degradation as the down-scaled pixels as bilinear filtered.
(Below 65% of native resolution, the filtering makes the scene very blurry.)


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.

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.

Slow loading times

Loading times for The Dark Mod are known to be on the long side. The main culprit is that the engine encodes mip-maps

when loading textures. In the future, we may be able to address this by compressing the normal maps or encoding them

in a format that includes mip-maps.


Some users have reported modest benefits to loading time when upgrading to an SSD but given the bottle-neck above CPU

and RAM upgrades would likely be more beneficial.


Sometimes, beyond the normal expectation of slow loading, the load times are egregiously slow. In those cases it's

best to review the tuning options and workarounds below.


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

 seta image_useNormalCompression "0"
 seta image_useCompression "0"

NEW INFO: The Dark Mod has never really used Normal Map compression because it is incompatible with heightmap images
and it produces nasty artifacts for the texture scales we use.
The current builds have had the RXGB swizzle disabled as of at least 2.0 standalone. (Probably as of v1.08 when the GPL executable sources were released.)
There is no benefit to enabling normal map compression currently so feel free to set this to 0.

The above "NEW INFO" appears to be wrong and is under investigation. Enabling normal map compression seems to reduce VRAM usage even though we don't natively use it.

NEW INFO 2: v2.05 will have a new image_mipmapmode cvar. 0 = Software (original), 1 = Legacy GL, 2 Modern (default).
This will offload Mipmap generation to the video driver. Depending on the quality of your GPU driver this may improve or
degrade texture loading performance. In my testing, mode 2 is a little slower than mode 0 on initial load but is substantially
faster on reload or loading new FM's that use the same textures )


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

See RGTC Normal Map Compression (hint hint)

The game is very slow!

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_fboResolution "1"
 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"

NEW INFO: The Dark Mod has never really used Normal Map compression because it is incompatible with heightmap images
and it produces nasty artifacts for the texture scales we use.
The current builds have had the RXGB swizzle disabled as of at least 2.0 standalone. (Probably as of v1.08 when the GPL executable sources were released.)
There is no benefit to enabling normal map compression currently so feel free to set this to 0 as shown above.

(The above "NEW INFO" must be wrong somehow as disabling Normal Compression leads to significant VRAM usage. To be determined.)

Note: image_preload can increase the memory usage at load time, some lowend users have disabled this ( 0 ) to get past malloc errors for going over your memory limits.

Lightgem Calculation Optimizations

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

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.

(Note: The cost of lightgem calculation has been substantially lowered in TDM v2.05 and newer.
This may be an obsolete option in future releases.)

Split Lightgem (Obsolete)

  • Obsolete info. In TDM 2.07 split lightgem is always enabled. The CVAR is gone.

You can also split the calculation across frames so that part is done in one frame and part is done in the next:

tdm_lg_split 1

Some folks have reported that this causes flicker but that was in older builds.

I haven't seen any problems with this in recent builds.

This will give a modest boost compared to interleave and both can be used together or independently.

Eg:

Keep tdm_lg_interleave 1 for to prevent stutter at low FPS but set tdm_lg_split to gain a little boost.

or

Set tdm_lg_split to 1 to get you from 26 FPS to 28 FPS as a baseline, then set tdm_lg_interleave to 2 to gain a substantial boost (up to double FPS) but since the baseline is close to 30FPS the risk of stutter is substantially reduced.

NEW INFO:

In v2.05 and later tdm_lg_split is enabled (1) by default.

Lightgem Interleave vs MapBufferRange (Obsolete)


In v2.06, the new r_useMapBufferRange cvar can conflict with LightGem interleave and split optimizations.

Lightgem split and interleave options are best for helping systems that do not work well with Multi-Core (com_smp 1).

If you have a system that runs well with Multi-Core optimization enabled, consider disabling split and interleave

in favor of r_useMapBufferRange and r_useBfgPortalCulling.


See also r_useMapBufferRange


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.

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"

Obsolete Info: As of TDM 2.06 you may use image_downSize with post-processing (bloom) enabled!

Note: We recommend that you disable post-processing before using image_downsize.

If you set image_downsizeLimit below 512, part or all of the screen wont render when post-processing enabled.

If any image_downSizeLimit is set below your screen resolution, you will see visual errors when post-processing is enabled.


Disable Soft Particles

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 Fog


seta r_skipFogLights "1" 

in Darkmod.cfg

Disable BlendLights


seta r_skipBlendLights "1" 

in Darkmod.cfg

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"

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 Particles

This will seriously mar your image quality. Flames, glares, and smoke will all be gone.


seta r_skipParticles "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

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 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


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_useBfgPortalCulling to reduce cache thrashing.


seta r_useBfgPortalCulling "1" 

in Darkmod.cfg

Enable MapBufferRange (Obsolete)

( Obsolete info. This is not optional in 2.07 )

If you have a system that works well with Multi-Core ( com_smp 1) then you may consider enabling r_useMapBufferRange to optimize the way that Vertex cache is loaded.


seta r_useMapBufferRange "1"

in Darkmod.cfg

Note: Using this option with Split Lightgem (tdm_lg_split 1) or Lightgem interleave (tdm_lg_interleave > 1) can result in rendering bugs.

See Lightgem Calculation Optimizations

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"

You can also set a key-bind to toggle this instead:


bind "z" "toggle r_postprocess 0 1"

See Toggle Settings in Realtime

See also Underwater performance poor

2.07 Experimental Features

These settings may offer some performance benefits with caveats \ bugs.

Single Pass Shadow Maps

In attempt to mimic the Shadow tech in DOOM 2016, TDM 2.07 has a Shadow Map mode where all shadow casting is gathered for a full scene in one pass:


seta r_shadowMapSinglePass "1"

This mode does not seem to improve FPS for Nvidia hardware.
This is probably because of the Nvidia's tiling (deferred rendering) hardware optimizations.

Multi-light Shading

Meant to be paired with single pass shadows (above), multi-light shading gathers all the lights of the same type into one pass.


seta r_testARBProgram "2"

Note: This mode does not offer "Enhanced Ambient" rendering

This mode does not seem to improve FPS for Nvidia hardware.
This is probably because of the Nvidia's tiling (deferred rendering) hardware optimizations.

RGTC Normal Map Compression

Doom 3's original Normal Map compression RXGB was just a swizzled version of the S3TC compression
used elsewhere in the game. The swizzle allowed allowed artists to store more detail
as the alpha channel has more bits of storage than the red.
In practice, RXGB still doesn't look so great and nobody has done much work on compression optimization
to improve how encoders use this format.

ATI introduced a new way of compressing Normal Maps in 2004 called 3Dc which only requires 2 colors
This has morphed into a few variants (BC5 or DXN built into DirectX, and LATC or RGTC in OpenGL).
We chose RGTC since Intel supports it on very old hardware. It's the most cross-compatible.
When RGTC is fully working, missions will require far less VRAM and memory bandwidth.

Currently, it's almost completely working with only some Glass and Water shaders having bugs


seta image_useNormalMapCompression "2"


The main benefit of compressed normal maps other than reduced memory footprint, is Loading Time.
This will especially be true when the engine can use pre-compressed normal maps with mip-maps
rather than encoding them on load.

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.
Disable this option for extra performance. Especially if you get big stutter or lockup events opening doors from indoor to outdoor areas

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.

Hardware Considerations

The Dark Mod 1.0 was 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 P4 2.8GHZ with an FX5200, 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 high-end card in 2009. Low-power mobile chips are known to throttle under heavy load, especially when using integrated graphics.

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" 

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.

Last resort: Upgrade your hardware

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 GF 7x00 series, consider upgrading it.
  • 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.

Upgrading the hard disk will usually not help much with gaming, unless you are running out of free space.

Some users have reported that SSD has improved loading times but the bigger problem with load times

is Mip-Map generation which is CPU \ Memory bandwidth limited.

Toggle settings in realtime

With the exception of Resolution, AA, and AF settings; 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

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.