A couple of weeks ago I purchased Borderlands, but only recently I found some time to install and run it. The hours that followed were a frustrating journey into performance issues, bad port quality and a first-hand experience on how having consoles as a primary market, in the end, backfires on us all.
Loading up the game, the Nvidia The Way It’s Meant to be Played logo popped up in the pre-game credits. Fair enough, if a GPU manufacturer donates money, hardware and possibly code to a development team, it deserves the advertising.
Before loading up the game – as every graphics enthousiast would do – I configured the game to run at these settings (which correspond to the suggested settings):
- 1280 x 1024
- Anisotropic Filtering: 2x
- Texture, Character, Game detail: High
- Enabled effects: Bullet decals, Dynamic shadows, Bloom, Depth-of-Field, Ambient Occlusion, Lens Flares
I noticed the game suffered from Screen tearing and very bad performance in open areas. This was odd, since my current rig (AMD Phenom II Quad-Core, Radeon HD4890, 4Gb RAM) should be more than able to handle it.
After some toying around with the settings, I found out that the performance hit was coming from the dynamic shadows option. Fair enough, shadow mapping all game objects (buildings, characters) is an expensive operation. Still, the performance hit I was getting was abnormal, for the following reasons:
- Borderlands is based on the Unreal3 engine. Other games using this engine (Batman: Arkham Asylum, Unreal 3, …) run perfectly fine on my system, with dynamic shadows enabled.
- The shadows in-game are very primitive, probably to be in the same comic-book, cell-shaded style as the environments. Only a small amount of edge softening is applied, and (most certainly on big structures), the face edges are clearly visible in the shadow.
After searching around on the official forums, I found this thread.
In the meanwhile, I tried to fix the other problems I’ve had. Since the game is based on the Unreal 3 engine, there had to be some kind of configuration file around, that allows me to enable several options that should have been in options interface in the first place.
I just can’t grasp a PC game gets through Q&A testing without anyone noticing that the Vsync option is missing. They probably thought the induced head-aches from watching teared frames were normal. And it’s not only that, it’s the whole concept of having these options. All 360’s and PS3’s have unified hardware, I can understand how they don’t need a plethora of configuration options. But if you decide to release your game on the PC platform, dear developers, don’t assume the job is done by adding a resolution switcher.
I hacked in the following tweaks, in the WillowEngine.ini file, which can be found in the “My Games” folder of your installation.
// in the engine section, this enables vsync
// in the controls section, this binds F5 to showing an FPS counter
Bindings=(Name="F5",Command="stat fps",Control=False,Shift=False,Alt=False,LeftTrigg er=False,RightTrigger=False,bIgnoreCtrl=False,bIgnoreShift=False,bIgnoreAlt=False)
// disable the horrible frame smoothing, effectively slowing down/speeding up the game
This solved the framerate cap (62 frames, for some odd reason), and provided me with a tool to diagnose performance.
Now, why do these shadows hurt the framerate so much? Here’s some speculation for you:
- The static building shadows are not baked into the map, they are being calculated live, because the day/night cycle of the game (moving sun). Sure there are better implementations for this than (supposedly) just using the standard character shading code for a shadow that moves about an inch that way during an hour of gameplay.
- Instead of using standard UE3 shaders, the borderlands implementation uses PSSN shaders. Although they perform very well if emplemented on a modern GPU, I somehow feel the Borderlands implementation is slow and buggy. I simply don’t understand what was wrong with standard UE3 shaders.
- Only ATI cards seem to suffer from bad performance issues due to shadows. The Way It’s Meant To Be Played at work? I’m not saying the developer nerfed ATI performance, but the performance gap with Nvidia is very hard to ignore.
After reducing the resolution of the shadow maps (they are standard at 1024 minimum, 1024 maximum – nice distance scaling there … ) of min 256, max 512, performance has improved, but the shadows look dead ugly now. I won’t be playing Borderlands for a while.