Black Mesa

Black Mesa

View Stats:
This topic has been locked
GordonFreeman(Muted)  [developer] Dec 24, 2017 @ 7:38am
BMS GFX Settings for XenEngine and GFX Benchmark Testing
I am sharing some batch files for GFX config presets. Ideally, these configuration options should be provided in the game but we are in the middle of the switch to a completely new UI system.
Old VGUI based video options menu is not good enough to include all the new video options.UI overhaul using old menu system for one patch would not have been the ideal use of our developer resources so all the new video options will be shipped with New UI system.

Meanwhile please download this zip file and uncompress it into your -
"..\Steam\steamapps\common\Black Mesa\" directory" Same folder that contains bms.exe


Graphics Configs Link - BlackMesa_Gfx_Configs_For_NewRenderer[www.dropbox.com]

Note - Any change in new graphics options or convars take place only at map loading time, so you might not see the changes unless you reload the map.


For people having GPUs with less than 1.5 GB VRAM or GFx memory, I would advise using verylow and/or low graphics presets. Also turn off CSM and dynamic shadows either via convar or video options menu. Also disable new post-processing effects by using np_gr_active 0 & np_gr_quality 0.

For people having 2 GB VRAM should be able to use high and even very high if they have good enough CPU.
[I have received mixed feedback about running veryhigh on GFX memory < 3.5 gigs, during our internal testing phase so switch back to high in case game is not running at good FPS.)

Note - All these recommendations have been given based on assumptions that game is being run at 1080p resolution NO MSAA. MSAA and/or Higher resolutions can increase VRAM or gfx memory requirements (apart from stressing GPU even more).

Here is link to BMS_GFX_MAX_Onoptimized_For_Dev [www.dropbox.com] containing some video options for developers, modders and level designers. These video options are unoptimized, they use uncompressed textures and perf vs quality is not good for these presets.
They are only provided to help level designers & modders debug new lighting system.
Having said that people with very high hardware specs (core i7 3.8+ ghz GPU 1080s Vram 3+ Gigs) might be able to play the game on these extremely high settings with acceptable performance on 1080p.

These extreme configs are not officially supported so please don't report any performance issues or bugs when using one of these extreme presets. They are to be used at your own risk if your PC can handle it. These extreme presets won't be optimized for Xen either since they are just un-optimized versions of very high with uncompressed textures, extremely high texture resolutions etc useful for developers/modders.


We will try to include batch files in BlackMesa_Gfx_Configs_For_NewRenderer in our game build itself in next update. We have to update our build system to include these batch files for steam releases.



Fix for Choppy/Laggy Shadows - Shadows updating at Slow rate

Another useful convar that has not been included in the batch files is nr_shadow_max_dynamic_passes_per_frame.

It restricts the number of shadows that can be updated per frame. By default, we have set this to a low value of 7. People with good PC hardware can increase this number but it will impact performance. It affects both CPU usage and GPU usage. Based on our internal testing -
People with 3.5 & above with good GPU can just set it to 25 or even higher without noticing any noticeable impact on 1080p 60 fps.

Having said that, it would be really useful if people can post screenshots wherever they see laggy shadows or shadow updating at a slow rate at the default setting of 7.


While posting gfx bugs please post the values for these convars along with screenshots and H/W configs ( CPU / GPU / RAM / VRAM or Gfx mem).
nr_lights_quality
nr_shadow_quality
nr_shadow_res
nr_shadow_max_dynamic_passes_per_frame
cl_Csm_quality (Incase of CSM or sun shadow bugs)


MSAA
At the moment MSAA is not fully supported and people might notice minor artifacts which because worse on the higher levels of MSAA. We are looking into solutions to make Anti-Aliasing better for xen release.


New Post Process
New Post process pipeline currently supports new godrays and point light rays. At the moment quality level presets have not been implemented for godrays. They run at maximum possible settings.
Overall godrays performance is way better than the old system but this new version might affect people where fillrate is a bottleneck. People with low bandwidth GPU or people using a very high resolution. MSAA shouldn't affect the Godray pass since all the rendering is done explicitly on non-MSAA buffers.
But again they are optional and you can switch them off via video options or convars.

Godrays and point light rays might go through another round of overhaul for Xen which should improve performance even further and quality modes will be implemented too.


Performance Testing / Benchmarks
For people who want to help us even further with performance optimization (or just want to benchmark their PC for black mesa at different GFX settings), we would love to get some data about performance from different PC hardware out there. We are constantly checking everything on a variety of CPU/GPU combos internally but due to the nature of PC market, we cannot check it out on all the CPU/GPU combos out there.

We have two maps for perf testing or benchmarking test_crossfire_opt and perftest_glight.
test_crossfire_opt is our main test map for perf everytime we add/remove anything major on the code side.
perftest_glight is for testing something called fillrate for GPUs and culling.

First of all, To make this process easier I have uploaded two sets of batch files that you can download from - pertests_batch_files[www.dropbox.com]
Extract them to ..\steamapps\common\Black Mesa folder.

Here's how it works -

  1. Open up the game and go to video settings. Setup the following settings as mentioned below for consistent results.

    • Resolution/Aspect Ratio - Set these to whatever resolution you normally use while playing the game.
    • DisplayMode - Set it to FULLSCREEN.
    • ModelDetail - High (Unless you use lower values in game just keep this high)
    • TextureDetail - Ultra
    • ShaderDetail - High
    • WaterDetail - SimpleReflections
    • ShadowDetail - High (this option doesn't affect new dynamic shadows)
    • ColorCorrection - Enabled
    • AntiAliasingMode - None (It's important that you guys provide us perf number with AA turned off)
    • FilteringMode - 16x or whatever you generally use in the game.
    • MotionBlur - Disabled
    • HighDynamicRange - Expanded
    • That's it other settings doesn't matter.

  2. Apply new settings and click ok to close the settings dialog box. Then quit the game using quit menu options to save these new settings. NOW YOU READY TO RUN THE BENCHMARK.

  3. Now run ..\steamapps\common\Black Mesa\PerfTestBatchFiles\perfTest0_Ref.bat

  4. Wait 2-3 secs after the map load is finished and then bring the console (default key is `).

  5. Take a screenshot and rename it to include a suffice _0, for example, perftest1_0.jpg etc. I would highly recommend following the naming convention and renaming screenshot every time, since its the only way to determine which screenshots were taken for which GFX presets

  6. Close the game and repeat the steps 3 - 5 for batch files 0-7

  7. Same steps for perftest 2 are same just run the batch files from the PerfTestBatchFiles_2 folder.

  8. While posting your screenshots please also post your cpu/GPU/RAM/VRAM details.

Please note that crossfire perf test map is the worst case scenario and general perf in game will better than this map.

Here's a screenshot of my Gfx Settings [www.dropbox.com] for perf testing.
Here's an example screenshot of running first perf test on xfire map via the Insane batch file. -
perftest1_6 [www.dropbox.com]
Thanks for your help and understanding.

Update - Add Info about new godrays

Update #2 - I have updated the NO_Shadow batch files. Now they will switch off dynamic shadows completely including any VRAM allocation.

Update #3 - Added a new section about PerfTest/Benchmarking
Last edited by GordonFreeman(Muted); Jan 3, 2018 @ 1:57pm
< >
Showing 1-15 of 27 comments
The Doctor Dec 24, 2017 @ 7:42pm 
Huh. Interesting.
(Im so excited!)
Skymarc Dec 25, 2017 @ 12:48am 
game runs much better now thx
cryprotree Dec 25, 2017 @ 1:57am 
I found out that the antialiasing can be fixed by enabling sparse grid super sampling via nvidia-inspector. 4x runs great with the GFX config 7.0 and cvar nr_shadow_max_dynamic_passes_per_frame 50.

GTX980
Hi, there is no difference between 3.GFX_High.bat and 3.GFX_High_NoShadow.bat
Checked with diff utility
diff 3.GFX_High.bat 3.GFX_High_NoShadow.bat
no output
GordonFreeman(Muted)  [developer] Dec 25, 2017 @ 2:21pm 
Originally posted by Ghost Trail:
Hi, there is no difference between 3.GFX_High.bat and 3.GFX_High_NoShadow.bat
Checked with diff utility
diff 3.GFX_High.bat 3.GFX_High_NoShadow.bat
no output
Thanks for pointing that out. I included the wrong files by mistake.
I have updated the no shadow batch files now.
They will turn off dynamic shadows now including vram usage.

Also here's little more info regarding flickers - There are two causes of flickers in the game at the moment :

1) Flicker from lights themselves on veryLow & Low quality modes, which happen even when shadows are turned off. During our internal testing this bug seemed to be specific to Nvidia hardware.
At the moment you have to use Medium or High quality mode to avoid this flicker.

2) Shadow Flicker Due to slow update rate - This flicker will appear as if shadow are updating at very low fps . To fix this try nr_shadow_max_dynamic_passes_per_frame 32. (Warning this can have a big impact on performance on low/medium end PCs).

3) Shadow Flicker - There's another type of shadow flicker which happens both on Nvidia and AMD mostly on lower quality modes. For now try VeryHigh Gfx preset if your PC can handle it or just turn off dynamic shadows if flickers are very bad.


AMD users facing Freezes should try verlow_noshadow batch file, it might help.

Having said that we are working on proper fixes.
GordonFreeman(Muted)  [developer] Dec 26, 2017 @ 10:14am 
Added a new section about benchmarking to the OP.
NGie Dec 27, 2017 @ 7:20pm 
Settings that disable Depth of Field?
that's the thing eats up all my frames
CW3D Dec 27, 2017 @ 8:09pm 
Originally posted by Winter Wonder Fae:
Settings that disable Depth of Field?
that's the thing eats up all my frames
Its the God Rays. I disabled them and my frames were so much better. I don't think God Rays did this DoF thing before this update came out.
NGie Dec 27, 2017 @ 8:10pm 
Originally posted by CW3D:
Originally posted by Winter Wonder Fae:
Settings that disable Depth of Field?
that's the thing eats up all my frames
Its the God Rays. I disabled them and my frames were so much better. I don't think God Rays did this DoF thing before this update came out.
actually, when i have the First Version of Half Life Source and used an ENB
The Depth of Field actually eats up my frames, after disabling it, my frames we're better tho
I'll give it a shot.
GordonFreeman(Muted)  [developer] Dec 28, 2017 @ 1:19am 
There should be an option in graphics settings menu to disable godrays.
Godrays are currently implemented at max possible quality settings, they will be optimized further for xen release.
NGie Dec 28, 2017 @ 2:32am 
I disabled Godrays, the performance is still same.
CW3D Dec 28, 2017 @ 3:44am 
Originally posted by Winter Wonder Fae:
I disabled Godrays, the performance is still same.
Really? Damn that sucks, it changed my performance for me and got rid of that DoF as well. Did it get of the DoF for you atleast? Cause you gotta restart the map if you disable/enable god rays, so the map either loads in with god rays or none.
NGie Dec 28, 2017 @ 3:45am 
Originally posted by CW3D:
Originally posted by Winter Wonder Fae:
I disabled Godrays, the performance is still same.
Really? Damn that sucks, it changed my performance for me and got rid of that DoF as well. Did it get of the DoF for you atleast? Cause you gotta restart the map if you disable/enable god rays, so the map either loads in with god rays or none.
i disabled godrays at the start of the game btw and DoF impacts my Performance
THEvegs Dec 28, 2017 @ 7:13am 
in spanish plase
NGie Dec 28, 2017 @ 7:14am 
is Directx 10.1 going to be added?
since its an engine update..
< >
Showing 1-15 of 27 comments
Per page: 1530 50

Date Posted: Dec 24, 2017 @ 7:38am
Posts: 27