SHADERX 7 : ADVANCED RENDERING TECHNIQUES

Similar documents
GUERRILLA DEVELOP CONFERENCE JULY 07 BRIGHTON

Building scalable 3D applications. Ville Miettinen Hybrid Graphics

Enhancing Traditional Rasterization Graphics with Ray Tracing. October 2015

Graphics Shaders. Theory and Practice. Second Edition. Mike Bailey. Steve Cunningham. CRC Press. Taylor&FnincIs Croup tootutor London New York

Enhancing Traditional Rasterization Graphics with Ray Tracing. March 2015

Deus Ex is in the Details

Graphics and Interaction Rendering pipeline & object modelling

Consider a partially transparent object that is illuminated with two lights, one visible from each side of the object. Start with a ray from the eye

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

CHAPTER 1 Graphics Systems and Models 3

CS GAME PROGRAMMING Question bank

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

COMP30019 Graphics and Interaction Rendering pipeline & object modelling

Lecture outline. COMP30019 Graphics and Interaction Rendering pipeline & object modelling. Introduction to modelling

Mach band effect. The Mach band effect increases the visual unpleasant representation of curved surface using flat shading.

Com S 336 Final Project Ideas

Dynamic Ambient Occlusion and Indirect Lighting. Michael Bunnell NVIDIA Corporation

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

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

HE COMPLETE OPENGL PROGI FOR WINDOW WIND

Interpolation using scanline algorithm

Rendering Algorithms: Real-time indirect illumination. Spring 2010 Matthias Zwicker

Real-Time Rendering. Tomas Möller Eric Haines. A K Peters Natick, Massachusetts

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane

Interactive Computer Graphics A TOP-DOWN APPROACH WITH SHADER-BASED OPENGL

REYES REYES REYES. Goals of REYES. REYES Design Principles

Topics and things to know about them:

Real-Time Hair Rendering on the GPU NVIDIA

Today. Rendering algorithms. Rendering algorithms. Images. Images. Rendering Algorithms. Course overview Organization Introduction to ray tracing

Chapter 11 Global Illumination. Part 1 Ray Tracing. Reading: Angel s Interactive Computer Graphics (6 th ed.) Sections 11.1, 11.2, 11.

Enabling immersive gaming experiences Intro to Ray Tracing

Chapter 7 - Light, Materials, Appearance

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

GLOBAL EDITION. Interactive Computer Graphics. A Top-Down Approach with WebGL SEVENTH EDITION. Edward Angel Dave Shreiner

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

A Trip Down The (2011) Rasterization Pipeline

Computer Graphics 1. Chapter 7 (June 17th, 2010, 2-4pm): Shading and rendering. LMU München Medieninformatik Andreas Butz Computergraphik 1 SS2010

COM337 COMPUTER GRAPHICS Other Topics

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

Subdivision Of Triangular Terrain Mesh Breckon, Chenney, Hobbs, Hoppe, Watts

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

Real-Time Universal Capture Facial Animation with GPU Skin Rendering

521493S Computer Graphics. Exercise 3

Those Delicious Texels or Dynamic Image-Space Per-Pixel

Interactive Cloth Simulation. Matthias Wloka NVIDIA Corporation

CSE328 Fundamentals of Computer Graphics: Concepts, Theory, Algorithms, and Applications

INFOGR Computer Graphics. J. Bikker - April-July Lecture 10: Ground Truth. Welcome!

Modeling the Virtual World

Computer Graphics I Lecture 11

Advanced 3D Game Programming with DirectX* 10.0

Topic 12: Texture Mapping. Motivation Sources of texture Texture coordinates Bump mapping, mip-mapping & env mapping

After the release of Maxwell in September last year, a number of press articles appeared that describe VXGI simply as a technology to improve

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

Applications of Explicit Early-Z Z Culling. Jason Mitchell ATI Research

COMP 4801 Final Year Project. Ray Tracing for Computer Graphics. Final Project Report FYP Runjing Liu. Advised by. Dr. L.Y.

Level of Details in Computer Rendering

CS354R: Computer Game Technology

Review. Stephen J. Guy

Topic 11: Texture Mapping 11/13/2017. Texture sources: Solid textures. Texture sources: Synthesized

Rendering Grass with Instancing in DirectX* 10

Interactive Methods in Scientific Visualization

Voxel Cone Tracing and Sparse Voxel Octree for Real-time Global Illumination. Cyril Crassin NVIDIA Research

ECS 175 COMPUTER GRAPHICS. Ken Joy.! Winter 2014

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

Graphics and Visualization (GV)

Programming Guide. Aaftab Munshi Dan Ginsburg Dave Shreiner. TT r^addison-wesley

Lahore University of Management Sciences. CS 452 Computer Graphics

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

Next-Generation Graphics on Larrabee. Tim Foley Intel Corp

Introduction to Computer Graphics

CS 498 VR. Lecture 19-4/9/18. go.illinois.edu/vrlect19

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

Topic 11: Texture Mapping 10/21/2015. Photographs. Solid textures. Procedural

CPSC GLOBAL ILLUMINATION

CSE 167: Lecture #8: GLSL. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

Global Illumination. COMP 575/770 Spring 2013

Lahore University of Management Sciences. CS 452 Computer Graphics

Computergrafik. Matthias Zwicker. Herbst 2010

Today. Rendering algorithms. Rendering algorithms. Images. Images. Rendering Algorithms. Course overview Organization Introduction to ray tracing

Mattan Erez. The University of Texas at Austin

5 Linear Algebra Determinants Matrices...121

Computer Graphics. Shadows

Technical Guide. Updated August 24, Page 1 of 19

Introduction to Visualization and Computer Graphics

NVIDIA Case Studies:

Computer Graphics: Programming, Problem Solving, and Visual Communication

Advanced Maya Texturing and Lighting

Beyond Programmable Shading Course ACM SIGGRAPH 2010 Bending the Graphics Pipeline

Recollection. Models Pixels. Model transformation Viewport transformation Clipping Rasterization Texturing + Lights & shadows

Mental Ray for BK5100

Programmable Shaders for Deformation Rendering

Distributed Ray Tracing

Shading, lighting, & BRDF Theory. Cliff Lindsay, PHD

Overview: Ray Tracing & The Perspective Projection Pipeline

CS427 Multicore Architecture and Parallel Computing

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

Real-Time Rendering of a Scene With Many Pedestrians

Rendering Part I (Basics & Ray tracing) Lecture 25 December 1, 2015

Advanced Maya e Texturing. and Lighting. Second Edition WILEY PUBLISHING, INC.

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

Transcription:

SHADERX 7 : ADVANCED RENDERING TECHNIQUES WOLFGANG ENGEL Charles River Media Apart of Course Techno(ogy, Cengage Learning ~.. COURSE TECHNOLOGY 1% CENGAGE Learning- Australia, Brazil, Japan, Korea,Mexico,Singapore, Spain, United Kingdom, United States

Contents Part I 1.1 1.2 1.3 1.4 Geometry Manipulation 1 Scalarto Polygonal: Extracting Isosurfaces Using Geometry Shaders 3 Scalar Fields Versus Polygonal Representation 3 Isosurface Extraction Using Marehing Methods 6 Hybrid Cubes/Tetrahedra Extraction 7 Isosurface Extraction Results and Analysis 29 Fast High-Quality Rendering with Real-Time Tessellation on GPUs 33 GPU Tessellation Pipeline 37 Programming for GPU Tessellation 41 Continuous Tessellation Mode 45 Adaptive Tessellation Mode 48 Rendering Characters with Tessellation 51 Designing a Vertex Evaluation Shader for GPU Tessellation 53 Accessing Per-Vertex Data Beyond Input Structure Declaration 59 Tessellation API in Direct3D 10 60 Lighting with Tessellation and DisplacementMapping 60 Rendering Animated, Tessellated Characters 61 Displacement Map Tips and Reducing Surface Cracks 68 Dynamic Terrain Rendering on GPUs Using Real-Time Tessellation 73 Programming for Adaptive GPU Tessellation 76 Transforming Mesh Using R2VB 79 Computing Per-Edge Tessellation Factors 83 Rendering Tessellated Mesh with Per-Edge Tessellation Factors 89 Shading Tessellated Displaced Surfaces 93 Performance Analysis 103 Adaptive Re-Meshing for Displacement Mapping 107 107 Displacement Map 108 Adaptive Re-Meshing for Displacement Mapping 109 LOD 112 Results 114 xv

xvi Contents Implementation 114 Demo 116 116 Endnotes 116 1.5 Fast Tessellation of Quadrilateral Patches for Dynamic Levels of Detail 119 119 The Method 120 How Many Strips Will Be Needed? 123 Where Will Each Strip Be Located? 124 How Do We Tessellate Each Strip? 124 A 3D Interpolation to Place Triangle Strips 124 A 2D Interpolation to Tessellate Strips 126 Results 127 Discussion 128 Part 11 Rendering Techniques 131 2.1 Quick Noise for GPUs 133 133 Background 133 Math to the Rescue 134 Applying It in the Real World 135 And Now the Bad News 137 Implementation, the Sequel 138 Results 140 Future Work 140 2.2 Efficient Soft Particles 143 143 Hard Partieles vs. Soft Partieles 144 Implementing Soft Particles the Standard Way 145 Optimizing Soft Partieles 145 Results 146 147 2.3 Simplified High-Quality Anti-Aliased lines 149 Abstract 149 149 Method 150

Contents xvii Texture Creation 150 Vertex Setup 152 Variations on the Theme 154 155 Appendix A: The Shader Code 155 2.4 Fast Skin Shading Background and Existing Art Specular and Diffuse Data Preparation 161 161 162 163 171 172 2.5 2.6 An Efficient and Physically Plausible Real-Time Shading Model Review: Blinn-Phong and Cook-Torrance Some Physics of Light-Surface Interaction Toward an Improved Shading Model Mathematical Formulation Appendix Graphics Techniques in Crackdown Sky Implementation Notes Clutter Outlines Deferred Rendering Vehicle Reflections Implementation Notes Texture Map Setup Endnotes 175 175 176 178 179 180 185 189 189 190 192 193 198 201 205 208 209 214 214 2.7 Deferred Rendering Transparency Transparency Overview Rendering Results Discussion Summary and Future Work 217 217 218 219 221 223 224

xviii Contents 2.8 Deferred Shading with Multisampling Anti-Aliasing in DirectX 10 Deferred Shading Principles MSAA Requirements for Deferred Shading Implementation Assessment of Alternative Implementation 225 225 226 227 231 240 242 2.9 Part 111 3.1 3.2 Light-Indexed Deferred Rendering Rendering Concept Light-Indexed Deferred Rendering Combining with Other Rendering Techniques Multi-Sample Anti-Aliasing Transparency Shadows Constraining Lights to Surfaces Multi-Light Type Support Lighting Technique Comparison FutureWork Image Space Efficient Post-Processing with Importance Sampling Problem Statement The Approach of Importance Sampling Tone Mapping with Glow Depth of Field Comparisons to Uniform Sampling Efficient Real-Time Motion Blur for Multiple Rigid Objects Overview CPU-Side Work GPU-Side Work Blurring and Halo Fixing Integration with a Post-Processing Pipeline Coping with Hardware Limitations 243 243 243 244 250 250 252 252 253 254 254 255 255 257 259 259 259 260 263 266 275 276 277 277 278 278 278 279 282 282 282

Contents xix 3.3 Real-Time Image Abstraction by Directed Filtering 285 285 Color Space Conversion 287 Flow Field Construction 287 Orientation-Aligned Bilateral Filter 291 Separable Flow-Based Difference-of-Gaussians 295 Color Quantization 301 s 302 Part IV Shadows 303 4.1 Practical Cascaded Shadow Maps 305 305 Flickering ofshadow Quality 307 Exact Solution 309 Approximated Solution 311 Storage Strategy 313 Non-Optimized Split Selection 315 Correct Computation oftexture Coordinates 317 Filtering Across Splits 321 Method Used in PSVSMs 324 Analytic Method 325 328 4.2 A Hybrid Method for Interactive Shadows in Homogeneous Media 331 331 Participating Media Review 332 Hybrid Approach 335 Adding Textured Light Sources 336 Implementation Details 338 Results 342 s 342 4.3 Real-Time Dynamic Shadows for Image-Based Lighting 345 345 Related Work 346 Algorithm Overview 346 Environment Map Importance Sampling 346 Visibility Map Generation 349 Rendering Shadows on Diffuse Surfaces 357 Rendering Shadows on Glossy Surfaces 358 Results 359

xx Contents 4.4 Endnotes Facetted Shadow Mappingfor Large Dynamic. Game Environments The Challenges Existing Shadow Map Approaches Facetted Shadow Map Approach Creating and Using Facetted Shadow Maps Results 361 361 363 363 363 364 365 367 370 370 Part V 5.1 5.2 5.3 Environmental Effects Dynamic Weather Effects Particle Simulation and Rendering Rendering Motion-Blurred Particles Occlusion Dynamic, Artist-Controlled Weather Additional Effects Interactive Hydraulic Erosion on the GPU Data Structures Water Movement Erosion Boundaries Rendering Results and Advanced Geometry for Complex Sky Representation Geometry Generation 373 375 375 376 378 382 384 385 386 389 389 390 392 394 400 401 402 405 405 406 408

Contents xxi Part VI 6.1 6.2 6.3 6.4 6.5 Global Illumination Effects Screen-Space Ambient Occlusion The Problems Previous Work Overview of the Approach Implementation Future Improvements Results and Image-Space Horizon-Based Ambient Occlusion Input Buffers for Image Space Ambient Occlusion Image Space Ambient Occlusion with Ray Marehing Our Algorithm Reformulating the Ambient Occlusion Integral Implementation Considerations Results Deterred Occlusion frorn Analytic Surfaces Method Analytic Occlusion from other Surfaces Optimization Condusion Fast Fake Global Illumination Ambient Occlusion Probes Screen-Space Ambient Occlusion Screen-Space Radiosity Fake Radiosity Condusion Real-Time Subsurface Scattering Using Shadow Maps Related Work Theory Algorithm Results Condusion 4,11 413 413 414 414 415 420 423 423 425 425 429 429 431 431 435 440 445 445 446 451 451 453 455 455 455 458 462 462 466 467 467 468 469 471 476 477

xxii Contents 6.6 Instant Radiosity with GPU Photon Tracing and Approximate Indirect Shadows 479 479 Techniques We Build On 480 Algorithm Overview 481 Scene Representation for Ray Tracing 483 Ray-Triangle Intersection 484 BIH Traversal 487 Light Source Sampling 489 Photon Shooting 489 VPL Management 490 Rendering the Distance Impostor Cube Map 490 Rendering Deferring Textures 490 Building Pyramidal Occlusion Maps 490 Lighting 491 Adaptive Geometry-Sensitive Box Filtering 493 Performance 493 494 6.7 Variance Methods for Screen-Space Ambient Occlusion 495 Ambient Lighting 495 Ambient Occlusion 496 6.8 Per-Pixel Ambient Occlusion Using Geometry Shaders 501 SOl Background 502 Our Approach 502 Results 506 509 Part VII Handheld Devices 511 7.1 Optimizing Vour First OpenGL ES Application 513 513 Mobile Development 514 Graphics Development Guidelines 518 A Developer's Experience: Insight from Iadestone into KODO Evolved 539 541

Contents xxiii 7.2 Optimized Shaders for Advanced Graphical User Interfaces Handheld GUI Requirements Optimizing for Power Consumption Optimizing Blurs Optimizing Other Popular Effects Background and Post-Processing Transitions 543 543 543 544 546 549 552 555 560 7.3 Facial Animation for Mobile GPUs Faeial Animation Components Current Approaches and Effieiency Mobile Approach: Maximal Effieiency Is Critical 561 561 561 562 563 569 7.4 Augmented Reality on Mobile Phones Developing Augmented Reality Applications Platform Considerations Application Initialization Graphics API Abstraction Hardware vs. Software Rendering Scene-Graph Rendering Video and Image Processing Fixed Point vs. Floating Point 571 571 572 581 583 586 596 599 601 603 604 Part VIII 8.1 3D Engine Design Overview Cross-Platform Rendering Thread: Design and Implementation Motivation Overview Implementation Results Going Further: Add-Ons and Features 605 607 607 607 612 617 618 620

xxiv Contents 8.2 Advanced GUI System for Games 621 621 Architecture 622 Rendering 624 625 8.3 Automatie Load-Balancing Shader Framework 627 627 The Problems 627 User Inconvenience 628 Performance 629 The Approach 629 Workflow 632 Discussion of Results 632 GPU Requirements 633 Conc1usion 633 8.4 Game-Engine-Friendly Occlusion Culling 637 637 Coherent Hierarchical Culling 638 Reducing State Changes 641 Game Engine Integration 643 Skipping Tests for Visible Nodes 645 Further Optimizations 646 Multiqueries 647 Putting It All Together 650 653 8.5 Designing arenderer for Multiple Lights: The Light Pre-Pass Renderer 655 Z Pre-Pass Renderer 655 Deferred Renderer 657 Light Pre-Pass Renderer 660 Storing an Additional Diffuse Term 662 Converting the Diffuse Term to Luminance 663 Bending the Specular Reflection Rules 663 Comparison and 664 Appendix: Applying Different Materials with a Light Pre- Pass Renderer 665

Contents XXV 8.6 Light Pre-Pass Renderer: Using the CIE Luv Color Space 667 667 WhyCIE Luv? 668 Working with Luv Colors 668 Luv Light Buffer Format 671 Grouping and Rendering Lights 672 Integrating Luv into Light Accumulation 675 676 8.7 Elemental Engine I1 679 Part IX Beyond Pixels and Triangles 683 9.1 Sliced Grid: A Memory and Computationally Efficient Data Structure tor Particle-Based Simulation on the GPU 685 685 Sliced Grid 686 Implementing a Sliced Grid on the GPU 689 Results 693 697 9.2 Free-Viewpoint Video on the GPU 699 699 Background Subtraction 700 Shape from Silhouette 703 Surface Extraction 705 Texture Mapping 709 713 9.3 A Volume Shader for Quantum Voronoi Diagrams Inside the 3D Bloch Ball and Preliminaries Von Neumann Quantum Entropy and Its Relative Entropy Divergence Quantum Voronoi Diagrams Quantum Voronoi Diagrams for Pure States Quantum Voronoi Diagrams for Mixed States Quantum Channel and Holevo's Capacity Concluding Remarks 715 715 716 717 719 723 728 729

xxvi Contents 9.4 Packing Arbitrary Bit Fields into 16-Bit Floating-Point Render Targets in DirectX 10 16-Bit and 32-Bit Floating-Point Formats Writing a Valid 32-Bit Floating-Point Output Converting Between Single- and Half- Precision Packing and Unpacking Code Performance Considerations 731 731 732 733 733 736 741 741 9.5 Interactive Image Morphing Using Thin-Plate Spline Thin-Plate Spline-Based Warping GPU Implementation oftps Warping Interactive Image Morphing Index 743 743 744 747 750 752 753