Blog - Home

Comparing graphics presets and fidelity levels in Half-Life: Alyx

16/09/26 05:16

This was originally going to be a post about the graphics settings in Half-Life: Alyx - what they do, and the visual and performance impact they have. The more I researched, the more complicated things got. I won't go into too much detail in this post, but the basics are as follows.

HL:A has dynamic render resolution, referred to as the fidelity level (nothing to do with the fidelity setting in the in-game menu). It will turn the resolution up or down to try to maintain the desired framerate (the refresh rate of your VR headset, with some accounting for overhead). This causes some weird effects on how the game looks at different settings. If you turn the settings up, the game looks better, but gets harder to run - so the fidelity level lowers to maintain framerate, and the game actually looks worse. Vice-versa for turning the setttings down.

On top of this, some of the settings are not well understood. The in-game menu tries to explain the performance impact for some of them, but it's not super clear what they actually do. In the first draft, I started trying to explain the settings, but I couldn't actually find good sources for all of them. So I decided to find out for myself in-game. This turned out to be pretty tricky, and so far I've only been partially successful.

First of all, I needed a way to take comparison screenshots. As it's a VR game, it's hard to position the camera statically, so sequential shots can be compared by flicking through them. I considered placing the headset on a table, but this is an unreliable workaround, so I dug into the console commands (with the help of this gist) and found a solution:

  1. Add -console -vconsole to the games launch parameters.
  2. Launch the game, adjust graphics settings to the desired preset. Load into the first level, take off the VR headset.
  3. Open the console and run sv_cheats 1 - needed for a couple of the next commands.
  4. vr_perf_hud 1 to enable the performance HUD.
  5. vr_fidelity_level_auto 0 to disable the game automatically changing the fidelity level. This concludes the setup portion.
  6. vrfly_enable 1 to decouple the game camera from VR tracking.
  7. setpos -270 1930 210;setang 5 75 0 to position the camera on the balcony in the opening level (vrfly ensures these coordinates are relative to the map rather than VR tracking)
  8. host_timescale 0 to freeze the game world (so NPCs and such don't move between shots).
  9. Set a fidelity level, e.g, vr_fidelity_level 3
  10. Take a screenshot of the spectator view with jpeg_screenshot

I repeated steps 9-10 for each of the 9 fidelity levls (0-8) at each graphics preset, for a total of 39 screenshots. However, there's a few problems with this method:

Despite the issues, I've thrown together a page where you can compare the screenshots. Up/down cycles through the presets, while left/right cycles the fidelity level. On desktop, you can use the arrow keys. It requires JavaScript, and full disclosure, was vibe-coded by ChatGPT because I'm feeling pretty defeated at this point and did not want to wrestle with JavaScript (I am not a programmer) at 4am. I hate to subject anyone to AI slop, but if it weren't for the clanker making it for me in ten seconds flat, you would not be reading this post. That was the only use of AI in this whole project. I am trying to quit. Sorry.

As you'll likely notice, there's really not much difference between the settings. I suspect this is because:

The only difference I can spot myself is the shadows of the objects on the table, on the right side of the image. What a lot of work for so little result.

If I can find a way to drastically improve the quality of the screenshots, and reduce the friction/tediousness of changing graphics settings, I may re-visit this project. If you know a better way, please get in touch - see the homepage for contact details.