40 lines of code. That's how much of an effort was needed before The Witness was compatible with NVIDIA's upcoming tool for in-game photography, Ansel. Only 140 lines of code were needed before you could start taking 360 photos in The Witcher 3.
Ansel hasn't been released to consumers yet, of course, and the compatibility process is undoubtedly more complicated for some games than others. But after spending some time with Ansel at this year's Computex, I can't wait until support for Ansel becomes more widespread.
Before GeForce Experience had matured and downsampling was as simple as adjusting a slider back and forth, in-game photography was a labour of love.
It really is an art form: learning the nuances of Cheat Engine from scratch, editing INI files, playing around with multiple versions of SweetFX and tweaking the config to be just right, mucking about with NVIDIA Inspector (because that was my graphics card at the time), adding all the custom resolutions to your monitor, and then hoping you don't overdo it and fry your GPU in the process.
Not that it happens often these days, but it does happen. Duncan Harris, founder of Dead End Thrills, told me a couple of years ago that he'd fried quite a few in his day. But that was part of the fun, pushing hardware to the brink to capture the beauty games so often promise.
In a way, Ansel removes some of the shine off that. It opens the door to a world that required skill before you could enter. But removing that barrier — much in the way Photo Mode has done for individual games — also opens up another form of gaming that people may not have experienced.
Ansel won't be released for a while, but here's what you can do. There's a set of sliders on the right hand side allowing you to adjust the brightness, vignetting, vibrance, field of view, the rotation of the camera, and a couple of other effects.
The WASD keys moved the camera in their usual directions, while U/J (or potentially I/K) to move the camera up and down. The mouse could change the view as well, but it's all a little unintuitive. It seems to rely on the game's existing controls, matching NVIDIA's aim to make Ansel as hassle-free to implement as possible.
There's multiple capture modes once you're done fiddling. You can take a standard screenshot, a 360-degree screenshot, high dynamic range (HDR) screenshots, and screenshots at resolutions all the way up to 61,440 x 34,560.
You're looking at around 1.5GB for a file that size, but hey, it's an option. When you do eventually snap your shot, the software captures multiple grabs and then stitches them together in a single image.
It means you can zoom in and still have a picture as clear as a bell, but it also takes a while to process. The laptop being demoed took a couple of minutes just to save screenshots at 3x and 4x the resolution, although given the size and detail possible it's understandable.
You could, for instance, very feasibly use Ansel to take detailed enough shots for reproduction in posters and banners. One of NVIDIA's representatives told me that did this for the company's Austin launch for the GTX 1080, although limitations with the printers — not the exported file — meant the final banner wasn't the highest possible quality.
Ansel can also export screenshots in the EXR file format, which allows you to tweak the exposure and do more colour corrections post-capture if you'd like. It'll all be built into the GPU giant's GeForce Experience middleware when it's ready for launch, although that could be a little while coming yet.
It's not all perfect though. Multiplayer games, for instance, would be less happy to give NVIDIA's tools full reign — the last thing developers want is players checking around corners and behind walls. And there would be concerns over parity as well. NVIDIA has pledged to make Ansel available for the Maxwell family of GPUs, but AMD users would be left out in the cold and game makers might have aversions to favouring one party over another.
It could, alternatively, just result in more parties pushing for AMD to implement similar features in their own software. SweetFX's post-processing shaders were embedded into RadeonPro years ago, although development on that stopped when its creator joined the AMD Gaming Evolved team.
Regardless, the presence of Ansel is exciting. Part of the fun of screenshotting is discovering new things about the games you love — and ways to enjoy games that traditionally aren't fun.
To do that, support for Ansel will need to be more widespread. Still, it's another step forward for PC gamers — provided you own a NVIDIA card.
The author travelled to Computex 2016 as a guest of Intel.