• Hey Guest. Check out your NeoGAF Wrapped 2025 results here!

Sniper Elite 3 Engine Tech- Silhouette Tessellation/Obscurance Fields/Compute Use

Interview with DSOgaming and Kevin Floyer-Lea, Head of Programming at Rebellion. More at the link.
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!
image002.jpg

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

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.
image004.jpg


Challenges of open environments:
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.

Does the game support tessellation?
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.
image006.jpg
 
Challenges of open environments:

Really? The levels were obviously segmented and at times even claustrophobic; if 300m is considered 'extreme range' in a so-called sniping game, something has gone very wrong (and "Oh but it was WW2" isn't an excuse, Matthäus Hetzenauer for example had a confirmed kill at 1100 meters).
 
Rebellion has some neat tech. Say what you want about their second AvP game (I enjoyed it), it looked fucking fantastic.
 
Do their obscurance fields only apply to characters? The building in that picture seems to lack the indirect shadowing that you'd typically see with some form of ao.
 
The ambient occlusion stuff sounds a little like the new distance field based AO in UE4.3. It's nice to see distance fields and ray casting being used more.
 
This game looks good. I love their approach to tessellation. I just think the setting itself is a bit dull. Not the most interesting color palette.

I might still give it a go though once it goes on sale.
 
Do their obscurance fields only apply to characters? The building in that picture seems to lack the indirect shadowing that you'd typically see with some form of so.
It's likely just more noticeable on characters due to the distances involved.
 
I'm glad that they are excited about Mantle and will support it.

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.
 
Top Bottom