Doom 3 Tweak Guide

[Page 8] Advanced Tweaking (Pt.2)



This section lists out all the major command variables by general function, and provides descriptions and recommendations for the important ones. This list is by no means exhaustive, since there are literally hundreds of command variables for Doom 3.


Usage rules


Config and Console Usage: In the Doom 3 engine, when you want to use a command - whether in a config file or in the console - you can simply type the name of the command, and then any values or parameters (if required), however you must place exactly one space after the command and any following value or parameter. E.g: r_displayrefresh 85. You don't have to use "" (quotes) around the value, nor do you have to use the Set or Seta command in front of them.


Set and Seta In Front of Commands: You will see in certain places, like the DoomConfig.cfg file, that a command is prefaced with the words Set or Seta. You can also insert these in front of your commands in the console or config file, however they aren't necessary. Set is used to tell the game engine to set a cvar to a particular value. Seta is more useful in that it tells Doom 3 to set the cvar value, and then archive it (store it). There is also a Sett command, which specifies that the setting is for a tool (DoomEdit is the primary tool) - that means it has no influence on gameplay. Further, there are Setu (User Info) and Sets (Server Info) commands just so you know.


Current and Default Values: If at any time you want to see the currently used value for a command variable, open the console and type the name of the variable without a value. For example, type "r_displayrefresh" (without quotes) and you will see the current value for this variable on your system, and importantly you will also see the default value. If you can't remember a command name while in the console, type the first letter(s) of it and then press the TAB key - the console will show you all commands beginning with the same letter(s).


The following is a list of all the major commands for Doom 3, grouped by function, and with as full a description as I am capable of based on my own knowledge, the developers' help text and personal testing. Please Email Me if you have more knowledge of any of these commands, or if you have other useful commands to add to this list. Settings which can be easily and fully changed in the Main Menu of the game will not be covered here - see the In-Game Settings section for descriptions of those. Also some of the more obscure commands are not very useful to most users (such as developer, debugging and radiant commands) and these are not included. Finally, there are no cheats here - those are widely documented elsewhere and not something I regularly include in my guides. Ok, here is the list:


Click to enlarge

General Commands


com_showFPS [0,1] - If set to 1, shows the current frame rate in Frames Per Second (FPS) at the top right of the screen.


com_allowConsole [0,1] - If set to 1, allows the command console to be opened by using only the '~' key, rather than CTRL + ALT + ~.


bind [keyname, command] - Binds a command to a key. For example:


bind F10 com_showFPS 1

bind F11 com_showFPS 0


This binds the F10 key to the command "com_showfps 1" (which turns on the FPS counter), and the next line binds the F11 key to the command "com_showfps 0" (which turns off the FPS counter). If you want to make a key binding "toggle", that is pressing the same key turns a command on or off, then use the 'toggle' command instead, for example:


bind F10 toggle com_showFPS


Now the F10 key alone will turn the FPS counter on and off, which frees up the F11 key.


bindunbindtwo [keyname, command] - Same as bind command, however if the key you want to bind is already being used more than twice, it will unbind it first then bind it to the command you've specified.


unbind [keyname] - Unbinds any existing commands from the single key named.


unbindall - Unbinds any commands from all keys. This command is used most commonly as a starting command before setting bindings, so that you can be sure the keys you are binding are not already in use by another command.


loadGame [savename] - Loads a saved game with the name specified. If no name is specified, loadgame will load the last quicksave.


saveGame [savename] - Saves your current game under the name specified.


editor - Opens the Doom 3 "DoomEdit" level editor. See Patches, Maps and Mods section.


echo [text] - Prints the specified text on the screen.


exec [filename] - Executes the commands in the config filename provided. For example to execute all the commands in a custom configuration file called MyTweaks.cfg, type:


exec MyTweaks.cfg


And all the commands in that config file will be compiled and run.


screenshot - Takes a screenshot and places it in your \Doom 3\base\screenshots\ directory as a .tga file, similar to using the F12 key.


conDump [filename] - dumps the entire contents of the console for the current session to the filename specified (as a .txt file) and places it in your \Doom 3\base\ directory.


freeze [seconds] - Freezes everything in the game for the number of seconds specified.


clear - Clears the console of all text to date. Useful if you want to clear the console before generating specific text (e.g. listcmds) then condump them cleanly.


con_noPrint [0,1] - If set to 1 provides text feedback in the console, but not on the screen when console is not visible.


exit - Closes Doom 3 and exits to the Windows Desktop.


Performance Commands


[Cache Tweaks]


The following commands control the image cache, which if enabled and set correctly can help smooth FPS and may also boost performance:


image_useCache [0,1] - If set to 1, uses background loading to cache image information. This may not necessarily improve framerate performance, but it does assist in smoothing out frame rates and reducing loading pauses. Note that the image_cacheMinK (see below) size must be raised from its default otherwise the game will crash when using this setting. Once this setting is enabled, the actual cache value is set in the image_cacheMegs setting below.


image_cacheMegs [Megabytes] - Determines the maximum amount of system memory to allocate to temporary loading of full-sized precompressed images if the cache is enabled by setting image_useCache to 1. Note that since this caching only applies to precompressed images, using the Ultra Quality setting will render this setting useless, since at Ultra quality no texture compression is used. Since a cache is only a temporary holding area, and not the place where the entire game is meant to reside, do not raise this value to something extremely high as that will simply reduce the available memory for the rest of Doom 3. Try a value of 128MB for those with 512MB of system RAM, and if you have 1GB or more of RAM, you can try a higher value like 196MB or 256MB for example. Do not automatically set this to half your system RAM or some monstrous amount.


image_cacheMinK [KiloBytes] - This setting determines the minimum size in KB for precompressed image files to be loaded into the cache. To make sure most image files can be loaded, and to also prevent a system crash when enabling caching, select a value like 3072 to start with. Raising this setting may improve caching, but it may also hinder caching if most textures are below the size you specify, so don't just raise this value for the hell of it.


[Graphics Tweaks]


r_brightness [value] - Determines the overall brightness for the game. You can adjust this using the slider in the main options menu (See In-Game settings), however if you want to fine tune it you can do so here. Has no performance impact.


r_gamma [value] - Determines the gamma level (essentially a form of brightness) for the game. Raising this value too high can make the game image appear washed out. Has no performance impact.


r_displayRefresh [Hz] - Determines the refresh rate used when Doom 3 is launched. You should already be getting the maximum refresh rate possible on your monitor when playing Doom 3 through the use of a refresh rate fix (See my ATI Catalyst Tweak Guide for a link and instructions for both Nvidia and ATI users), however if you want to set this manually, determine the supported maximum refresh rate on your monitor for the resolution you've chosen for Doom 3 (e.g. I run Doom 3 at 1280x1024, and my monitor can do 85Hz maximum at this resolution), and set this variable to that value.


r_multiSamples [0,2,4,8,16] - This setting determines the level of Antialiasing samples used. This can be set using the in-game menus (See In-Game Settings section). The numerical values here are 0 which is no antialiasing, 2, 4, 8 and 16.


com_videoRam [MB] - Shows the detected amount of video memory on your graphics card in MB. If this value is incorrect, set it to the correct value to improve performance.


cm_backFaceCull [0,1] - If set to 1, removes all polygons behind the direction the player is facing - that is, all the things the player cannot see. This can improve performance, but if you experience any visual anomalies set this back to 0. Note it's cm_backFaceCull, not com_backFaceCull.


com_purgeAll [0,1] - If set to 1, discards all data between level loads. Can increase loading times noticeably but may help reduce in-game pauses.


com_machineSpec [-1,0,1,2,3] - Shows the currently detected machine specification level, with the choices being -1 - Not detected, 0 - Low quality, 1 - Medium quality, 2 - High quality, and 3 - Ultra quality.


com_fixedTic [-1,0,1] - If set to 0 (the default) Doom 3's ticrate is capped at 60FPS, meaning the game framerate cannot exceed this, except when running a timedemo. If you want to remove this cap, set com_fixedTic to -1. Setting it to 1 removes the cap, but causes the game physics to go out of sync. Removing the FPS cap doesn't necessarily improve performance, and can lead to more variable framerates. Note that com_fixedTic -1 doesn't work as of the latest patch.


setMachineSpec - Detects your system hardware and sets the value for com_machineSpec (See above).


execMachineSpec - Executes all the relevant config files and sets variables based on the machine specifications provided by the com_machinespec variable. For example, if you raise your machine spec to 3 using "com_machinespec 3", then running the command "execMachineSpec" will change all your settings and config variables to the ones appropriate to a machine suited for Ultra quality performance (i.e very high end).


r_vertexBufferMegs [Megabytes] - This setting controls how many MB are allocated to the vertex buffer. Increasing this value will see a performance improvement on most systems, so try increasing it to 48MB or 64MB.


r_orderIndexes [0,1] - If set to 1, reorganises indexes to optimize vertex use. This improves rendering performance.


r_usePortals [0,1] - If set to 1, uses portals to perform area culling, otherwise everything is drawn. Setting this to 1 provides the best performance.


r_useOptimizedShadows [0,1] - When set to 1, uses the dmap generated static shadow volumes, which provides optimal performance.


r_lightScale [value] - All light sources are multiplied by this value. Increasing this value increases the intensity of all visible light sources. Basically it makes light sources brighter the higher the value.


r_skipParticles [0,1] - If set to 1, this disables all particle effects, including smoke, fog, steam etc. This can dramatically improve performance in areas with these effects, however it can reduce realism greatly as well.


r_skipDiffuse [0,1] - If set to 1, disables diffuse lighting. This improves performance, but also darkens areas where such lighting is used since no lighting is used to replace the removed diffuse lighting.


r_skipUpdates [0,1] - If set to 1, lighting is not updated, meaning all lighting will become static (fixed direction and intensity). This can improve performance significantly, but reduces realism.


r_skipDeforms [0,1] - If set to 1, any material which can be deformed will remain in its original state.


r_skipFogLights [0,1] - If set to 1, disables all fog lights which can improve performance.


r_skipTranslucent [0,1] - If set to 1, disables translucent rendering, which can improve performance (but reduce realism) in such areas.


r_skipInteractions [0,1] - If set to 1, disables all light interactions with surfaces, effectively making almost all surfaces black.


r_skipMegaTexture [0,1] - If set to 1, uses only the lowest level images. This improves performance at the cost of lower image quality for some surfaces.


r_skipGuiShaders [0,1,2,3] - If set to 1, this removes all Graphical User Interfaces (GUIs) in the game (i.e. computer terminals, security screens etc.), if set to 2, GUIs aren't drawn but they can still be interacted with, if set to 3 they will be drawn, but cannot be interacted with. These settings can improve performance but obviously reduce playability.


r_useShadowCulling [0,1] - If set to 1, tries to remove shadows from partially visible lights. This provides optimal performance.


r_useLightCulling [0,1,2,3] - Determines the light culling method. 0 is no culling, 1 is box culling, 2 is the exact clip of polyhedron faces, and 3 also includes areas. This should be set to 3 for optimal performance. Other methods can reduce visual anomalies with lighting but will reduce performance.


r_useCulling [0,1,2] - Determines the object culling method. 0 is no culling, 1 is sphere culling and 2 is sphere and box culling. Setting this to 2 provides optimal performance, but other methods can be tried to reduce visual anomalies.


r_renderer [best, arb, arb2, cg, exp, nv10, nv20, r200] - Determines the rendering path to use. Some renderers can't run on certain hardware - for example cg is an Nvidia rendering language and can't run on ATI cards. You can experiment with these to see which is best on your system, as I haven't had the chance to test these on various hardware.


r_ignoreGLErrors [0,1] - This setting should be set to 1, to ignore OpenGL errors. Most people will have one or two OpenGL errors throughout the game, and these don't seem to affect gameplay.


r_znear [value] - This setting determines the distance at which z-buffer clipping occurs. The default value is 3, and lower values can result in graphical anomalies for distant objects but improve performance, while higher values may help reduce any z-buffer graphical anomalies, but may reduce performance.


r_useInfiniteFarZ [0,1] - If set to 1, this uses the no-far-clip-plane trick which provides optimal performance.


r_useStateCaching [0,1] - This option should be set to 1 for optimal performance, as it caches OpenGL state changes.


r_useIndexBuffers [0,1] - If set to 1, uses ARB_vertex_buffer_object for indexes. This can actually reduce performance, so set to 0.


r_useVertexBuffers [0,1] - If set to 1, uses ARB_vertex_buffer_object for vertexes, which improves performance.


r_useCachedDynamicModels [0,1] - If set to 1, uses cache snapshots of dynamic models which improves performance.


r_useTwoSidedStencil [0,1] - If set to 1, optimizes the processing of stencil shadows.


r_useTurboShadow [0,1] - If set to 1, uses the infinite projection with W technique for dynamic shadows which improves performance without a noticeable drop in image quality.


r_useShadowVertexProgram [0,1] - If set to 1, does the shadow projection in the vertex program on graphics cards with this capability. If you set this to 1 and experience problems or a crash, it is because your graphics card does not support this functionality.


r_useShadowProjectedCull [0,1] - If set to 1, removes polygons which would fall completely inside shadows, optimizing performance.


r_useTripleTextureARB [0,1] - If set to 1, this allows graphics cards with 3+ texture units do a two pass instead of three pass which improves performance. Set this to 1 and if you experience problems, your graphics card does not support this function.


r_useConstantMaterials [0,1] - If set to 1, this setting uses pre-calculated material registers if possible, improving performance.


r_useNV20MonoLights [0,1] - If set to 1, this option uses optimized rendering for mono lights.


r_mode [-1,3,4,5,6,7,8] - This setting determines the resolution, as set in the in-game menus under Screen Size (See In-Game Settings section). The mode values are 3 = 640x480, 4 = 800x600, 5 = 1024x768, 6 = 1152x864, 7 = 1280x1024 and 8 = 1600x1200. Note, you can use -1 for r_mode, and this tells the game to use the values for r_customHeight and r_customWidth to set screen width and height - this is useful for allowing things like widescreen mode.


r_aspectratio [0,1,2] - This setting allows you to set the aspect ratio of the image, which is mainly used for displaying on TVs. The options are 0 = 4:3 (normal), 1 = 16:9 (standard widescreen), and 2 = 16:10 (nonstandard).


r_useLightPortalFlow [0,1] - If set to 1, this uses a use a more precise area reference determination for lighting. Setting this to 0 improves performance but may result in graphical anomalies.


g_projectileLights [0,1] - If set to 1, allows dynamic lights for projectiles. Setting this to 0 can improve performance in combat.


g_doubleVision [0,1] - If set to 1, shows a blurry "double vision" effect when taking damage. Setting this to 0 removes this effect and can improve performance when taking damage.


g_muzzleFlash [0,1] - If set to 1, shows a flash from the muzzle of weapons that are firing. If set to 0, this effect is disabled, which can improve performance.


g_showBrass [0,1] - If set to 1, visible shells will be ejected from weapons. If set to 0, no visible shells will be ejected, and performance may be improved in heavy combat.


g_showHud [0,1] - If set to 1, this enables the Heads Up Display (HUD). If set to 0, this removes the HUD from view, which may give a minor performance improvement. This command is most useful for taking "clean" screenshots (i.e. without the HUD).


g_showPlayerShadow [0,1] - If set to 1, the player will cast a shadow when standing near lights. If set to 0, the player casts no shadow, which improves performance.


g_nightmare [0,1] - If set to 1, Nightmare difficulty level can now be selected on the main menu screen. If set to 0, this option is disabled. Normally players must complete the entire game before Nightmare mode is enabled.


g_bloodEffects [0,1] - If set to 1, full blood effects (blood sprays, splattering etc.) is enabled. If set to 0, this is removed, which may yield a small performance improvement in heavy combat.


g_skipViewEffects [0,1] - If set to 1, removes various view-related special effects like the damage effects (double vision). This can improve performance.


g_fov [angle] - Specifies the angle for the Field of View (FOV). The wider the angle, the larger the field of vision for the player, giving a "fish eye" view in effect, however performance will be reduced. The smaller the angle, the higher the performance. The default of 90 is recommended, but players can try 85 which is a value used in some other games and will gain a slight boost in FPS. In multiplayer, g_fov can only be changed between 90 and 110.


g_skipFX [0,1] - If set to 1, disables certain special effects (I'm unclear on which). This can improve performance.


g_skipParticles [0,1] - If set to 1, disables certain particle effects (does not include smoke, dust, fog effects etc). This can improve performance, particularly in areas which use these effects to a large extent, but realism will be reduced.


image_usePrecompressedTextures [0,1] - When set to 1, all textures will be precompressed, resulting in less video memory being used and hence smoother performance on most machines. There may be some minor compression artifacts on textures, but these are hardly noticeable. If set to 0, this setting will force realtime compression on textures which results in reduced image quality and performance. Note that if this setting is set to 0 and the image_useCompression setting is also set to 0, uncompressed textures will be used for highest image quality, but performance will suffer and you will get more small pauses depending on the amount of Video RAM on your graphics card, so on balance this should be set to 1.


image_useNormalCompression [0,1,2] - Specifies the compression method used for textures. 0 disables normal map compression for the highest image quality for textures, 1 is 256 color compression (if available), which gives the best performance but provides the most compression artifacts, while 2 is rxgb compression. When combined with the setting above and below, setting this to 0 provides optimal image quality for minimal performance hit.


image_useCompression [0,1] - When set to 1, compression is used - with the method of compression specified in the image_useNormalCompression variable. Compression provides the fastest performance by reducing the size of all textures and light maps, but there are some (minor) compression artifacts. When set to 0, precompressed textures are still used, but realtime compression is not used if image_useNormalCompression and image_usePrecompressedTexures are activated. This results in better image quality, but slower performance particularly during periods when precompressed textures are not used.


image_preload [0,1] - If set to 1, Doom 3 attempts to preload most images in the background, meaning less loading pauses during the game but longer loading times. If set to 0, images are loaded dynamically as needed, meaning more loading pauses during the game. 1 is the recommended setting.


image_lodbias [value] - Determines the Level of Detail (LOD) bias for mipmapped images. The higher the number, the less detail is visible on surrounding objects. This can improve performance, but reduces image quality. The default is 0, and values above 1 reduce detail quite heavily, so experiment with fractional values such as 0.2 or 0.5.


image_anisotropy [1,2,4,8] - This setting determines the level of Anisotropic Filtering used in Doom 3. Valid values are 1, 2, 4, and 8. The higher the value, the lower your performance, but the crisper textures will appear in the distance. Note that 1 is the lowest you can set for Anisotropic - 0 will simply default back to 1. Also note that if you have forced Anisotropic Filtering in your graphics card's control panel, it will override this setting, so for optimal performance set the Anisotropic Filtering level in your control panel to 'Application Preference', and adjust the level here.


image_filter [GL_LINEAR_MIPMAP_NEAREST, GL_LINEAR_MIPMAP_LINEAR] - Determines the OpenGL texture filtering method to use on textures by default. GL_LINEAR_MIPMAP_LINEAR is Trilinear Filtering, however if you want a performance boost without any noticeable image quality loss, change this setting to GL_LINEAR_MIPMAP_NEAREST which is Bilinear Filtering.


[Sound Tweaks]


The following commands all influence the way sound behaves in Doom 3:


s_force22kHz [0,1] - If set to 1, this forces lower quality (22kHz) audio, which reduces sound quality but improves performance.


s_numberOfSpeakers [2,4,5,6] - This value shows the number of speakers the game has detected, based on the your general Windows settings and In-Game settings. You can manually alter this value, however make sure it matches your current speaker setup otherwise you will have missing audio channels.


s_volume_dB [Decibels] - This is the sound volume for the game in decibels. You should use the in-game menu volume slider to adjust the sound, but if it is too low or too high you can also adjust it here. Be careful as decibel values are not linear.


s_maxSoundsPerShader [value] - This setting determines the maximum number of sounds to use per shader, that is how diverse the sounds effects are. Increasing this value increases sound variety but also increases memory usage and can reduce performance.


s_clipVolumes [0,1] - When set to 1, this removes sounds which cannot be heard which provides optimal performance.


s_useOcclusion [0,1] - Occlusion is a method which muffles sounds which aren't clearly heard, such as those behind walls and objects. If set to 0, this method is disabled reducing realism but it may increase performance.


s_realTimeDecoding [0,1] - This setting determines whether sound decoding is done in real-time or not, however it is protected and cannot be set to 0 (nor should it need to be).


s_playDefaultSound [0,1] - When set to 1, if any sounds are missing a beep is played back instead. If you are getting a lot of beeping errors, you can set this to 0 to remove them.


s_noSound [0,1] - If set to 1, disables sounds.


[Downsizing Tweaks]


The following values control the largest size allowed (in pixels) for textures, lighting and render maps. If downsampling is not enabled, these values make no difference. However if downsampling is enabled, changing the limit values can improve performance by restricting the size of texture, light and render maps. The common values are 256 for 64MB graphics cards, 512 for 128MB graphics cards and 1024 for 256MB graphics cards. You can try lower values for your graphics card to see if loading times and in-game pauses are improved, and judge whether your image quality has fallen or not. Typically smaller sample size limits will result in more pixelated textures and less detailed lighting as textures and lightmaps are resized from their original resolutions to smaller ones.


image_downSizeLimit [pixels] - This setting controls the diffuse light map downsample limit - the largest size in pixels for the diffuse light map. Use 256 for graphics cards with 64MB of Video RAM, 512 for 128MB VRAM and 1024 for 256MB VRAM or above.


image_downSize [0,1] - If set to 1, this puts into effect the downSizeLimit value specified above. If set to 0, textures are displayed at full resolution for highest image quality but lower performance.


image_downSizeBumpLimit [pixels] - This setting controls the bump map texture downsample limit. Use 256 for graphics cards with 64MB of Video RAM, 512 for 128MB VRAM and 1024 for 256MB VRAM or above.


image_downSizeBump [0,1] - If set to 1, this puts into effect the downSizeBumpLimit value specified above. If set to 0, bump mapping on textures are displayed at full resolution for highest image quality but lower performance.


image_downSizeSpecularLimit [pixels] - This setting controls the specular lighting light map downsample limit. Use 256 for graphics cards with 64MB of Video RAM, 512 for 128MB VRAM and 1024 for 256MB VRAM or above.


image_downSizeSpecular [0,1] - If set to 1, this puts into effect the downSizeSpecularLimit value specified above. If set to 0, surface effects on textures are displayed at full resolution for highest image quality but lower performance.



The next section continues the command variables listing.