Deus Ex is in the Details

Similar documents
TSBK03 Screen-Space Ambient Occlusion

Dominic Filion, Senior Engineer Blizzard Entertainment. Rob McNaughton, Lead Technical Artist Blizzard Entertainment

GUERRILLA DEVELOP CONFERENCE JULY 07 BRIGHTON

Advanced Computer Graphics CS 563: Screen Space GI Techniques: Real Time

DEFERRED RENDERING STEFAN MÜLLER ARISONA, ETH ZURICH SMA/

Enhancing Traditional Rasterization Graphics with Ray Tracing. October 2015

A Trip Down The (2011) Rasterization Pipeline

CMSC427 Advanced shading getting global illumination by local methods. Credit: slides Prof. Zwicker

Direct Rendering of Trimmed NURBS Surfaces

The Ultimate Developers Toolkit. Jonathan Zarge Dan Ginsburg

Screen Space Ambient Occlusion TSBK03: Advanced Game Programming

Beginning Direct3D Game Programming: 1. The History of Direct3D Graphics

Real-Time Reyes Programmable Pipelines and Research Challenges

CS427 Multicore Architecture and Parallel Computing

Computergrafik. Matthias Zwicker. Herbst 2010

A Real-time Micropolygon Rendering Pipeline. Kayvon Fatahalian Stanford University

Real-Time Reyes: Programmable Pipelines and Research Challenges. Anjul Patney University of California, Davis

Motivation MGB Agenda. Compression. Scalability. Scalability. Motivation. Tessellation Basics. DX11 Tessellation Pipeline

TDA362/DIT223 Computer Graphics EXAM (Same exam for both CTH- and GU students)

Real-Time Rendering of a Scene With Many Pedestrians

Enhancing Traditional Rasterization Graphics with Ray Tracing. March 2015

Real-Time Universal Capture Facial Animation with GPU Skin Rendering

Direct3D 11 Performance Tips & Tricks

Chapter 10 Computation Culling with Explicit Early-Z and Dynamic Flow Control

Render-To-Texture Caching. D. Sim Dietrich Jr.

Ultimate Graphics Performance for DirectX 10 Hardware

The Application Stage. The Game Loop, Resource Management and Renderer Design

Acknowledgement: Images and many slides from presentations by Mark J. Kilgard and other Nvidia folks, from slides on developer.nvidia.

Point based global illumination is now a standard tool for film quality renderers. Since it started out as a real time technique it is only natural

Robust Stencil Shadow Volumes. CEDEC 2001 Tokyo, Japan

Why modern versions of OpenGL should be used Some useful API commands and extensions

Next-Generation Graphics on Larrabee. Tim Foley Intel Corp

Mattan Erez. The University of Texas at Austin

Many rendering scenarios, such as battle scenes or urban environments, require rendering of large numbers of autonomous characters.

Gestural and Cinematic Interfaces - DX11. David Brebner Unlimited Realities CTO

Building scalable 3D applications. Ville Miettinen Hybrid Graphics

CS GAME PROGRAMMING Question bank

Pipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

Computer Graphics. Lecture 14 Bump-mapping, Global Illumination (1)

Graphics Hardware. Graphics Processing Unit (GPU) is a Subsidiary hardware. With massively multi-threaded many-core. Dedicated to 2D and 3D graphics

SHADERX 7 : ADVANCED RENDERING TECHNIQUES

The Traditional Graphics Pipeline

Comparison of CPU and GPGPU performance as applied to procedurally generating complex cave systems

Computer Graphics (CS 543) Lecture 10: Soft Shadows (Maps and Volumes), Normal and Bump Mapping

Real-time Shadow Mapping

Technical Guide. Updated August 24, Page 1 of 19

The Vegetation of Horizon Zero Dawn. Gilbert Sanders Principal Artist, Guerrilla Games

Pipeline Operations. CS 4620 Lecture 14

Approximate Catmull-Clark Patches. Scott Schaefer Charles Loop

Lecture 9: Deferred Shading. Visual Computing Systems CMU , Fall 2013

All the Polygons You Can Eat. Doug Rogers Developer Relations

The Traditional Graphics Pipeline

CS 498 VR. Lecture 18-4/4/18. go.illinois.edu/vrlect18

Beyond Programmable Shading Course ACM SIGGRAPH 2010 Bending the Graphics Pipeline

Game Architecture. 2/19/16: Rasterization

Michal Valient Lead Tech Guerrilla Games

Ray tracing. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd 3/19/07 1

Bringing AAA graphics to mobile platforms. Niklas Smedberg Senior Engine Programmer, Epic Games

Final Project: Real-Time Global Illumination with Radiance Regression Functions

Real-Time Rendering (Echtzeitgraphik) Michael Wimmer

03 RENDERING PART TWO

Computing Visibility. Backface Culling for General Visibility. One More Trick with Planes. BSP Trees Ray Casting Depth Buffering Quiz

Shadow Techniques. Sim Dietrich NVIDIA Corporation

Horizon-Based Ambient Occlusion using Compute Shaders. Louis Bavoil

Pipeline Operations. CS 4620 Lecture 10

Multi-View Soft Shadows. Louis Bavoil

MAXIS-mizing Darkspore*: A Case Study of Graphic Analysis and Optimizations in Maxis Deferred Renderer

Sung-Eui Yoon ( 윤성의 )

The Traditional Graphics Pipeline

Visible-Surface Detection Methods. Chapter? Intro. to Computer Graphics Spring 2008, Y. G. Shin

Hardware-driven Visibility Culling Jeong Hyun Kim

Optimizing DirectX Graphics. Richard Huddy European Developer Relations Manager

CS230 : Computer Graphics Lecture 4. Tamar Shinar Computer Science & Engineering UC Riverside

Enabling immersive gaming experiences Intro to Ray Tracing

Ambient Occlusion. Ambient Occlusion (AO) "shadowing of ambient light "darkening of the ambient shading contribution

Soft Particles. Tristan Lorach

Texture. Texture Mapping. Texture Mapping. CS 475 / CS 675 Computer Graphics. Lecture 11 : Texture

CS 475 / CS 675 Computer Graphics. Lecture 11 : Texture

Abstract. 2 Description of the Effects Used. 1 Introduction Phong Illumination Bump Mapping

Object Space Lighting. Dan Baker Founder, Oxide Games

CS 354R: Computer Game Technology

Advanced Shading I: Shadow Rasterization Techniques

Software Occlusion Culling

Real Time Rendering of Complex Height Maps Walking an infinite realistic landscape By: Jeffrey Riaboy Written 9/7/03

GCN Performance Tweets AMD Developer Relations

Shadows & Decals: D3D10 techniques from Frostbite. Johan Andersson Daniel Johansson

Here s the general problem we want to solve efficiently: Given a light and a set of pixels in view space, resolve occlusion between each pixel and

Real-Time Ray Tracing Using Nvidia Optix Holger Ludvigsen & Anne C. Elster 2010

A SIMD-efficient 14 Instruction Shader Program for High-Throughput Microtriangle Rasterization

The Graphics Pipeline

Those Delicious Texels or Dynamic Image-Space Per-Pixel

RSX Best Practices. Mark Cerny, Cerny Games David Simpson, Naughty Dog Jon Olick, Naughty Dog

LOD and Occlusion Christian Miller CS Fall 2011

Shadows. COMP 575/770 Spring 2013

Real Time Rendering of Expensive Small Environments Colin Branch Stetson University

On-the-fly Vertex Reuse for Massively-Parallel Software Geometry Processing

Deferred Rendering Due: Wednesday November 15 at 10pm

Topics and things to know about them:

Transcription:

Deus Ex is in the Details Augmenting the PC graphics of Deus Ex: Human Revolution using DirectX 11 technology Matthijs De Smedt Graphics Programmer, Nixxes Software

Overview Introduction DirectX 11 implementation DirectX 11 effects

Nixxes Founded in 1999 Co-development with studios Crystal Dynamics IO Interactive Eidos-Montreal

Deus Ex: Human Revolution Developed by Eidos-Montreal Nixxes assisted with core technology PC version co-developed with Nixxes Simultaneous release in August 2011

DXHR Rendering Evolved Tomb Raider: Underworld engine New rendering features: Hybrid forward lighting and light pre-pass Improved multithreading Artist-controlled postprocessing system

DXHR PC Rendering Goals Content creation targeting consoles Much more GPU power available on PC Minimal artist time available How to utilize GPU s?

PC Rendering Advantages New DirectX 11 features Shader Model 5 Compute shaders Tessellation Improve existing effects

DirectX 11 image Implementing DirectX 11

DirectX 11 Implementation Simple code compared to DX9 Guaranteed features and formats No more device lost New API: No experience with optimization

DirectX 11 GPU Optimization Read-only depth buffers Compute shader local storage Gather instruction

DirectX 11 CPU Optimization Early on CPU was the bottleneck Many unique objects in scene Very flexible material system Too many state changes

DirectX 11 CPU Optimization Minimize state changes between drawcalls Instancing State Objects Constant Buffers Pool static vertex and index buffers

State Objects Bound to persistent objects BlendState in Material JIT creation and caching in hash tables Hash creation parameters More efficient than Create State Creation still takes time, you might want to prewarm state objects during startup

Constant buffers Bound to objects Light state (for forward lighting) Material parameters Instance parameters Other constants split by update frequency Drawable Scene

DirectX 11 image DirectX 11 Effects

DirectX 11 effects Anti-aliasing SSAO Depth of Field Tessellation Soft shadows

Anti-aliasing Anti-aliasing image Image of MLAA buffer

Anti-aliasing User preference DLAA FXAA MLAA Easy to integrate Quality and cost scale

Input DLAA FXAA MLAA

Content Slide Text Here Or here Depth of Field

Depth of Field Experimented with delta spreading Compute shader technique Use atomic ops to achieve point spreading Potential for realistic bokeh Too slow on 2010 hardware

Depth of Field DX9: PS Gaussian blur 9x9 filter kernel DX11: CS weighted Gaussian blur Separable 29x29 filter kernel Uses thread group shared memory as cache 128x2 pixels group size

Input Pixel Shader Compute Shader 9x9 29x29 Depth of Field

Gaussian Blur Performance Kernel size PS CS Speedup 9x9 1.17ms 1.25ms 0.92x 15x15 1.48ms 1.26ms 1.17x 29x29 2.36ms 1.51ms 1.55x 41x41 3.11ms 1.74ms 1.79x Resolution: 1920x1080 GPU: AMD HD 6970 Unweighted blur of 8bpp RGB

Screen-Space Ambient Occlusion SSAO image

Screen-Space Ambient Occlusion Console SSAO blurs depth PC samples in a hemisphere Less artifacts More expensive Similar to Starcraft 2

SSAO bilateral blur DX9 Pixel Shader with 9x9 kernel DX11 Separable Compute Shader with 19x19 kernel Much smoother Reduced noise Small performance hit

SSAO Off SSAO Self-Occlusion

SSAO On SSAO Self-Occlusion

SSAO image SSAO On

SSAO image What actually happened

SSAO Self-Occlusion Problem: Depth buffer is not normal mapped Exaggerated normal maps cause hemispheres to intersect with flat geometry No vertex normals available

SSAO Self-Occlusion Solution: Depth buffer contains geometry We want the viewspace vertex normal For SSAO we calculate the viewspace position ddx() and ddy() return the slope of any variable Viewspace vertex normal reconstruction: normalize(ddx(viewpos) ddy(viewpos))

SSAO image Normal buffer

SSAO image Normal reconstruction

SSAO image SSAO On (Fixed)

Content Slide Text Here Or here Tessellation

Content Slide Text Here Or here Tessellation

DirectX 11 Tessellation New stages supported on all hardware: Hull Shader Domain Shader We considered these techniques: Detail Tessellation Geometry smoothing

Detail Tessellation Tessellate and displace Looks great! But: Requires height maps Geometry needs to be carefully positioned to avoid cracks

Geometry smoothing Smoothes the contours of characters Two popular techniques Phong Tessellation PN-Triangles Equivalent results but Phong is faster

Phong Tessellation Boubekeur and Alexa, SIGGRAPH Asia 2008

Phong Tessellation Simple technique Requires only vertex position and normals In brief: Calculate tangent plane for each normal Interpolate between tangent planes Off On

Content Slide Text Here Or here Tessellation off

Tessellation on

Without Tessellation With Tessellation

Without Tessellation With Tessellation

Tessellation Cracks Tessellation Cracks image

Tessellation Cracks Characters made of multiple submeshes Multiple vertices with the same position Discontinuous normals Off On

Tessellation Cracks Our solution Generate a Tessellation Normal channel Equalizes normal for all verts in this location Normals weighted by triangle size Fixes cracks on mesh boundaries Low overhead

Tessellation Bulges Tessellation Bulges image

Tessellation Bulges Problem: Hard edges have smooth normals instead This problem appeared in some models Caused by averaging normals to fix cracks! Phong Tessellation creates rounded geometry Solution: Artists add extra polygons on edges

Original Model Fixed Model Tessellation Bulges image

Tessellation optimizations Tessellation is enabled for ~10m distance Fade out tessellation before disabling Keep the hull shader simple and fast Tessellation factor only distance-based Maximum tessellation factor of 3.0 Do cull backfacing triangles with factor 0.0

Soft Shadows Soft Shadows image

Soft Shadows SM5 shader 9x9 filter kernel for soft PCF Use GatherCmpRed to fetch 4 samples

Soft Shadows Problem: All shadow-casting lights rendered with forward lighting 9x9 kernel takes seconds to compile Caused shader build time to explode Too risky to make all lights deferred

Soft Shadows Solution: Render soft shadows deferred in screen-space Need only one shader for the game Sample from soft shadow buffer during forward lighting Not used for transparencies

Multi-monitor rendering Using vendor-specific API extensions You should support all configurations How to deal with crosshair in the bezel? Keep original field of view on primary monitor using off-center projection matrix Pull back near clip plane when FOV is high Increase depth bias for decals

Stereoscopic rendering Using vendor-specific API extensions Render frame for each eye Culling only done once Stereoscopic projection matrix

Conclusions You can utilize PC GPU s without extra art Compute Shaders are great for caching too Character tessellation is fast and effective We re only getting started using DX11

Special thanks Nicolas Thibieroz Jon Story Miguel Sainz Tim Tcheblokov

Thank you for listening! Any questions? www.nixxes.com mdesmedt@nixxes.com