Rebellion head coder talks about Sniper Elite 3, Mantle, DX12, multi-core CPU support

Dankk

Diamond Member
Jul 7, 2008
5,558
25
91
He also talks about their proprietary Asura engine, tesselation, shaders, and some other neat stuff. Thought this would be interesting to some of you, especially if you enjoy the Sniper Elite games. I'll copy and paste some of the technical bits.

http://www.dsogaming.com/interviews...dx12-multicore-cpus-obscurance-fields-shader/

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: 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.
 

TrulyUncouth

Senior member
Jul 16, 2013
213
0
76
Just curious, but is this a company that has been paid by AMD to use Mantle? It would definitely make his opinion much more interesting if they really, honestly use it only for performance boost.
 

caswow

Senior member
Sep 18, 2013
525
136
116
i dont think amd has the amount of money to bribe all the developers to use mantle
 

Gloomy

Golden Member
Oct 12, 2010
1,469
21
81
Obscurance Fields look really, really good. Wow.

Definitely some of the more convincing real time shadows I've seen in a video game.
 

Dankk

Diamond Member
Jul 7, 2008
5,558
25
91
Lawyers gonna be lawyers. I wouldn't judge the whole company based on that lawsuit. Or, I suppose it's possible they sued Stardock knowing full well they wouldn't win, as a protective measure to show companies not to mess with them in the future - I don't know. But it's not a big deal to me.

Obscurance Fields look really, really good. Wow.

Definitely some of the more convincing real time shadows I've seen in a video game.

When I booted up Sniper Elite 3 for the first time, I saw the "Obscurance Fields" setting in the graphics options, and I was totally confused. I had no idea what it meant. Nor had I ever seen that kind of option in any other video game before. When I tried to look it up online, other people who had the PC version of the game seemed equally puzzled. I'm glad that they've cleared that up though.

And yeah, it does look really good. It's implemented very tastefully without being distracting.

mVeBiWL.jpg
 
Last edited:

TrulyUncouth

Senior member
Jul 16, 2013
213
0
76
i dont think amd has the amount of money to bribe all the developers to use mantle

I didn't mean it like that. I just know most the developers that have spoken about mantle so far have been met here with doubt because of their connections with AMD. I am just curious if this guy is in that group or not.
 

HurleyBird

Platinum Member
Apr 22, 2003
2,817
1,552
136
No mantle support yet.

Obscurance Fields and Silhouette Tessellation are realy nice.

image006.jpg

The way they're implemented seem very smart. Obscurance Fields seem to be plain better than SSAO/HBAO, and their approach to tessellation looks as close to perfect as you can hope to get.
 
Aug 11, 2008
10,451
642
126
Game.gpu has benchmarks as well. Doesnt seem very demanding for what is supposed to be such a cutting edge game. benchmark Screenshots still look nice though.

Edit: That lawsuit seems absurd BTW. Its not like "rebellion" isnt a commonly used word.
 
Last edited:

f1sherman

Platinum Member
Apr 5, 2011
2,243
1
0
The way they're implemented seem very smart. Obscurance Fields seem to be plain better than SSAO/HBAO, and their approach to tessellation looks as close to perfect as you can hope to get.

It looks decent, but just how good I can't say.
Not by comparing it to the 1st image which looks Half-Life 2 flat D:
 

Black Octagon

Golden Member
Dec 10, 2012
1,410
2
81
When I booted up Sniper Elite 3 for the first time, I saw the "Obscurance Fields" setting in the graphics options, and I was totally confused. I had no idea what it meant. Nor had I ever seen that kind of option in any other video game before. When I tried to look it up online, other people who had the PC version of the game seemed equally puzzled. I'm glad that they've cleared that up though

So what is it? Sorry, not clear to me, from either your post or that pic. No I didn't find time yet to read the whole article. Just woke up
 

Dankk

Diamond Member
Jul 7, 2008
5,558
25
91
So what is it? Sorry, not clear to me, from either your post or that pic. No I didn't find time yet to read the whole article. Just woke up

It's a form of soft shadows cast by characters onto the surrounding environment. As someone mentioned above, it's similar to traditional SSAO/HBAO, but better (not as smudgy/messy IMO, looks more natural).

I'll quote that part of the interview

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!

mVeBiWL.jpg


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.
 

Pottuvoi

Senior member
Apr 16, 2012
416
2
81
It's a form of soft shadows cast by characters onto the surrounding environment. As someone mentioned above, it's similar to traditional SSAO/HBAO, but better (not as smudgy/messy IMO, looks more natural).
No, it's not.

First and foremost it doesn't use screenspace/depthbuffer information for occluders.
Basically it's a ellipsoid raytracer.
 
Last edited:

Pottuvoi

Senior member
Apr 16, 2012
416
2
81
That makes sense. Thanks for the correction.
You are welcome.

Recommend reading the TLOU rendering paper I linked earlier, it explains how it can be done.
Not sure if SE3 uses it in directional way like TLOU or just as traditional AO. (constant light from every direction.)