A couple of days ago, we had the pleasure of interviewing Kevin Floyer-Lea, Head of Programming at Rebellion. Kevin shared some new details with us about the tech features of the Asura Engine, its Multicore CPU capabilities, and the ‘Obscurance Fields’ setting (that most of you didn’t know for what it was responsible for). In addition, Kevin shared his thoughts on Mantle, DX12 (as well as DX11.2), a possible new Aliens vs Predator game and the advantages/disadvantages of self-publishing a PC game. Enjoy the interview after the jump!

DSOGaming: Before we begin, please introduce yourselves to our readers.

Kevin Floyer-Lea: Hi, I’m Kevin Floyer-Lea, Head of Programming here at Rebellion. I’m the architect of our in-house Asura engine. I’ve been at Rebellion for 19 years now – back in the 90s I was lead programmer on the original PC version of Aliens vs Predator. I’ve been making PC games since before these new-fangled GPUs became fashionable, and have vague memories of writing software rasterizers in machine code.

DSOG: Sniper Elite 3 will be powered by the Asura engine if we are not mistaken. Can you share some tech details about the engine and its features?

Kevin Floyer-Lea: The Asura engine has been under constant development for over 14 years now – we’re continually adding, removing and refining. We went to a fully deferred approach about 8 or 9 years ago, and our rendering tech has been steadily improving over that time, based on the needs of the games we’re developing. For Sniper Elite 3 for example, we needed a system that could cope with dynamic shadows and bounced light from a bright, desert sun. In day levels the sun and sky are pretty much the only light sources, with everything lit procedurally. In night time settings the deferred approach means we can have hundreds of light sources dotted around as well as the gentle moonlight. I don’t think we actually have any hard limit to the number of light sources; it’s left to the artists’ discretion!

DSOG: With Sniper Elite V2 we noticed that there wasn’t any performance difference with the number of CPU cores. In our analysis of Sniper Elite 3 we saw performance differences between dual-cores, tri-cores and quad-cores. Hell, the game even benefits from penta-cores, something that really surprised us. What’s changed?

Kevin Floyer-Lea: Yes, Sniper Elite 3 should definitely scale to any number of CPU cores. We have a task system that creates as many worker threads as the machine has logical processors. Work for culling, rendering, animation, AI, physics and so on is split into smaller jobs and all thrown at the task system. So as long as the number of tasks is high enough, the engine should in theory just keep scaling as you add more and more cores. On Sniper Elite V2 a lot of the AI and animation work was to a large extent single-threaded – now on Sniper Elite 3 it’s multithreaded via the task system. That makes a huge difference, and was a definite requirement now we have bigger, more open levels where 60 to 80 NPCs may be roaming around simultaneously.

DSOG: Sniper Elite 3 will take advantage of the new API, Mantle. Can you share your thoughts on this API? Why did you decide to support it? Is the performance boost significant? Did you have any trouble programming for that particular API and how different is it compared to Direct 3D?

Kevin Floyer-Lea: We’re always keen to be on the forefront with our technology – we shipped one of the very first D3D11 games for example. For years we’d been asking for a lower level approach to PC graphics much like we have on consoles, so Mantle fits the bill perfectly.

The speed difference on CPU is startling – the driver overhead we’re used to has disappeared. We can now easily construct command buffers multithreaded and then submit them to the GPU with the minimum of fuss, which makes us even more multi-core friendly and scaleable.

It’s also made apparent just how much work was going on behind the scenes with Direct3D and the associated drivers – memory being copied around, duplicate buffers holding data as it’s moved into different areas of VRAM, that sort of thing. Suddenly we have direct control over that – and that leads on to new optimisations which wouldn’t have occurred to us before. It’s not so much the immediate improvements that excite us as the potential for future advances.

DSOG: What’s your opinion on OpenGL and Direct 3D? OpenGL is said to support a lot of low-level access commands. On the other hand, MS introduced DX12 (an API that will most probably allow low-level access) at this year’s GDC. Do you feel that Mantle is in danger from the get-go?

Kevin Floyer-Lea: Whilst we’ve always used Direct3D on our PC titles, we’re very familiar with OpenGL as Asura uses it on other platforms such as mobile. Because we have a very flexible engine architecture and are very experienced at supporting new platforms, new rendering APIs on PC don’t faze us. The bottom line is that we’ll support and use whichever APIs give our players the best performance. D3D12 is definitely a step in the right direction in that regard. As it currently stands there is no reason to see why D3D12 and Mantle can’t co-exist – especially if it turns out that D3D12 is limited to newer versions of Windows. If nothing else Mantle is establishing the importance of low-level, minimal APIs, for which we’re very thankful.

DSOG: Tech wise, what’s the key graphical feature of Sniper Elite 3 that you are mostly proud of?

Kevin Floyer-Lea: It would probably be one of our compute shader techniques we call “obscurance fields”. This is the tech which allows us to have soft shadows from characters on any surrounding geometry. As well as shadowing against the world it also means characters have natural self-shadows – e.g. the inside of the legs, under the chin, an arm moving across the body. It’s one of those effects you just stop noticing after a while because from real world experience you expect lighting to look like that – it’s only when you turn it off that you notice how big a difference it makes!

Internally each character model has a simplified representation made of spheres and ellipsoids. For each pixel on screen we work out a shadowing factor for every obscurance sphere/ellipsoid in the world, which is based on the size of the obscurer and the pixel’s relative distance/angle to it. In essence it’s an analytical form of ray tracing.

If that sounds extremely costly – working out how obscured each pixel on screen is by potentially hundreds of objects – it would be if it wasn’t massively parallelised. Thanks to compute shaders this runs on thousands of threads simultaneously, and costs a similar amount to other ambient occlusion techniques. However, there are great differences between this and the more traditional “screen space ambient occlusion” methods – for a start with SSAO a pixel can’t be occluded by anything which is off screen or hidden, as the depth buffer is used to work out the occlusion.

With our obscurance fields a character can be off screen or hidden behind something else and will still generate shadows. The other big difference is that most SSAO techniques are taking probabilistic samples and thus the output needs to be smoothed or blurred to look good. With obscurance fields because we have an exact analytical answer to how obscured each pixel is by a given object, we can just use the results as is and have the correct soft falloff you’d expect to see in the real world.

DSOG: What were the challenges of creating an open-world environment for Sniper Elite 3?

Kevin Floyer-Lea: The more open environments affect every aspect of production – they take longer to design and build, and much longer to test. We changed our production methods and pipelines quite a few times as we adjusted to problems and bottlenecks we found along the way.

Obviously in terms of the engine, open worlds mean we need to render so much more and can’t easily restrict the number of AIs which are active at any one time. It’s particularly difficult when it comes to streaming tech, since the player can at any time suddenly zoom in to an area hundreds of metres away – in any direction around them. Textures can be a real problem, because we have hundreds of high detail textures and if the user doesn’t have a great deal of VRAM we have to constantly juggle what’s on the GPU. It’s one of the areas we need to improve on in the future.

DSOG: What are the advantages and disadvantages of self-publishing the PC version of Sniper Elite 3?

Kevin Floyer-Lea: One of the biggest advantages from a developer’s point of view is that we’re more in control of updates and patches, and can react to players more directly. We don’t have to seek approval from a third party every step of the way. The Mantle work is actually a good example of this – an external publisher might not see the benefits of it, but for us it’s all part of a long term plan. Similarly for Sniper Elite V2 we made a point of periodically releasing new multiplayer levels for free, so as not to split up the multiplayer community – something we’ll be doing again with Sniper Elite 3.

As for disadvantages – well we’re still learning and making the transition from indie developer to indie developer-publisher. Some things we have to discover the hard way.

DSOG: Will Sniper Elite 3 support tessellation? And if so, have you experimented with it (adaptive tessellation) in order to eliminate the pop-up/pop-in of distant objects?

Kevin Floyer-Lea: Tessellation is something I think we’re finally doing “properly”. It’s taken a few years to get a working art pipeline and a rendering approach we’re happy with, but for Sniper Elite 3 we have a form of adaptive silhouette tessellation – which only tessellates those polygons that cause a visual difference. It’s all too easy to subdivide something into millions of tiny triangles and say you support tessellation, but you’ll find that won’t run very well on any GPU! Our approach dynamically tessellates based on distance, surface curvature and orientation relative to the camera – it makes a huge difference on obvious things like wheels and gun barrels, but also on organic shapes like human faces.

DSOG: What’s your opinion about Windows 8 and DX11.2? Have you experimented with DX11.2 and can we expect your future games to natively support 64-bit systems?

Kevin Floyer-Lea: Windows 8 is fine, but D3D11.2 is not really of interest to us. We’re likely to keep supporting D3D11 (and therefore Vista and Windows 7) and jump straight to D3D12 when the time comes.

The engine happily compiles in 32 or 64 bit configs, and we’d love to *only* support 64-bit – internally we all use 64-bit builds simply because we need access to as much memory as possible. However there are a surprising number of people out there with 32-bit versions of Windows, so for now we need to keep supporting them.

DSOG: One of your most successful games was Aliens vs Predator. Both the Jaguar and PC versions of it were stunning. Would you ever return to that franchise?

Kevin Floyer-Lea: Here at Rebellion we’ve got a particularly strong attachment to the AvP universe, so it could happen. We had a lot of fun playing with people’s minds on the original game by randomising spawn positions so what was a health pack turned out to be an Alien on your next play through. So personally I’d love to see an AvP game with fully procedurally generated levels, where you literally never know what’s around the next corner.