dcsimg
Page 1 of 3 1 2 3 LastLast
Results 1 to 15 of 32

Thread: HL2 Performance Tweaks

  1. #1
    PC Aficionado MJCfromCT's Avatar
    Join Date
    Jun 2003
    Location
    WPI, Worcester MA
    Posts
    4,724

    HL2 Performance Tweaks

    The tweaks are starting to roll in for those of you who want a few extra frames, these were taken from hlfallout.net

    Listed below are the known tweaks for Half-life 2

    Create a new text document in "C:\Program Files\Valve\Steam\SteamApps\<your steam username>\half-life 2\hl2\cfg" (or wherever you installed HL2) called "autoexec.cfg".

    Open this file in notepad, and add the following lines:
    snd_mixahead "0.7" (Reduces audio stuttering.)
    sv_autosave "0" (Disables autosaves at start of level.)
    sv_forcepreload "1" (Preloads game assets at start of level.)
    cl_forcepreload "1" (Preloads game assets at start of level.)
    cl_smooth "0" (Disables client-side smoothing.)
    cl_ragdoll_collide 1 (Enables collision detection between ragdoll models.)
    snd_async_fullyasync "1" (Desyncs sound. I personally do not use this.)
    r_lod "-2" (slight increase in image quality without decrease in framerate.)

    Note that for the command snd_mixahead, there is no "ideal" value. Different setups work best with different values. The most common ones are 0.4, 0.5, and 0.7.

    To completely disable autosaves, go to "C:\Program Files\Valve\Steam\SteamApps\<your steam username>\half-life 2\hl2\SAVE" (or wherever you installed HL2) and set the following 4 files to read-only:

    autosave01.sav
    autosave01.tga
    autosave.sav
    autosave.tga

    This stops the game jerking everytime it autosaves at checkpoints in levels. Remember to manually quicksave, though.

    Command line Parameters:
    To add these, right click on your HL2 shortcut icon, select "properties", and look for the line called "target". It should look like this:
    "C:\Program Files\Valve\Steam\Steam.exe" -applaunch 220

    Add the following behind it:
    -heapsize 512000 (modify this number to at most half of your total RAM in Kbytes.)
    +map_background none (this lets you start the game without the fancy menu background.)

    After editing, the line should look like this:
    "C:\Program Files\Valve\Steam\Steam.exe" -applaunch 220 -heapsize 384000 +map_background none

    For those of you who launch HL2 via the steam interface, use the following method for adding command line parameters:
    Open Steam > Play Games
    Right Click on "Half-Life 2" and choose "Properties"
    This should pop up a window that will have a "Launch Options" button. Click that and add the above parameters.

    To defrag HL2's massive 1 gigabyte sound-file, download the program "Contig" from here:
    http://www.sysinternals.com/ntw2k/freeware/contig.shtml

    Using this program (instructions on the website), ensure that the file "C:\Program Files\Valve\Steam\SteamApps\source sounds.gcf" is in one continguous segment. This speeds up read-times when fetching sounds during gameplay.
    2x Dell 2007WFP | A8N-E | X2 4600+ | 8800GTS 640 MB | 2 GB DDR400 | 3.07 TB | CD-RW/DVD±RW/DVD-RAM
    My Website | My DeviantART | My Spyware/Virus Removal Guide

  2. #2
    Ultimate Member
    Join Date
    Sep 2001
    Posts
    18,631
    I'ma stick this one for the time bein, because i reckon it's jolly useful

    --Jakk

  3. #3
    PC Aficionado MJCfromCT's Avatar
    Join Date
    Jun 2003
    Location
    WPI, Worcester MA
    Posts
    4,724
    First Sticky!

    As soon as I find more performance tweaks, i'll post back. In the meantime, Valve will be addressing a performance issue of HL2 relatively soon:

    http://www.hlfallout.net/#news7600

    The bug that causes a sound stutter will have an antidote very shortly, reports Valve. Many users have emailed Valve about this issue and received many responses. Here's a roundup of them:

    11/22/04 06:03:33 PM GMT
    We've found a fix for this problem, and we're planning on shipping it no later than tomorrow.

    11/22/04 04:53:34 AM GMT
    I bought up the issue of level loading times with Gary and he mentioned that this is being worked on. I am speculating that the preloading of textures will add to the loading time so this is good news.

    11/22/04 02:09:11 AM GMT
    A solution for the stuttering problem has been found and a fix is coming. I've been talking with Gary McTaggart about this today and it turns out that my texture management theory was correct. A patch will be coming for this issue that will load all of the required textures into video memory on level load, rather than doing it during game play. There is currently no ETA for this patch, but I will post an update as soon as I get more information.
    2x Dell 2007WFP | A8N-E | X2 4600+ | 8800GTS 640 MB | 2 GB DDR400 | 3.07 TB | CD-RW/DVD±RW/DVD-RAM
    My Website | My DeviantART | My Spyware/Virus Removal Guide

  4. #4
    Senior Member cusimar9's Avatar
    Join Date
    Jan 2002
    Location
    Midlands, UK
    Posts
    811
    So has the sound bug been fixed now?

  5. #5
    PC Aficionado MJCfromCT's Avatar
    Join Date
    Jun 2003
    Location
    WPI, Worcester MA
    Posts
    4,724
    The sound stuttering has not been fixed...a steam update was released, but not to fix this...the patch was delayed a day for further testing.
    2x Dell 2007WFP | A8N-E | X2 4600+ | 8800GTS 640 MB | 2 GB DDR400 | 3.07 TB | CD-RW/DVD±RW/DVD-RAM
    My Website | My DeviantART | My Spyware/Virus Removal Guide

  6. #6
    Senior Member cusimar9's Avatar
    Join Date
    Jan 2002
    Location
    Midlands, UK
    Posts
    811
    Yeah I read that, but I thought it was announced on the 22nd, then delayed a day till the 23rd... its the 24th now?

  7. #7
    PC Aficionado MJCfromCT's Avatar
    Join Date
    Jun 2003
    Location
    WPI, Worcester MA
    Posts
    4,724
    AFIAK, the "official" announcement of the problem was sometime yesterday, and the patch was delayed until today. Its a fairly major update to the game, so I don't mind if they take their time with releasing it.
    2x Dell 2007WFP | A8N-E | X2 4600+ | 8800GTS 640 MB | 2 GB DDR400 | 3.07 TB | CD-RW/DVD±RW/DVD-RAM
    My Website | My DeviantART | My Spyware/Virus Removal Guide

  8. #8
    Senior Member cusimar9's Avatar
    Join Date
    Jan 2002
    Location
    Midlands, UK
    Posts
    811
    No I guess I don't mind either

    I'm amazed they didn't spot it before release though...

  9. #9
    PC Aficionado MJCfromCT's Avatar
    Join Date
    Jun 2003
    Location
    WPI, Worcester MA
    Posts
    4,724
    True, my guess is that not loading everything at level start was something they tried to skip for performance reasons, and in some cases, it came back to bite them in the rear.
    2x Dell 2007WFP | A8N-E | X2 4600+ | 8800GTS 640 MB | 2 GB DDR400 | 3.07 TB | CD-RW/DVD±RW/DVD-RAM
    My Website | My DeviantART | My Spyware/Virus Removal Guide

  10. #10
    PC Aficionado MJCfromCT's Avatar
    Join Date
    Jun 2003
    Location
    WPI, Worcester MA
    Posts
    4,724
    http://gear.ign.com/articles/554/554744p1.html

    Here is an optimization guide that was put out before HL2 arrived, but it covers the basics which can give anyone a boost in performance.
    2x Dell 2007WFP | A8N-E | X2 4600+ | 8800GTS 640 MB | 2 GB DDR400 | 3.07 TB | CD-RW/DVD±RW/DVD-RAM
    My Website | My DeviantART | My Spyware/Virus Removal Guide

  11. #11
    PC Aficionado MJCfromCT's Avatar
    Join Date
    Jun 2003
    Location
    WPI, Worcester MA
    Posts
    4,724
    http://www.tweakguides.com/

    A HL2 tweak guide will be posted here soon as well.

    *Edit*
    Another tweak for ATi users:

    ATI users might want to use the following command for areas of HL2 that are graphics limited (this might work with CS:S as well):

    +r_fastzreject 1

    The command enables Z fill geometry pass in order to speed up rendering of the full scene rendering pass - by default I'm told it is disabled for ATI as they had some slight performance drops in the more CPU limited levels, however there are gains to be had in graphics limited levels.

    AFAIK this is presently a default option for NVIDIA (the testing was done back with 9800 / FX's), but should be updated as the default for both in the future.


    http://www.beyond3d.com/forum/viewtopic.php?t=18170
    Last edited by MJCfromCT; 11-24-2004 at 01:06 PM.
    2x Dell 2007WFP | A8N-E | X2 4600+ | 8800GTS 640 MB | 2 GB DDR400 | 3.07 TB | CD-RW/DVD±RW/DVD-RAM
    My Website | My DeviantART | My Spyware/Virus Removal Guide

  12. #12
    PC Aficionado MJCfromCT's Avatar
    Join Date
    Jun 2003
    Location
    WPI, Worcester MA
    Posts
    4,724
    Sound Stuttering Update:

    http://www.steampowered.com/index.php?area=news&id=356

    The changes in this release are directed at reducing the problem some users are experiencing with sound stuttering. The sound stuttering is not indicative of a sound problem, sound stuttering is only a symptom of texture thrashing on your video card or AGP memory. For information on how to reduce texture thrashing visit this link on our support site:

    http://steampowered.custhelp.com/cgi...hp?p_faqid=280

    This update will fix sound stuttering that users were experiencing that would last for longer than a few seconds during normal gameplay. This update will also eliminate this same behavior following a quicksave or autosave. There will still be a short pause while the autosave happens, but not the more drawn out stuttering behavior.

    We are still investigating another performance problem on some hardware, which will manifest where the game is getting into a state where performance drops to less than 5 fps and does not recover or crashes.

    Next week we will be releasing the Source SDK, along with a surprise for the community.
    Last edited by MJCfromCT; 11-25-2004 at 09:03 AM.
    2x Dell 2007WFP | A8N-E | X2 4600+ | 8800GTS 640 MB | 2 GB DDR400 | 3.07 TB | CD-RW/DVD±RW/DVD-RAM
    My Website | My DeviantART | My Spyware/Virus Removal Guide

  13. #13
    PC Aficionado MJCfromCT's Avatar
    Join Date
    Jun 2003
    Location
    WPI, Worcester MA
    Posts
    4,724
    Here is a gameplay tweak which makes the "hard" difficulty even harder:

    http://www.hlfallout.net/forums/inde...0&#entry394266
    2x Dell 2007WFP | A8N-E | X2 4600+ | 8800GTS 640 MB | 2 GB DDR400 | 3.07 TB | CD-RW/DVD±RW/DVD-RAM
    My Website | My DeviantART | My Spyware/Virus Removal Guide

  14. #14
    PC Aficionado MJCfromCT's Avatar
    Join Date
    Jun 2003
    Location
    WPI, Worcester MA
    Posts
    4,724
    http://www.tweakguides.com/HL2_1.html

    TweakGuides has released their HL2 guide, here are some of the tweaks they include.


    Performance Commands

    mat_forcemanagedtextureintohardware [0,1] - If set to 1, attempts to force texture information into your Video RAM at the start of a level, alleviating any stuttering in the game. Note, this setting was introduced with the "stutter fix" patch (See Patches Mods & Steam section for details). If you find stuttering has increased, set this to 0 and try the other stutter fixes below.

    cl_forcepreload [0,1] - If set to 1 forces all information to preload, reducing loading pauses and stuttering by not loading information on the fly.

    sv_forcepreload [0,1] - If set to 1, forces server-side preloading, once again reducing loading pauses.

    cl_ragdoll_collide [0,1] - If set to 1, prevents characters from merging into each other due to ragdoll effects, thereby improving realism with no real performance hit.

    mat_compressedtextures [0,1] - If set to 1, uses compressed textures for optimal performance. For those with graphics cards which have higher amounts of Video RAM (e.g. 256MB) setting this to 0 will improve texture appearance at the cost of some performance.

    fps_max [fps] - Limits the maximum possible framerate to the FPS specified. Has no impact on framerate performance (other than capping it). This is best set to your monitor's refresh rate for smoother FPS, due to less volatile fluctuations (e.g. fps_max 85). Setting it higher does not increase overall FPS.

    mem_force_flush [0,1] - If set to 1 forces the cache to be flushed on every allocation, which is not necessarily optimal but can reduce memory-related errors.

    r_fastzreject [-1,0,1] - If set to 1 activates a fast z-setting algorithm which takes advantage of hardware fast z reject for improved performance. If set to -1 detects your default hardware setting for this option. Initially this should be set to 1, and if you see any problems then set to -1.

    cl_smooth [0,1] - If set to 1 attempts to smooth the view after prediction errors, however this can increase stuttering and so should usually be set to 0.

    cl_smoothtime [seconds] - Time over which to smooth the view after prediction errors. If cl_smooth is enabled, experiment with values to see which gives the best results.

    sv_autoladderdismount [0,1] - If set to 1, the player automatically dismounts from ladders when the end is reach. If disabled, the player must press the USE key to mount/dismount ladders and hence cannot accidentally jump/walk off a ladder. Set to taste as there is no performance impact.

    sv_footsteps [0,1] - If set to 1, player footsteps can be heard, if set to 0 no footsteps are emitted from the player. Set to taste, has no performance impact, but can affect realism.

    violence_ablood [0,1] - If set to 1 shows alien blood when they are hit. Disabling this can improve performance but reduce realism.

    violence_agibs [0,1] - If set to 1 shows alien gore when they are hit. Disabling this can improve performance but reduce realism.

    violence_hblood [0,1] - If set to 1 shows human blood when they are hit. Disabling this can improve performance but reduce realism.

    violence_hgibs [0,1] - If set to 1 shows human gore when they are hit. Disabling this can improve performance but reduce realism.

    [Graphics]

    cl_detaildist [range] - Determines the range at which detail props are shown (e.g. grass). The higher the value, the lower your performance as more add-on details are shown. Reducing this setting can increase performance, and increasing this setting will improve image quality.

    cl_detailfade [range] - Determines the range at which detail props fade into view. Increasing this value can raise performance.

    cl_maxrenderable_dist [distance] - Specifies the maximum distance from the camera at which things will be rendered. The smaller the number, the less will be rendered, improving performance (cheat).

    cl_ejectbrass [0,1] - If set to 1, weapons eject shells as they fire. If set to 0 they don't, which can improve performance especially during heavy combat.

    cl_show_bloodspray [0,1] - If set to 1, blood sprays are emitted from bullet impacts on characters. If set to 0, no blood sprays are shown, however blood marks (decals) can still appear. Disabling this can improve performance, but reduces realism.

    cl_show_splashes [0,1] - If set to 1, splashes in water are shown, if set to 0 they are disabled. Can improve performance if disabled at the cost of realism.

    crosshair [0,1] - If set to 1, enables the crosshair on the screen, if set to 0 disables it. The performance difference is negligible, so set to taste.

    lod_Enable [0,1] - If set to 1, allows the level of detail (lod) of objects to be gradually reduced the further they are from the player. This should be set to 1 for optimal performance, or 0 for maximum image quality.

    lod_TransitionDist [range] - The distance at which the lod is reduced on objects. The higher this range, the lower your performance but the better distant objects will appear.

    mat_bloom [0,1] - If set to 1, a 'bloom' lighting effect is visible on objects, softening their appearance. If set to 0 this effect is removed, but performance is increased without a noticeable drop in image quality.

    mat_bumpmap [0,1] - If set to 1, enables bump mapping which makes flat 2D textures appear three dimensional. If disabled, textures will be loaded without bumpmapping and will appear far less realistic, however performance will be improved.

    mat_clipz [0,1] - If set to 1, uses an optimization technique to reduce what is drawn on screen for a performance improvement. Note that some Nvidia FX card owners need to set mat_clipz 0 to fix rendering problems.

    mat_diffuse [0,1] - If set to 1, uses diffuse lighting on materials. If set to 0 such lighting is removed and while performance is improved the screen is almost completely black from lack of this diffuse (ambient) lighting and hence is not recommended.

    mat_drawwater [0,1] - If set to 1, all water is rendered. Setting this to 0 can remove water for a performance boost at the cost of realism (cheat).

    mat_dxlevel [dxversion] - Determines the shader version for special effects applied to materials. Options include 70, 80, 81 and 90 (e.g. mat_dxlevel 81). This is similar to the -dxlevel switch in the Advanced Tweaking section on page 7. Using shader versions lower than the highest level supported by your card will improve performance at the cost of varying degrees of image quality loss (depending on the shader version used).
    Last edited by MJCfromCT; 11-25-2004 at 01:30 PM.
    2x Dell 2007WFP | A8N-E | X2 4600+ | 8800GTS 640 MB | 2 GB DDR400 | 3.07 TB | CD-RW/DVD±RW/DVD-RAM
    My Website | My DeviantART | My Spyware/Virus Removal Guide

  15. #15
    PC Aficionado MJCfromCT's Avatar
    Join Date
    Jun 2003
    Location
    WPI, Worcester MA
    Posts
    4,724
    mat_fastnobump [0,1] - If set to 1, floor textures have all bump mapping removed and will appear flat and smooth. This can improve performance without affecting all bump mapping in the game, but will make floors appear unrealistic.

    mat_filterlightmaps [0,1] - If set to 1, static lightmaps are rendered correctly. If set to 0, all areas of pre-rendered lighting will be blocky and unrealistic, but performance will be improved slightly at the cost of realism.

    mat_filtertextures [0,1] - If set to 1, textures are rendered smoothly. If set to 0, textures will be blocky and unrealistic (similar to the original Doom!) but performance will be improved.

    mat_fullbright [0,1] - If set to 1, lights every texture will up brightly lit up (cheat).

    mat_hsv [0,1] - If set to 1, converts everything to black and white.

    mat_mipmaptextures [0,1] - If set to 0 disables mipmap textures, which harshens textures greatly but can improve performance.

    mat_showlowresimage [0,1] - If set to 1, loads extremely low resolution blocky textures in place of the normal ones for a significant performance boost at the cost of a great deal of realism.

    mat_softwarelighting [0,1] - If set to 1, uses only software-supported lighting. Image quality is not greatly affected, but this may increase or decrease your performance depending on whether your CPU is far more powerful than your graphics card.

    mat_specular [0,1] - If set to 1, uses specular lighting. If set to 0 materials will not have specular lighting applied to them for a performance boost but a slight drop in image quality.

    muzzleflash_light [0,1] - If set to 1, weapons firing will emit a light along with the muzzle flash. If set to 0, a muzzle flash is still visible but no lighting is cast from it. Performance will improve in combat scenes with no noticeable drop in realism.

    r_decal_cullsize [pixels] - Decals (marks from weapons etc.) higher than the specified size in pixels will be removed straight away. Raising this value can improve performance during heavy gunfire for example, at the cost of some realism depending on how high this value is raised.

    r_decals [number] - Specifies the maximum number of decals possible at any one time. The higher this number, the greater the potential for getting slowdowns during large firefights as large numbers of decals are generated. Reducing this setting can improve performance in such situations.

    r_drawdecals [0,1] - If set to 1, decals are drawn. If set to 0, no decals are drawn at all improving performance but greatly reducing realism (cheat).

    r_drawflecks [0,1] - If set to 1, small chunks of rubble and dirt will be thrown up around bullet impact points. If set to 0, these 'flecks' will be disabled, reducing realism but improving performance.

    r_drawmodeldecals [0,1] - If set to 1, decals can be drawn on models, which are pretty much everything excluding walls and floors. If set to 0 these decals will be disabled, improving performance during weapons fire for example, but reducing realism.

    r_maxmodeldecal [number] - If r_drawmodeldecals is enabled, this number determines the maximum number of decals which can be drawn on a model. The higher the setting the greater the performance impact when firing at models.

    r_drawparticles [0,1] - If disabled, particle effects - which includes smoke and explosions - will not be drawn. This can greatly improve performance around such effects at the cost of a great deal of realism.

    r_DrawRain [0,1] - If set to 1, rain effects will be rendered, however if disabled no rain will be drawn. This improves performance in levels where there is visible rain, however realism is greatly reduced (cheat).

    r_drawropes [0,1] - If set to 1, all ropes and rope-like objects (e.g. powerlines) will be drawn as normal, however disabling this setting will remove such objects, perhaps improving performance in places where they exist but reducing realism (cheat).

    r_drawskybox [0,1] - If set to 0, the sky textures will be completely removed, improving performance but resulting in visual anomalies in the sky and a large reduction in realism.

    r_drawtranslucentrenderables [0,1] - If set to 1, all objects which are translucent, such as the Combine energy shields, will be drawn. If set to 0, these objects will not be drawn, improving performance around them at the cost of realism (cheat).

    r_dynamic [0,1] - If set to 1, enables dynamic lighting. If set to 0, disables dynamic lighting which can boost performance without a dramatic impact on realism.

    r_farz [-1,0,1] - Controls the far clippling plane, which determines what is not rendered when it is determined not to be visible to the character. A value of -1 is normal, higher values can result in normally visible objects suddenly disappearing from view (cheat).

    r_lod [-8 to 8] - Determines the rate at which level of detail (lod) is stripped from objects as they recede away from the player. The lower the value, the more detail remains visible on objects as they progress into the distance, reducing performance but increasing image quality.

    r_maxdlights [number] - Determines the maximum number of dynamic lights visible on the screen. The larger this maximum, the more chance of slowdowns during scenes with multiple dynamic light sources. Reducing this value can improve performance in such situations.

    r_modellodscale [0-1] - This setting is not the same as the Model Detail setting under the in-game options. You can use this value to fine tune model details, with values below 1 reducing the model details, improving performance at the cost of realism.

    r_occlusion [0,1] - If set to 0, disables the occlusion system in the game, which can increase performance at the expense of image quality.

    r_WaterDrawReflection [0,1] - If set to 0, disables all reflections on top of water. This will boost performance at the cost of realism however you may experience graphical anomalies on the water.

    r_WaterDrawRefraction [0,1] - If set to 0, disables all refraction - that is images which appear distorted under the water. This will boost performance at the cost of realism, however you may experience some graphical anomalies on the water.

    sv_robust_explosions [0,1] - If set to 0, explosions will be less spectacular, but this may improve performance around explosions without a significant drop in realism.

    fog_enable [0,1] - If set to 0, will disable fog which can improve or reduce performance depending on whether your graphics card has issues with rendering fog.

    fog_enable_water_fog [0,1] - If set to 0, removes all underwater fogging which can result in a performance boost but unrealistic water appearance.

    r_waterforceexpensive [0,1] - If set to 1, the highest quality water will be used. If set to 0, performance may improve without a noticeable reduction in water quality.
    2x Dell 2007WFP | A8N-E | X2 4600+ | 8800GTS 640 MB | 2 GB DDR400 | 3.07 TB | CD-RW/DVD±RW/DVD-RAM
    My Website | My DeviantART | My Spyware/Virus Removal Guide

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •