662f414e5e2a5

662f414e5e99b
1 Guest is here.
 

Topic: Tweaking the cam_ext.cfg file Read 12688 times  

662f414e5f6e4Arthandas

662f414e5f755
I just bought SS2 from GOG and after installing all the recommended mods I started the game but it didn't run too well. After messing with the cam_ext.cfg file I managed to solve all my issues. I'm going to post my finding as others may find it useful.

First thing to do if you don't have those options forced in your graphic card's control panel is to enable vsync and triple buffering. To do so, change:
single_display_mode 2 to single_display_mode 3
;vsync_mode 0 to vsync_mode 3

By default, the game has enabled 8 samples of antialiasing which is an overkill so you can safely set it to 4 for a possible performance boost:
multisampletype 8 to multisampletype 4

As noted by Kolya in the newbie modding guide, you can enable bloom by changing:
;postprocess 1 to postprocess 1
;bloomscale 5 to bloomscale 5
;bloom_threshold 0.70 to bloom_threshold 0.85
I personally would leave bloomscale at 5/6 instead of 4 as in the modding guide.

While playing on larger resolutions, the UI text can be hard to read. You can scale the UI by setting:
;d3d_disp_scaled_2d_overlay 64 to d3d_disp_scaled_2d_overlay 2
This will basically double the UI size. Alternatively you can set a custom UI resolution but it will most often result in blurred text. You can do it by typing your desired resolution like in this example:
d3d_disp_scaled_2d_overlay 1024 768

By default, the in-game movies are stretched to the width of your monitor. If you want less pixelated but smaller videos, set:
ui_scale_mode 2 to ui_scale_mode 1
;scale_movie_to_ui to scale_movie_to_ui

The last issue I had to resolve was stuttering while walking. The game ran at perfect 60 fps but there was very noticeable stuttering/frame skipping while moving in any direction. Disabling d3d_disp_limit_gpu_frames 1 1 fixed it but caused mouselook stuttering. Instead of disabling it, I changed:
;d3d_disp_enable_hdr 32 to d3d_disp_enable_hdr 32
;d3d_disp_sw_cc to d3d_disp_sw_cc
I don't know if those settings changed anything visually but stuttering was gone.

If you're having performance issues, try changing this line and see if that helps:
d3d_disp_limit_gpu_frames 1 1 to d3d_disp_limit_gpu_frames 2 2
Check bluemess' post for more details: https://www.systemshock.org/index.php?topic=4605.msg53162#msg53162

The last thing you can change is:
;d3d_disp_enable_atoc 1 to d3d_disp_enable_atoc 1
Enabling this option will smooth all transparent areas (like antialiasing).

Tested on: Windows 7 Ultimate x64 Bit, Radeon 5770 1gb (catalyst 13.1)
Results may vary but I hope this helps anyway.
« Last Edit: 07. March 2013, 10:09:50 by Arthandas »
Acknowledged by: Pedruh47

662f414e5f94bvoodoo47

662f414e5f9a1
note - the performance hit when enabling FSAA (8x) should be negligible on any decent gpu. no need to disable or lower it, unless you are running a really crappy integrated card. a 5770 can take it without batting an eye.

messing with vsync is not recommended, but hey, whatever works.

this is actually not the first time a 5770 user has reported stuttering, and fixed it by enabling the hdr/shader stuff. weird, but as I've said, whatever works..

662f414e5fac2Simplex

662f414e5fb1f
I also thought 8 FSAA should be no problem, especially on a GTX670 but there was at least one place where my framerate would consistently drop below 60 (Sadly I do not remember where, I think it was somewhere in Hydro) - so I dialed down to 4 and I did not see any difference in graphics quality and I also no longer had any framerate hiccups.

662f414e5fbecArthandas

662f414e5fc37
I know that 8x AA performance wise is no problem (for my card at least) but I fail to see any noticeable difference between 8x and 4x at 1680x1050 resolution so why bump it more? IMO 4x is more than enough to eliminate any jaggedness. If you can spot the difference between those two settings and maintain constant 60fps then by all means leave it at 8x :)
« Last Edit: 02. March 2013, 19:02:24 by Arthandas »
662f414e5ffcf
Anti-Aliasing almost always affect the mouse movement and can really make it very floaty and unprecise (even if you're running a game in 100 FPS) so it's often a good idea to not bump it up too much (4x is usually enough for 1920x1200, imo).
 

662f414e60073Arthandas

662f414e600be
I edited my first post to include info about UI size and movie stretching as I also found it nice to know.

662f414e607dbbluemess

662f414e60839
tl;dr version at the bottom.

I committed a sin of newer actually finishing SS2. On the occasion of all this GOG release fuss I've decided to mess around with mods and settings to prepare the game for optimal play experience.

I've also encountered movement stuttering and laggy mouse problem. The perpetrators causing this issue turned out to be d3d_disp_limit_gpu_frames 0 0 and vsync_mode 3 combined together.

What does d3d_disp_limit_gpu_frames actually do:

d3d_disp_limit_gpu_frames 0 0 - this is default setting. If you comment this variable in “cam_ext.cfg” this is what it is set on. As doc files state, this allows GPU to process as many frames in advance as it pleases.

Let's say, hypothetically that we have vsync on with 60Hz refresh rate. In this hypothetical example GPU is capable of processing 8 frames “at once” in advance. GPU is processing 8 frames per every actual screen frame, so in other words it's processing frames at 60 * 8 = 480 fps. 8 frames are processed at 480 fps and screen frames are changing at 60 fps, so every frame out of this 8 will have to wait its turn to be displayed. When it comes to show the last one, it will be 1/60 * 8 = 0,13 second outdated. What we will see on the screen will be a snapshot of game state as it was 0,13 second ago. This can potentially accumulate frames even more as game goes by and cause further delays. This 8 frames in advance will not be constant, depending on actual game location, it can drop below 8 frames in advance or go above in areas with low graphics load.

I realize that the example above is exaggerated and imprecise (not actual frames are buffered, but rather rendering commands), but it shows the idea. This state of things will manifests itself by movement stuttering and laggy mouse response. This will occur only with vsync on. When vsync is off, GPU doesn't have to wait for anything and displays frames as soon as they're processed, thus no lags or delays appear.

d3d_disp_limit_gpu_frames 1 1 - this will limit GPU to process one frame at a time. It is preset to this value in “cam_ext.cfg” after SS2Tool installation. This definitely resolves stuttering/lag problem, but introduces huge performance loss.

With vsync off (for testing) and d3d_disp_limit_gpu_frames set to 0 0 (as in example above) I have frame rate never dropping below 60 and go way beyond on average. Setting it to 1 1 results in a huge overall fps decrease and occasional drops to 35 fps. I have a dated low end graphics card (like 2011 dated), but come on, one can assume that it will run SS2 flawlessly without effort. There is obviously something terribly wrong with that setting. What actually happens is that this setting prevents GPU from rendering continuously and it's forcing it to sit idle between frames. It suppresses graphics card from effectively utilizing it's computing capability and results in lower fps that could be expected. Modern GPUs can probably overcome this hold back and still render at decent frame rate, but that doesn't negate the existence of the issue.

With d3d_disp_limit_gpu_frames set to 0 0 there are no frame drops, but stuttering/lag problems appear because of forward frame processing. When set to 1 1 these problems disappear, but huge performance loss is introduced. I've figured a way to combine some variables to achieve all of the above benefits without disadvantages. It goes as follows:

vsync_mode 3 or just ;vsync_mode 0
framerate_cap 58.0
d3d_disp_limit_gpu_frames 0 0 or just ;d3d_disp_limit_gpu_frames 1 1

Vsync is on and d3d_disp_limit_gpu_frames is set to process frames in advance. The game changer here is framerate_cap. The idea is to set it to never go above 60 fps. This will efficiently suppress game engine from processing too many frames ahead, so no lag will be introduced. It can't be set exactly to 60 because of some frame rate computations imperfectness this will tend to go around 62 fps, creating a space for this 2 frames to be buffered in advance (I've checked and it creates noticeable lag). Setting it to 58 will limit FPS to never go above 59 and assuring that no frames are buffered ahead. With this settings I have vsynced steady 59 fps with no drops and no lags that I am able to notice.

About the Arthandases magical solution to stuttering/lagged mouse problem by enabling d3d_disp_enable_hdr 32 and d3d_disp_sw_cc and why it actually works. This lag is introduced by rendering too many frames ahead. Both of these options that Arthandas enabled have performance overhead. This will give GPU some more work to do each frame and will keep it busy, decreasing its capability to process frames ahead and thereby reducing in a way this stuttering/lag effect. Here, mystery solved.

d3d_disp_limit_gpu_frames 0 0 (which is default) and d3d_disp_limit_gpu_frames 1 1 (which is preset in “cam_ext.cfg”) are two worse possible options to be set alone with vsync on. First one will render too many frames ahead causing stuttering/lag and second one will kill GPU performance by forcing it to be idle between frames. But there is third possibility that will run flawlessly with no issues:

d3d_disp_limit_gpu_frames 2 2 - this will allow GPU to process one frame ahead at max. It eliminates storing of outdated frames silliness from 0 0 setting. One frame ahead will not cause lags, this is by all means desired and how it should be done. Unlike 1 1 setting, GPU is almost continuously busy with no idle freezes by preparing one frame ahead and therefore efficiently utilizing it's computing capability. With this setting I have rock solid 60 fps with vsync, no drops at any point, with no stuttering/input lag that I am able to catch. For me it completely alters game experience making it much more smooth and responsive. It makes me wonder why this is not widespread as an obvious solution, as it neatly solves all of the problems. Better yet, why is it not preset as default?

I don't have any insights into to SS2 engine and I don't know its mechanics, so it's all a bit speculative, but the results that I'm having seem to confirm my hypothesis. I know this was a “bit” long, but I wanted to present my path of reasoning that led me to this conclusion.

tl;dr: For optimal performance with vsync on and no stuttering/input lag set:
d3d_disp_limit_gpu_frames 2 2

Enjoy flawless SS2 gameplay!

662f414e60942Arthandas

662f414e6098f
At my current cam_ext configuration I didn't notice any difference between d3d_disp_limit_gpu_frames 1 1 and d3d_disp_limit_gpu_frames 2 2 (maybe because the game's already running without any issues) but I'll just leave it at 2 2.

662f414e60ab2ZylonBane

662f414e60b07
If your game already runs smoothly at "1 1", bumping it to anything higher will accomplish nothing more than introducing additional frames of input lag (or more accurately, output lag).

662f414e611a7bluemess

662f414e611fa
If your game already runs smoothly at "1 1", bumping it to anything higher will accomplish nothing more than introducing additional frames of input lag (or more accurately, output lag).
Precisely. But there will always be lag with vsync on. Vsync itself introduces lag up to 16ms (for 60Hz) depending on when in that interval game will read and process input. Turning on triple buffering adds a bit more further lag. But it's OK and considered negligible. I think same goes for 2 2 setting.

I did some benchmark with no vsync, playing the game through some part where fps drops occur. For both settings I've played the same way and repeated the test several times to get most accurate results. This is what I get:
Code: [Select]
1 1 setting - Avg: 79  Min: 48 Max: 103
2 2 setting - Avg: 113 Min: 64 Max: 132

This shows how much of a performance killer 1 1 setting is. With 2 2 I have over 40% fps increase in average, which is enormous boost. This boost makes gameplay smoother especially with vsync on. My “cam_ext.cfg” settings are pretty similar to Arthandases from his initial post and I have a majority of mods installed*. With 1 1 I would have to disable some options to enjoy fluid gameplay, but thanks to 2 2 I don't have to.

For any semi modern graphics card 1 1 is probably best, as they will keep high frame rates regardless of this settings performance degradation. For older cards with performance drops, 2 2 setting might resolve it without the need for disabling any quality options and will not introduce lag, as it did for me.

I share all this to point out 2 2 option, as it is not given anywhere as possible troubleshooting solution.

*SHTUP, ADaoB, SHMUP, Rebirth, Four Hundred, Tacticool Weapon Replacements, Eldron Psi Amp, RocketMan Alternative Weapons, R&R&R's EMP Rifle, "Where Am I?" Extreme Retro, Eldron's Midwife as Nurse Bloome, Hi-Resolution Player Models, earth dynamic newsky, Vurt's Flora Overhaul, Vurt's Hi-Res Space Textures, Vurt's misc stuff, Vurt's Organics / Goo, Vurt's Water, Vurt's png hires space with Earth

662f414e612b2Simplex

662f414e61300
So is there any reason at all to stay at "1 1" instead of "2 2"?

662f414e61389ZylonBane

662f414e613de
Not if you don't mind laggy gameplay.
662f414e61525
Just try it and see if it works for you, Simplex.

662f414e61611voodoo47

662f414e61666
I have tested NewDark on quite a few machines, ranging from really old pieces of junk up to the newest and shiniest, and the 1 1 setting seemed to work best on all of them.

so, if 1 1 (the default ss2tool setting) works fine, I would suggest you just leave it alone - remember the primary directive: if it ain't broke, don't fix it.

662f414e61a14bluemess

662f414e61a6c
I agree with voodoo47. If 1 1 had worked for me, I wouldn’t even bother to mess around with this option. If you have frame drops, try 2 2. Default 0 0 is IMO ridiculous in any case.

Edit:
I have tested NewDark on quite a few machines, ranging from really old pieces of junk up to the newest and shiniest, and the 1 1 setting seemed to work best on all of them.
Work best out of what? Because I bet you didn't check 2 2 to compare. I'm just saying :)
« Last Edit: 07. March 2013, 11:20:12 by bluemess »

662f414e61d80Zanderat

662f414e61dd2
- remember the primary directive: if it ain't broke, don't fix it.
I thought this was the Prime Directive:

http://en.wikipedia.org/wiki/Prime_Directive

Live long and prosper.    8)
662f414e6288c
I have to use 2 2 in Thief or the game will come to a halt every time some elaborate particle effects are onscreen (fire, fire arrow, etc.).

662f414e6330aZylonBane

662f414e63374
I thought this was the Prime Directive:

http://en.wikipedia.org/wiki/Prime_Directive

Live long and prosper.    8)
Don't explain the joke.

662f414e6395fvoodoo47

662f414e63a2e
I have to use 2 2 in Thief or the game will come to a halt every time some elaborate particle effects are onscreen (fire, fire arrow, etc.).
interesting. hd5770, perhaps?

662f414e641ddRainalkar

662f414e64260
While playing on larger resolutions, the UI text can be hard to read. You can scale the UI by setting:
;d3d_disp_scaled_2d_overlay 64 to d3d_disp_scaled_2d_overlay 2
This will basically double the UI size. Alternatively you can set a custom UI resolution but it will most often result in blurred text. You can do it by typing your desired resolution like in this example:
d3d_disp_scaled_2d_overlay 1024 768

Option 1 does double the UI (which is really difficult to read at 1920x1080), but although it is not blurry, it's quite pixelated.
Option 2 makes it blurry, especially if you want it to be a bit larger.
Is there a way to make the UI look as good on higher as well as on lower resolutions?

662f414e6436ebluemess

662f414e643f3
Double the size or blurry, no other way. Try if 960 720 will work for you (1.5 times upscaled, so in half way, but will be blurry).
« Last Edit: 07. March 2013, 16:08:01 by bluemess »

662f414e644a3Rainalkar

662f414e644f2
I understand. Oh well, you can't have it all.
662f414e647d8
interesting. hd5770, perhaps?
Close, HD6970.
Acknowledged by: voodoo47

662f414e64901Arthandas

662f414e64950
Sadly, I encountered another issue. The biomatter (I'm using Vurt's organics) on the wall when you enter Hydroponics basically halves my fps. It goes from 60 to 31-34 when it's on screen. Setting d3d_disp_limit_gpu_frames 2 2 bumps it to an average 45fps. So far I had perfect 60fps in all other areas. I believe it's the engine's fault as disabling antialiasing, 32 bit hdr or software shaders has zero impact on framerate in this situation. I'm curious if there's a particular setting responsible for that, I'm going to mess with the settings a little later.
1 Guest is here.
And then the impact shattered every bone in his body. The End!
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
662f414e6511d