Wishmaster92
Member
Interview with DSOgaming and Kevin Floyer-Lea, Head of Programming at Rebellion. More at the link.
Challenges of open environments:
Does the game support tessellation?
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 dont think we actually have any hard limit to the number of light sources; its left to the artists discretion!
DSOG: Tech wise, whats 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. Its one of those effects you just stop noticing after a while because from real world experience you expect lighting to look like that its 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 pixels relative distance/angle to it. In essence its 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 wasnt 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 cant 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 youd expect to see in the real world.
Challenges of open environments:
Obviously in terms of the engine, open worlds mean we need to render so much more and cant easily restrict the number of AIs which are active at any one time. Its 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 doesnt have a great deal of VRAM we have to constantly juggle whats on the GPU. Its one of the areas we need to improve on in the future.
Does the game support tessellation?
Tessellation is something I think were finally doing properly. Its taken a few years to get a working art pipeline and a rendering approach were 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. Its all too easy to subdivide something into millions of tiny triangles and say you support tessellation, but youll find that wont 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.