Crytek tech to purge texture popping
Hovering around the lesser populated and more technical sessions of the Develop conference in Brighton yesterday, I caught a fascinating demonstration of in-house technology that Crytek is using to combat the problem of popping in its games.
Called the LODBaker, it's a nifty little plugin for the Cryengine SDK which aims to take the hassle out of creating low resolution assets for rendering in the distance, while at the same time reducing polygon counts to a tenth of their original value and speeding up framerates.
Apparently, console ports of Crysis 1 and 2 suffered badly from the popping effect that you often see when high resolution models and textures are swapped for low resolution versions as objects move away from the camera. This technique of switching assets depending on the Level Of Detail (LOD) required is common, and is intended to speed up graphics processing where high quality artwork isn't needed.
The problem is that even small differences in the appearance of the LOD assets and the high detail object they're being switched for can create a noticeable visual effect. Plus, any rendering errors as they're switched will cause glitching that's very distracting.
The way this manifests in a game is when you're moving away from an object - say a building or a car - and it seems to jump or shift in shape or blink out of existence as you pass a point. When badly implemented, it's especially noticeable on trees and vegetation as you can see the number of leaves or branches change when assets are switched.
Getting LODs right is tough. According to Crytek's Technical Art Director Dan Evans, most have to be created by hand, taking original art assets and reworking them multiple times into low res versions for different draw distances.
“It's a boring, thankless and time consuming task,” he explains, “And it's very expensive, because it means using your most skilled and creative people to do a very menial task.”
The biggest gaming news, reviews and hardware deals
Keep up to date with the most important stories and the best deals, as picked by the PC Gamer team.
The latest version of Cryengine, however, has a neat little plug-in called 'LODBaker', which generates low resolution textures and low polygon meshes from the original high detail versions in just a couple of mouse clicks. Essentially, LODBaker works with the in-game rendering engine to work out what each model will look like at distance and then strip out all the unnecessary detail.
'Baking' assets like this isn't a new technique, but is traditionally done in the third party tools like Maya which are used to create the original models. Not only does it take longer, explains Crytek's Charlie Cole, it also makes it make low quality objects look the same as high quaility ones when rendered in the game engine – hence the popping effect that's visible when they're swapped in. By creating the LODs within the game engine itself, that problem is easily overcome.
Plus, says Baker, it's proved to be extraordinarily efficient.
“You can brutally slash the poly count,” he says, “We were aiming for a 50% reduction at each LOD level, but what we've achieved is getting them down to just 10% on average... And in most cases we only need one LOD where before we needed two or three.”
LODBaker is already being used for Crysis 3, and will be available for third party developers using Cryengine soon.