318544091

Embed Size (px)

Citation preview

  • 8/3/2019 318544091

    1/7

    Real-Time RenderingTomas Ml ler

    Eric Haines

    nA K PetersNatick, Massachusetts

  • 8/3/2019 318544091

    2/7

    Contents

    Preface xi1 Introduction 1

    1.1 Contents Overview 21.2 Notation and Definitions 31.2.1 Mathematical Notation 31.2.2 Geometrical Definitions 52 The Graphics Rendenng Pipeline 72.1 Architecture 82.2 The Application Stage 102.3 The Geometry Stage 112.3.1 Model and View Transform 122.3.2 Lighting and Shading 132.3.3 Projection 142.3.4 Clipping 162.3.5 Screen Mapping 162.4 The Rasterizer Stage 172.5 Through the Pipeline 203 Transforms 233.1 Basic Transforms 253.1.1 Translation Matrix 253.1.2 Rotation Maurices 263.1.3 Scaling Matrix 273.1.4 Shearing Matrices 293.1.5 Concatenation of Transforms 313.1.6 The Rigid-Body Transform 333.1.7 Normal Transform 34

    3.1.8 Computation of Inverses 353.2 Special Matrix Transforms and Operations 363.2.1 The Euler Transform 36vii

  • 8/3/2019 318544091

    3/7

    vii i Contents3.2.2 Extracting Parameters from the Euler Transform 383.2.3 Matrix Decomposition 403.2.4 Rotation About an Arbitrary Axis 413.3 Quaternions 423.3.1 Mathematical Background 433.3.2 Quaternion Transforms 453.4 Interpolation 523.5 Protections 573.5.1 Orthographie Projection 573.5.2 Perspective Projection 60

    4 Visual Appearance 654.1 Light Sources 654.2 Material 674.3 Lighting and Shading 684.3.1 Diffuse Component 714.3.2 Specular Component 734.3.3 Ambient Component 774.3.4 Lighting Equation 784.4 Aliasing and Antialiasing 814.5 Transparency, Alpha, and Compositing 854.6 Fog 894.7 Gamma Correction 93

    5 Texturing 995.1 Generalized Texturing 1005.2 Image Texturing '.. 1065.2.1 Magnification 1075.2.2 Minification 1085.3 Texture Caching and Compression 1175.4 Multipass Rendering 1195.5 Multitexturing ' 1215.6 Texture Animation 1225.7 Texturing Methods 1235.7.1 Alpha Mapping 1235.7.2 Light Mapping 1245.7.3 Gloss Mapping 125

    5.7.4 Environment Mapping 1275.7.5 Bump Mapping 1365.7.6 Other Texturing Techniques 143

  • 8/3/2019 318544091

    4/7

    Contents ix6 Spec ial Effects 1456.1 The Ren denng Spectram 1466.2 Image-Based Rendenng 147

    6.2.1 Lens Flare and Bloom 1506.2.2 Billboarding 1526.2.3 Full-Screen Billboarding 1556.2.4 Partic le Systems 1566.2.5 Fixed-View Effects 1576.3 M otion Blur 1586.4 Dep th of Field 1596.5 Reflections 1606.5.1 Planar Reflections 1616.5.2 Glossy Effects 1656.5.3 Reflections from Curved Reflectors 1666.6 Shadow s 1676.6.1 Planar Shado ws 1676.6.2 Shadow s on Curved Surfaces 1756.7 Lines 1836.7.1 Edge Highlighting 1846.7.2 Polygon Edge Rendering 1846.7.3 Hidden -Line Rendering 1856.7.4 Ha loing 1866.8 Height-Field and Volume Rend ering 186

    7 Speed-U p Techniques 1917.1 Culling Techniques 1917.1.1 Backface and Clustered Culling 1927.1.2 Hierarchical View -Frastum Culling 1947.1.3 Portal Culling 2007.1.4 Detail Culling 2037.1.5 Occlusion Culling 2047.2 Impostors 2187.2.1 Nailboards 2217.2.2 Hierarchical Image Cach ing 2227.2.3 Related Work 224

    7.3 Levels of De tail 2247.3.1 Discrete Geometry LO Ds 2257.3.2 Alpha LO Ds 2267.3.3 Geomorph LOD s 2277.3.4 LO D Managem ent 2287.4 Triangle Strips, Fans, and M eshes 231

  • 8/3/2019 318544091

    5/7

    x Contents7.4.1 Strips , , ; , . . . . 2327.4.2 Fans 2357.4.3 Creating Strips 2367.4.4 Polygon Meshes 240

    8 Pipeline Optimization 2418.1 Locating the Bottleneck 2428.1.1 Testing the Application Stage 2438.1.2 Testing the Geometry Stage 2438.1.3 Testing the Rasterizer Stage 2448.2 Optimization 2448.2.1 Application Stage 2448.2.2 Geometry Stage 2488.2.3 Rasterizer Stage 2508.2.4 Overall Optimization 2528.3 Balancing the Graphics Pipeline 2548.4 Host and Accelerator 2588.5 Multiprocessing 2608.5.1 Multiprocessor Pipelining 2608.5.2 Parallel Processing 264

    9 Polygonal Techniques 2679.1 Sources of Three-Dimensional Data 2689.2 Tessellation 2699.2.1 Shading Problems . , . 2719.2.2 Edge Cracking and T-Vertices 2749.3 Consolidation 2759.4 Simplification 28110 Intersection Test Methods 28910.1 Defmitions 29110.2 Rules of Thumb 29510.3 Ray/Sphere Intersection 29510.3.1 Mathematical Solution 29610.3.2 Optimized Solution 29710.4 Ray/Box Intersection 29910.4.1 Slabs Method 29910.4.2 Woo's Method 302

    10.5 Ray/Triangle Intersection 30310.5.1 Intersection Algorithm 30310.5.2 Implementation 305

  • 8/3/2019 318544091

    6/7

    Contents xi10.6 Ray/Polygon Intersection 30610.6.1 The Crossings Test 30710.7 Plane/Box Intersection Detection 310

    10.7.1 AABB 31110.7.2 OBB 31210.8 Triangle/Triangle Intersection 31310.8.1 Interval Overlap Method 31410.8.2 ERIT's Method 31710.8.3 Performance Comparison / 31810.9 Cube/Polygon Intersection 31910.9.1 General Algorithm 31910.10 BV/BV Intersection Tests 32210.10.1 Sphere/Box Intersection 32310.10.2 AABB/AABB Intersection 32410.10.3fc-DOP/fc-DOPIntersection 32410.10.4 OBB/OBB Intersection 32510.11 View Frustrum Intersection 33010.11.1 Frustum/Sphere Intersection 33210.11.2 Frustum/Box Intersection 33510.12 Line/Line Intersection Tests 33610.12.1 Two Dimensions 33610.12.2 Three Dimensions 33810.13 Intersection Between Three Planes 339

    11 CoUision Detection 34111.1 CoUision Detection with Rays 34311.2 General Hierarchical CoUision Detection 34411.2.1 Hierarchy Building 34511.2.2 CoUision Testing between Hierarchies 34711.2.3 Cost Function 34811.3 OBBTree 34911.4 fc-DOPTree .35411.5 A Multiple Objects CD System 35711.5.1 The First-Level CD 35811.5.2 Summary 360

    12 Graphics Hardware 36312.1 Buffers and Buffering 36312.1.1 A Simple Display System 36312.1.2 The Color Buffer 36512.1.3 Z-buffering and W-buffering 368

  • 8/3/2019 318544091

    7/7

    XII Contents

    12.1.4 Single, Do uble, and Triple Buffering 37012.1.5 Stereo Buffers 37212.1.6 Stencil and Accum ulation Buffering 37312.1.7 Mem ory 37412.2 Architecture 37512.2.1 General 37512.2.2 Case Study: Neon 37812.2 .3 Case Study: VISUALIZE fx . . . . . , . 38012.2.4 Case Study : InfiniteReality 38312.2.5 Other Architectures 386

    13 The Fnture 38913.1 Everything Else 38913.2 You 391

    A Some Linear Algebra 395A .l The Euclidean Space 396A.2 Geom etrical Interpretation 398A.3 Matrices 403A.3.1 Definitions and Operations 403A.3.2 Change of Base 410A.4 Hom ogeneous Notation 411A.5 Geom etry 412A.5.1 Lines 412A.5.2 Planes . 414A.5.3 Convex Hll 415A.5.4 M iscellaneous 416

    B Trigonometry 419B .l Definitions 419B.2 Trigonometrie Law s and Formulae 421

    References 427Index 463