Epic Graphics

Posted By Andrew Burnes on June 12, 2012 09:49 am | Permalink
Last year at GDC 2011, Epic Games unveiled their Unreal Engine 3 Samaritan demo in partnership with NVIDIA, giving gamers a preview of next-generation graphics. Pushing three GeForce GTX 580s operating in SLI to their limit, Samaritan wowed all with a level of fidelity previously unseen in a real-time demonstration. At GDC 2012 Epic showed the Samaritan demo once more, but instead of three GTX 580s the demo was powered by a single 'Kepler' graphics card, later revealed to be the GTX 680, our flagship GPU.

Unbeknown to most, Epic was also showing its closest partners a first look at Unreal Engine 4, the studio's next-generation development platform said to feature all of Samaritan's enhancements, a new development pipeline, and a raft of new technology. Sadly, all footage and info was embargoed, preventing us from telling you about the demo's stunning visuals and technological advances.

Today, that restriction was lifted, so below you'll find an in-depth, technically-minded interview with Unreal Engine pioneer Tim Sweeney, two glorious HD videos, and two-dozen super-high-resolution screenshots that will give you your first proper look at the next-generation of videogame graphics. Please note, each asset was captured in real-time on a single GeForce GTX 680 and was in no way edited, Photoshop'd, or pre-rendered.

Exclusive Interview: Tim Sweeney On Unreal Engine 4

There's a holy grail in every industry. For energy, it's nuclear fusion; for medicine, it's a cure for cancer; for space exploration, it's faster-than-light propulsion. The holy grail of anything is by definition difficult, expensive, or simply the stuff of science fiction. Perhaps that's why we want it so bad.

The holy grail of computer graphics is real-time Global Illumination. Global Illumination is a way of rendering the game world by simulating the behavior of light as it bounces from surface to surface. But emulating nature at the photon level is a very expensive business, which is why Global Illumination has only been used selectively to render complex CGI scenes in films.

That's about to change. With Unreal Engine 4, games will be rendered for the first time with Global Illumination in real-time. To understand the implications of this we spoke to Tim Sweeney, the founder of Epic Games and mastermind of all things Unreal.

What are the key design goals for Unreal Engine 4?

We have three big goals. First, to define the next generation of graphics capabilities that are achievable with DirectX 11 PC's and future consoles. Second, to deliver a toolset with an unprecedented mixture of power, ease-of-use, and polish. And finally, to scale the technology and its feature set up and down the spectrum of future computing devices, including iOS and Android, and mainstream PC.

What is the target platform for UE4? What kind of hardware are gamers going to need to run UE4 based games?

Unreal Engine 4's next-generation renderer targets DirectX 11 GPU's and really starts to become interesting on hardware with 1+ TFLOPS of graphics performance, where it delivers some truly unprecedented capabilities. However, UE4 also includes a mainstream renderer targeting mass-market devices with a feature set that is appropriate there.

How does the technology in UE4 compare to that of the 'Samaritan' demo?

The 'Samaritan' demo we showed at GDC 2011 was just an early prototype to test out some next-generation ideas our graphics team had. UE4 technologies go well beyond that, starting with a new real-time indirect lighting pipeline that fundamentally changes the kinds of scenes that can be supported.

What is Global Illumination and why is it so important to game realism?

Global Illumination refers to the calculation of light bouncing around a scene. GI is responsible for many of the subtle shading effects and ambience we see in real-world environments, as well as glossy and metallic reflections. Introducing real-time Global Illumination into Unreal Engine 4 is the biggest breakthrough in lighting since Unreal Engine 1 introduced real-time Direct Illumination in 1995.

Please give us an overview of how the algorithm works from generating the octree, to cone tracing, to the gathering pass.

The technique is known as SVOGI - Sparse Voxel Octree Global Illumination, and was developed by Andrew Scheidecker at Epic. UE4 maintains a real-time octree data structure encoding a multi-resolution record of all of the visible direct light emitters in the scene, which are represented as directionally-colored voxels. That octree is maintained by voxelizing any parts of the scene that change, and using a traditional set of Direct Lighting techniques, such as shadow buffers, to capture first-bounce lighting.

Performing a cone-trace through this octree data structure (given a starting point, direction, and angle) yields an approximation of the light incident along that path.

The trick is to make cone-tracing fast enough, via GPU acceleration, that we can do it once or more per-pixel in real-time. Performing six wide cone-traces per pixel (one for each cardinal direction) yields an approximation of second-bounce indirect lighting. Performing a narrower cone-trace in the direction of specular reflection enables metallic reflections, in which the entire scene is reflected off each glossy surface.

[Editor's Note: If the above sequence seems alien to you, it's because it is. Global Illumination requires a totally new lighting pipeline. In a traditional game, all indirect lighting (light that is bounced from a surface) is calculated in advance and stored in textures called lightmaps. Lightmaps give game levels a GI-look but since they are pre-computed, they only work on static objects.

In Unreal Engine 4, there are no pre-computed lightmaps. Instead, all lighting, direct and indirect, is computed in real-time for each frame. Instead of being stored in a 2D texture, they are stored in voxels. A voxel is a pixel in three dimensions. It has volume, hence the term "voxel."

The voxels are organized in a tree structure to make them efficient to locate. When a pixel is rendered, it effectively asks the voxel tree "which voxels are visible to me?" Based on this information it determines the amount of indirect light (Global Illumination) it receives.

The simple takeaway is this: UE4 completely eliminates pre-computed lighting. In its place, it uses voxels stored in a tree structure. This tree is updated per frame and all pixels use it to gather lighting information.]

Other game engines also claim to have real-time GI in one flavor or another. What makes the UE4 implementation unique?

Techniques such as Light Propagation Volumes have shipped in past games, and provided an approximate solution for real-time diffuse Global Illumination. The SVOGI solution in UE4 is unique in that it allows a full-scene indirect specular and reflective solution. This solution is key to the realistic rendering of metallic and glossy surfaces.

DirectX Compute is used extensively in the renderer. Tell us a bit more about that.
In the UE4 Elemental demo, the majority of the GPU's FLOPS are going into general compute algorithms, rather than the traditional graphics pipeline. This shouldn't be surprising, as the core of the traditional pipeline is fed by fixed-function hardware and will ultimately be saturated given more performance at a fixed resolution. But the compute pipeline has unlimited forward scalability, so the compute trend should only grow in the future.

How has the PhysX engine evolved in UE4? How is it used in the demo?

We used PhysX for all collision queries in UE4, and all the physics objects you see in the interactive part of the demo (hammer, statues, planets etc).

From an artist's perspective, how does making a game using UE4 differ from existing graphics engines?

Despite the advanced graphical feature set, the tools are actually the most unprecedented part of UE4. The combination of power and ease-of-use goes way beyond our past engine efforts, enabling artists and designers to take control of far more of the pipeline than was possible in the past.