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

Similar documents
CHAPTER 1 Graphics Systems and Models 3

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

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

CS 130 Final. Fall 2015

5 Linear Algebra Determinants Matrices...121

Computer Graphics 10 - Shadows

Computer Graphics. Shadows

Engineering Real- Time Applications with Wild Magic

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

Building scalable 3D applications. Ville Miettinen Hybrid Graphics

Motivation. Culling Don t draw what you can t see! What can t we see? Low-level Culling

Computer Graphics: Programming, Problem Solving, and Visual Communication

Computer Graphics I Lecture 11

Mathematical Tools in Computer Graphics with C# Implementations Table of Contents

Introduction to Computer Graphics

INFOGR Computer Graphics. Jacco Bikker - April-July Lecture 14: Grand Recap. Welcome!

HE COMPLETE OPENGL PROGI FOR WINDOW WIND

Graphics and Interaction Rendering pipeline & object modelling

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

Module 13C: Using The 3D Graphics APIs OpenGL ES

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

COMP30019 Graphics and Interaction Rendering pipeline & object modelling

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

LOD and Occlusion Christian Miller CS Fall 2011

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

Advanced 3D Game Programming with DirectX* 10.0

Chapter 2 A top-down approach - How to make shaded images?

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

Advanced Computer Graphics Transformations. Matthias Teschner

Real-Time Rendering (Echtzeitgraphik) Michael Wimmer

QUESTION BANK 10CS65 : COMPUTER GRAPHICS AND VISUALIZATION

Computer Graphics Introduction. Taku Komura

Next-Generation Graphics on Larrabee. Tim Foley Intel Corp

CS GAME PROGRAMMING Question bank

GEOMETRIC TOOLS FOR COMPUTER GRAPHICS

GUERRILLA DEVELOP CONFERENCE JULY 07 BRIGHTON

Overview. A real-time shadow approach for an Augmented Reality application using shadow volumes. Augmented Reality.

Computer Graphics Shadow Algorithms

EECE 478. Learning Objectives. Learning Objectives. Rasterization & Scenes. Rasterization. Compositing

Discrete Techniques. 11 th Week, Define a buffer by its spatial resolution (n m) and its depth (or precision) k, the number of

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

Real-Time Graphics Architecture

Computer Animation. Algorithms and Techniques. z< MORGAN KAUFMANN PUBLISHERS. Rick Parent Ohio State University AN IMPRINT OF ELSEVIER SCIENCE

Real - Time Rendering. Pipeline optimization. Michal Červeňanský Juraj Starinský

Using Bounding Volume Hierarchies Efficient Collision Detection for Several Hundreds of Objects

Game Mathematics. (12 Week Lesson Plan)

Orthogonal Projection Matrices. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015

MSBVH: An Efficient Acceleration Data Structure for Ray Traced Motion Blur

Texture Mapping. Michael Kazhdan ( /467) HB Ch. 14.8,14.9 FvDFH Ch. 16.3, , 16.6

The exam begins at 2:40pm and ends at 4:00pm. You must turn your exam in when time is announced or risk not having it accepted.

Spring 2009 Prof. Hyesoon Kim

6.837 Introduction to Computer Graphics Quiz 2 Thursday November 20, :40-4pm One hand-written sheet of notes allowed

Shadow Algorithms. CSE 781 Winter Han-Wei Shen

CS 563 Advanced Topics in Computer Graphics Culling and Acceleration Techniques Part 1 by Mark Vessella

CS 130 Exam I. Fall 2015

Overview: Ray Tracing & The Perspective Projection Pipeline

Rasterization Overview

COMPUTER GRAPHICS, MULTIMEDIA AND ANIMATION, Second Edition (with CD-ROM) Malay K. Pakhira

Chapter 4. Chapter 4. Computer Graphics 2006/2007 Chapter 4. Introduction to 3D 1

Graphics Performance Optimisation. John Spitzer Director of European Developer Technology

Real-Time Shadows. Last Time? Textures can Alias. Schedule. Questions? Quiz 1: Tuesday October 26 th, in class (1 week from today!

Ulf Assarsson Department of Computer Engineering Chalmers University of Technology

Spatial Data Structures

SHADERX 7 : ADVANCED RENDERING TECHNIQUES

Basic GPU techniques Josef Pelikán CGG MFF UK Praha.

Points and lines, Line drawing algorithms. Circle generating algorithms, Midpoint circle Parallel version of these algorithms

Graphics Hardware and Display Devices

Rendering If we have a precise computer representation of the 3D world, how realistic are the 2D images we can generate? What are the best way to mode

End-Term Examination

For each question, indicate whether the statement is true or false by circling T or F, respectively.

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

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

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


Real-Time Shadows. Last Time? Today. Why are Shadows Important? Shadows as a Depth Cue. For Intuition about Scene Lighting

OXFORD ENGINEERING COLLEGE (NAAC Accredited with B Grade) DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING LIST OF QUESTIONS

POWERVR MBX. Technology Overview

Illumination and Geometry Techniques. Karljohan Lundin Palmerius

Last Time. Why are Shadows Important? Today. Graphics Pipeline. Clipping. Rasterization. Why are Shadows Important?

CS GPU and GPGPU Programming Lecture 2: Introduction; GPU Architecture 1. Markus Hadwiger, KAUST

CS 130 Exam I. Fall 2015

Models and Architectures

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

CS451Real-time Rendering Pipeline

Pipeline Operations. CS 4620 Lecture 10

Last week. Machiraju/Zhang/Möller

RASTERISED RENDERING

Graphics Pipeline 2D Geometric Transformations

Pipeline Operations. CS 4620 Lecture 14

AMSTERDAM BOSTON HEIDELBERG LONDON NEW YORK OXFORD PARIS SAN DIEGO SAN FRANCISCO SINGAPORE SYDNEY TOKYO F ^ k.^

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

- Location: Annenberg Text: Mostly Self-Contained on course Web pages. - Al Barr

Geometric Algebra for Computer Graphics

(a) rotating 45 0 about the origin and then translating in the direction of vector I by 4 units and (b) translating and then rotation.

Last week. Machiraju/Zhang/Möller/Fuhrmann

Advanced Computer Graphics

Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology

Spatial Data Structures and Speed-Up Techniques. Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology

For Intuition about Scene Lighting. Today. Limitations of Planar Shadows. Cast Shadows on Planar Surfaces. Shadow/View Duality.

Transcription:

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

Contents Preface 1 Introduction 1 1.1 Contents Overview 2 1.2 Notation and Definitions 3 1.2.1 Mathematical Notation 3 1.2.2 Geometrical Definitions 5 2 The Graphics Rendenng Pipeline 7 2.1 Architecture 8 2.2 The Application Stage 10 2.3 The Geometry Stage 11 2.3.1 Model and View Transform 12 2.3.2 Lighting and Shading 13 2.3.3 Projection 14 2.3.4 Clipping 16 2.3.5 Screen Mapping 16 2.4 The Rasterizer Stage 17 2.5 Through the Pipeline 20 3 Transforms 23 3.1 Basic Transforms 25 3.1.1 Translation Matrix 25 3.1.2 Rotation Maurices 26 3.1.3 Scaling Matrix 27 3.1.4 Shearing Matrices 29 3.1.5 Concatenation of Transforms 31 3.1.6 The Rigid-Body Transform 33 3.1.7 Normal Transform 34 3.1.8 Computation of Inverses 35 3.2 Special Matrix Transforms and Operations 36 3.2.1 The Euler Transform 36 xiü vii

viii Contents 3.2.2 Extracting Parameters from the Euler Transform 38 3.2.3 Matrix Decomposition 40 3.2.4 Rotation About an Arbitrary Axis 41 3.3 Quaternions 42 3.3.1 Mathematical Background 43 3.3.2 Quaternion Transforms 45 3.4 Interpolation 52 3.5 Protections 57 3.5.1 Orthographie Projection 57 3.5.2 Perspective Projection 60 4 Visual Appearance 65 4.1 Light Sources 65 4.2 Material 67 4.3 Lighting and Shading 68 4.3.1 Diffuse Component 71 4.3.2 Specular Component 73 4.3.3 Ambient Component 77 4.3.4 Lighting Equation 78 4.4 Aliasing and Antialiasing 81 4.5 Transparency, Alpha, and Compositing 85 4.6 Fog 89 4.7 Gamma Correction 93 5 Texturing 99 5.1 Generalized Texturing 100 5.2 Image Texturing '.. 106 5.2.1 Magnification 107 5.2.2 Minification 108 5.3 Texture Caching and Compression 117 5.4 Multipass Rendering 119 5.5 Multitexturing ' 121 5.6 Texture Animation 122 5.7 Texturing Methods 123 5.7.1 Alpha Mapping 123 5.7.2 Light Mapping 124 5.7.3 Gloss Mapping 125 5.7.4 Environment Mapping 127 5.7.5 Bump Mapping 136 5.7.6 Other Texturing Techniques 143

Contents ix 6 Special Effects 145 6.1 The Rendenng Spectram 146 6.2 Image-Based Rendenng 147 6.2.1 Lens Flare and Bloom 150 6.2.2 Billboarding 152 6.2.3 Full-Screen Billboarding 155 6.2.4 Particle Systems 156 6.2.5 Fixed-View Effects 157 6.3 Motion Blur 158 6.4 Depth of Field 159 6.5 Reflections 160 6.5.1 Planar Reflections 161 6.5.2 Glossy Effects 165 6.5.3 Reflections from Curved Reflectors 166 6.6 Shadows 167 6.6.1 Planar Shadows 167 6.6.2 Shadows on Curved Surfaces 175 6.7 Lines 183 6.7.1 Edge Highlighting 184 6.7.2 Polygon Edge Rendering 184 6.7.3 Hidden-Line Rendering 185 6.7.4 Haloing 186 6.8 Height-Field and Volume Rendering 186 7 Speed-Up Techniques 191 7.1 Culling Techniques 191 7.1.1 Backface and Clustered Culling 192 7.1.2 Hierarchical View-Frastum Culling 194 7.1.3 Portal Culling 200 7.1.4 Detail Culling 203 7.1.5 Occlusion Culling 204 7.2 Impostors 218 7.2.1 Nailboards 221 7.2.2 Hierarchical Image Caching 222 7.2.3 Related Work 224 7.3 Levels of Detail 224 7.3.1 Discrete Geometry LODs 225 7.3.2 Alpha LODs 226 7.3.3 Geomorph LODs 227 7.3.4 LOD Management 228 7.4 Triangle Strips, Fans, and Meshes 231

x Contents 7.4.1 Strips,,;,... 232 7.4.2 Fans 235 7.4.3 Creating Strips 236 7.4.4 Polygon Meshes 240 8 Pipeline Optimization 241 8.1 Locating the Bottleneck 242 8.1.1 Testing the Application Stage 243 8.1.2 Testing the Geometry Stage 243 8.1.3 Testing the Rasterizer Stage 244 8.2 Optimization 244 8.2.1 Application Stage 244 8.2.2 Geometry Stage 248 8.2.3 Rasterizer Stage 250 8.2.4 Overall Optimization 252 8.3 Balancing the Graphics Pipeline 254 8.4 Host and Accelerator 258 8.5 Multiprocessing 260 8.5.1 Multiprocessor Pipelining 260 8.5.2 Parallel Processing 264 9 Polygonal Techniques 267 9.1 Sources of Three-Dimensional Data 268 9.2 Tessellation 269 9.2.1 Shading Problems.,. 271 9.2.2 Edge Cracking and T-Vertices 274 9.3 Consolidation 275 9.4 Simplification 281 10 Intersection Test Methods 289 10.1 Defmitions 291 10.2 Rules of Thumb 295 10.3 Ray/Sphere Intersection 295 10.3.1 Mathematical Solution 296 10.3.2 Optimized Solution 297 10.4 Ray/Box Intersection 299 10.4.1 Slabs Method 299 10.4.2 Woo's Method 302 10.5 Ray/Triangle Intersection 303 10.5.1 Intersection Algorithm 303 10.5.2 Implementation 305

Contents xi 10.6 Ray/Polygon Intersection 306 10.6.1 The Crossings Test 307 10.7 Plane/Box Intersection Detection 310 10.7.1 AABB 311 10.7.2 OBB 312 10.8 Triangle/Triangle Intersection 313 10.8.1 Interval Overlap Method 314 10.8.2 ERIT's Method 317 10.8.3 Performance Comparison / 318 10.9 Cube/Polygon Intersection 319 10.9.1 General Algorithm 319 10.10 BV/BV Intersection Tests 322 10.10.1 Sphere/Box Intersection 323 10.10.2 AABB/AABB Intersection 324 10.10.3fc-DOP/fc-DOPIntersection 324 10.10.4 OBB/OBB Intersection 325 10.11 View Frustrum Intersection 330 10.11.1 Frustum/Sphere Intersection 332 10.11.2 Frustum/Box Intersection 335 10.12 Line/Line Intersection Tests 336 10.12.1 Two Dimensions 336 10.12.2 Three Dimensions 338 10.13 Intersection Between Three Planes 339 11 CoUision Detection 341 11.1 CoUision Detection with Rays 343 11.2 General Hierarchical CoUision Detection 344 11.2.1 Hierarchy Building 345 11.2.2 CoUision Testing between Hierarchies 347 11.2.3 Cost Function 348 11.3 OBBTree 349 11.4 fc-doptree.354 11.5 A Multiple Objects CD System 357 11.5.1 The First-Level CD 358 11.5.2 Summary 360 12 Graphics Hardware 363 12.1 Buffers and Buffering 363 12.1.1 A Simple Display System 363 12.1.2 The Color Buffer 365 12.1.3 Z-buffering and W-buffering 368

XII Contents 12.1.4 Single, Double, and Triple Buffering 370 12.1.5 Stereo Buffers 372 12.1.6 Stencil and Accumulation Buffering 373 12.1.7 Memory 374 12.2 Architecture 375 12.2.1 General 375 12.2.2 Case Study: Neon 378 12.2.3 Case Study: VISUALIZE fx...,. 380 12.2.4 Case Study: InfiniteReality 383 12.2.5 Other Architectures 386 13 The Fnture 389 13.1 Everything Else 389 13.2 You 391 A Some Linear Algebra 395 A.l The Euclidean Space 396 A.2 Geometrical Interpretation 398 A.3 Matrices 403 A.3.1 Definitions and Operations 403 A.3.2 Change of Base 410 A.4 Homogeneous Notation 411 A.5 Geometry 412 A.5.1 Lines 412 A.5.2 Planes. 414 A.5.3 Convex Hüll 415 A.5.4 Miscellaneous 416 B Trigonometry 419 B.l Definitions 419 B.2 Trigonometrie Laws and Formulae 421 References 427 Index 463