Physically Based Rendering: From Theory to Implementation (Hardcover)

Matt Pharr, Greg Humphreys

買這商品的人也買了...

商品描述

Description

"Computer graphics, and rendering in particular, is full of beautiful theory. The theory covers physical concepts, such as light fields and the interaction of light with different materials, and mathematical concepts, such as integral equations and Monte Carlo integration. The great thing about computers is that they allow us to build rendering systems based on the best theory. This book turns the theory of image-making into a practical method for creating images." —from the foreword by Pat Hanrahan, Canon USA Professor, Stanford University

From movies to video games, computer-rendered images are pervasive today. Physically Based Rendering introduces the concepts and theory of photorealistic rendering hand in hand with the source code for a sophisticated renderer. By coupling the discussion of rendering algorithms with their implementations, Matt Pharr and Greg Humphreys are able to reveal many of the details and subtleties of these algorithms. But this book goes further; it also describes the design strategies involved with building real systems—there is much more to writing a good renderer than stringing together a set of fast algorithms. For example, techniques for high-quality antialiasing must be considered from the start, as they have implications throughout the system. The rendering system described in this book is itself highly readable, written in a style called literate programming that mixes text describing the system with the code that implements it. Literate programming gives a gentle introduction to working with programs of this size. This lucid pairing of text and code offers the most complete and in-depth book available for understanding, designing, and building physically realistic rendering systems.

 

Table of Contents

Foreword by Pat Hanrahan, Stanford University
Preface

indicates advanced topics

CHAPTER 01. INTRODUCTION
1.1 Literate Programming
1.1.1 Indexing and Cross-Referencing
1.2 Photorealistic Rendering and the Ray-Tracing Algorithm
1.2.1 Cameras
1.2.2 Ray-Object Intersections
1.2.3 Light Distribution
1.2.4 Visibility
1.2.5 Surface Scattering
1.2.6 Recursive Ray Tracing
1.2.7 Ray Propagation
1.3 pbrt: System Overview
1.3.1 Phases of Execution
1.3.2 Scene Representation
1.3.3 Main Rendering Loop
1.3.4 SceneMethods
1.3.5 An Integrator forWhitted-Style Ray Tracing
1.4 How to Proceed through This Book
1.4.1 The Exercises
1.5 Using and Understanding the Code
1.5.1 Pointer or Reference?
1.5.2 Code Optimization
1.5.3 The BookWeb site
1.5.4 Bugs
Further Reading
Exercise

CHAPTER 02. GEOMETRY AND TRANSFORMATIONS
2.1 Coordinate Systems
2.1.1 Coordinate System Handedness
2.2 Vectors
2.2.1 Arithmetic
2.2.2 Scaling
2.2.3 Dot and Cross Product
2.2.4 Normalization
2.2.5 Coordinate System from a Vector
2.3 Points
2.4 Normals
2.5 Rays
2.5.1 Ray Differentials
2.6 Three-Dimensional Bounding Boxes
2.7 Transformations
2.7.1 Homogeneous Coordinates
2.7.2 Basic Operations
2.7.3 Translations
2.7.4 Scaling
2.7.5 x, y, and z Axis Rotations
2.7.6 Rotation around an Arbitrary Axis
2.7.7 The Look-At Transformation
2.8 Applying Transformations
2.8.1 Points
2.8.2 Vectors
2.8.3 Normals
2.8.4 Rays
2.8.5 Bounding Boxes
2.8.6 Composition of Transformations
2.8.7 Transformations and Coordinate System Handedness
2.9 Differential Geometry
Further Reading
Exercises

CHAPTER 03. SHAPES
3.1 Basic Shape Interface
3.1.1 Bounding
3.1.2 Refinement
3.1.3 Intersection
3.1.4 Avoiding Incorrect Self-Intersections
3.1.5 Shading Geometry
3.1.6 Surface Area
3.1.7 Sidedness
3.2 Spheres
3.2.1 Construction
3.2.2 Bounding
3.2.3 Intersection
3.2.4 Partial Spheres
3.2.5 Partial Derivatives of Normal Vectors
3.2.6 DifferentialGeometry Initialization
3.2.7 Surface Area
3.3 Cylinders
3.3.1 Construction
3.3.2 Bounding
3.3.3 Intersection
3.3.4 Partial Cylinders
3.3.5 Surface Area
3.4 Disks
3.4.1 Construction
3.4.2 Bounding
3.4.3 Intersection
3.4.4 Surface Area
3.5 Other Quadrics
3.5.1 Cones
3.5.2 Paraboloids
3.5.3 Hyperboloids
3.6 Triangles and Meshes
3.6.1 Triangle
3.6.2 Triangle Intersection
3.6.3 Surface Area
3.6.4 Shading Geometry
3.7 Subdivision Surfaces
3.7.1 Mesh Representation
3.7.2 Bounds
3.7.3 Subdivison
Further Reading
Exercises

CHAPTER 04. PRIMITIVES AND INTERSECTION ACCELERATION
4.1 Primitive Interface and Geometric Primitives
4.1.1 Geometric Primitives
4.1.2 Object Instancing
4.2 Aggregates
4.2.1 Ray-Box Intersections
4.3 Grid Accelerator
4.3.1 Creation
4.3.2 Traversal
4.4 Kd-Tree Accelerator
4.4.1 Tree Representation
4.4.2 Tree Construction
4.4.3 Traversal
Further Reading
Exercises

CHAPTER 05. COLOR AND RADIOMETRY
5.1 Spectral Representation
5.1.1 Spectrum Class
5.1.2 XYZ Color
5.2 Basic Radiometry
5.2.1 Basic Quantities
5.2.2 Incident and Exitant Radiance Functions
5.3 Working with Radiometric Integrals
5.3.1 Integrals over Projected Solid Angle
5.3.2 Integrals over Spherical Coordinates
5.3.3 Integrals over Area
5.4 Surface Reflection and the BRDF
Further Reading
Exercises

CHAPTER 06. CAMERA MODELS
6.1 Camera Model
6.1.1 Camera Coordinate Spaces
6.2 Projective Camera Models
6.2.1 Orthographic Camera
6.2.2 Perspective Camera
6.2.3 Depth of Field
6.3 Environment Camera
Further Reading
Exercises

CHAPTER 07. SAMPLING AND RECONSTRUCTION
7.1 Sampling Theory
7.1.1 The Frequency Domain and the Fourier Transform
7.1.2 Ideal Sampling and Reconstruction
7.1.3 Aliasing
7.1.4 Antialiasing Techniques
7.1.5 Application to Image Synthesis
7.1.6 Sources of Aliasing in Rendering
7.1.7 Understanding Pixels
7.2 Image Sampling Interface
7.2.1 Sample Representation and Allocation
7.3 Stratified Sampling
7.4 Low-Discrepancy Sampling
7.4.1 Definition of Discrepancy
7.4.2 Constructing Low-Discrepancy Sequences
7.4.3 (0,2)-Sequences
7.4.4 The Low-Discrepancy Sampler
7.5 Best-Candidate Sampling Patterns
7.5.1 Generating the Best-Candidate Pattern
7.5.2 Using the Best-Candidate Pattern
7.6 Image Reconstruction
7.6.1 Filter Functions
Further Reading
Exercises

CHAPTER 08. FILM AND THE IMAGING PIPELINE
8.1 Film Interface
8.2 Image Film
8.2.1 Image Output
8.3 Image Pipeline
8.4 Perceptual Issues and Tone Mapping
8.4.1 Luminance and Photometry
8.4.2 Bloom
8.4.3 ToneMapping Interface
8.4.4 Maximum toWhite
8.4.5 Contrast-Based Scale Factor
8.4.6 Varying Adaptation Luminance
8.4.7 Spatially Varying Nonlinear Scale
8.5 Final Imaging Pipeline Stages
Further Reading
Exercises

CHAPTER 09. REFLECTION MODELS
9.1 Basic Interface
9.1.1 Reflectance
9.1.2 BRDF>BTDF Adapter
9.2 Specular Reflection and Transmission
9.2.1 Fresnel Reflectance
9.2.2 Specular Reflection
9.2.3 Specular Transmission
9.3 Lambertian Reflection
9.4 Microfacet Models
9.4.1 Oren-Nayar Diffuse Reflection
9.4.2 Torrance-Sparrow Model
9.4.3 Blinn Microfacet Distribution
9.4.4 Anisotropic Microfacet Model
9.5 Lafortune Model
9.6 Fresnel Incidence Effects
Further Reading
Exercises

CHAPTER 10. MATERIALS
10.1 BSDFs
10.1.1 BSDF Memory Management
10.2 Material Interface and Implementations
10.2.1 Matte
10.2.2 Plastic
10.2.3 Additional Materials
10.3 Bump Mapping
Further Reading
Exercises

CHAPTER 11. TEXTURE
11.1 Sampling and Antialiasing
11.1.1 Finding the Texture Sampling Rate
11.1.2 Filtering Texture Functions
11.1.3 Ray Differentials for Specular Reflection and Transmission
11.2 Texture Coordinate Generation
11.2.1 2D (u, v) Mapping
11.2.2 Spherical Mapping
11.2.3 Cylindrical Mapping
11.2.4 Planar Mapping
11.2.5 3DMapping
11.3 Texture Interface and Basic Textures
11.3.1 Constant Texture
11.3.2 Scale Texture
11.3.3 Mix Textures
11.3.4 Bilinear Interpolation
11.4 Image Texture
11.4.1 Texture Caching
11.4.2 MIPMaps
11.4.3 Isotropic Triangle Filter
11.4.4 EllipticallyWeighted Average
11.5 Solid and Procedural Texturing
11.5.1 UV Texture
11.5.2 Checkerboard
11.5.3 Solid Checkerboard
11.6 Noise
11.6.1 Perlin Noise
11.6.2 Random Polka Dots
11.6.3 Noise Idioms and Spectral Synthesis
11.6.4 Bumpy andWrinkled Textures
11.6.5 WindyWaves
11.6.6 Marble
Further Reading
Exercises


CHAPTER 12. VOLUME SCATTERING
12.1 Volume Scattering Processes
12.1.1 Absorption
12.1.2 Emission
12.1.3 Out-Scattering and Extinction
12.1.4 In-scattering
12.2 Phase Functions
12.3 Volume Interface and Homogeneous Media
12.3.1 Homogeneous Volumes
12.4 Varying-Density Volumes
12.4.1 3D Grids
12.4.2 Exponential Density
12.5 Volume Aggregates
Further Reading
Exercises

CHAPTER 13. LIGHT SOURCES
13.1 Light Interface
13.1.1 Visibility Testing
13.2 Point Lights
13.2.1 Spotlights
13.2.2 Texture Projection Lights
13.2.3 Goniophotometric Diagram Lights
13.3 Distant Lights
13.4 Area Lights
13.5 Infinite Area Lights
Further Reading
Exercises

CHAPTER 14. MONTE CARLO INTEGRATION I: BASIC CONCEPTS
14.1 Background and Probability Review
14.1.1 Continuous Random Variables
14.1.2 Expected Values and Variance
14.2 The Monte Carlo Estimator
14.3 Sampling Random Variables
14.3.1 The InversionMethod
14.3.2 Example: Power Distribution
14.3.3 Example: Exponential Distribution
14.3.4 Example: Piecewise-Constant 1D Functions
14.3.5 The RejectionMethod
14.3.6 Example: Rejection Sampling a Unit Circle
14.4 Transforming between Distributions
14.4.1 Transformation in Multiple Dimensions
14.4.2 Example: Polar Coordinates
14.4.3 Example: Spherical Coordinates
14.5 2D Sampling with Multidimensional Transformations
14.5.1 Example: Uniformly Sampling a Hemisphere
14.5.2 Example: Sampling a Unit Disk
14.5.3 Example: Cosine-Weighted Hemisphere Sampling
14.5.4 Example: Sampling a Triangle
Further Reading
Exercises

CHAPTER 15. MONTE CARLO INTEGRATION II: IMPROVING EFFICIENCY
15.1 Russian Roulette and Splitting
15.1.1 Splitting
15.2 Careful Sample Placement
15.2.1 Stratified Sampling
15.2.2 Quasi Monte Carlo
15.2.3 Warping Samples and Distortion
15.3 Bias
15.4 Importance Sampling
15.4.1 Multiple Importance Sampling
15.5 Sampling Reflection Functions
15.5.1 Sampling the Blinn Microfacet Distribution
15.5.2 Sampling the Anisotropic Microfacet Model
15.5.3 Sampling FresnelBlend
15.5.4 Specular Reflection and Transmission
15.5.5 Application: Estimating Reflectance
15.5.6 Sampling BSDFs
15.6 Sampling Light Sources
15.6.1 Basic Interface
15.6.2 Lights with Singularities
15.6.3 Area Lights
15.6.4 ShapeSet Sampling
15.6.5 Infinite Area Lights
15.7 Volume Scattering
15.7.1 Sampling Phase Functions
15.7.2 Computing Optical Thickness
Further Reading
Exercises

CHAPTER 16. LIGHT TRANSPORT I: SURFACE REFLECTION
16.1 Direct Lighting
16.1.1 Estimating the Direct Lighting Integral
16.2 The Light Transport Equation
16.2.1 Basic Derivation
16.2.2 Analytic Solutions to the LTE
16.2.3 The Surface Form of the LTE
16.2.4 Integral over Paths
16.2.5 Delta Distributions in the Integrand
16.2.6 Partitioning the Integrand
16.2.7 TheMeasurement Equation and Importance
16.3 Path Tracing
16.3.1 Overview
16.3.2 Path Sampling
16.3.3 Incremental Path Construction
16.3.4 Implementation
16.3.5 Bidirectional Path Tracing
16.4 Irradiance Caching
16.5 Particle Tracing and Photon Mapping
16.5.1 Theoretical Basis for Particle Tracing
16.5.2 Photon Integrator
16.5.3 Building the Photon Maps
16.5.4 Using the Photon Map
16.5.5 Photon Interpolation and Density Estimation
Further Reading
Exercises


CHAPTER 17. LIGHT TRANSPORT II: VOLUME RENDERING
17.1 The Equation of Transfer
17.2 Volume Integrator Interface
17.3 Emission-Only Integrator
17.4 Single Scattering Integrator
Further Reading
Exercises

CHAPTER 18. SUMMARY AND CONCLUSION
18.1 Design Retrospective
18.1.1 Abstraction versus Efficiency
18.1.2 Design Alternatives: Triangles Only
18.1.3 Design Alternatives: Streaming Computation
18.2 Major Projects
18.2.1 Parallel Rendering
18.2.2 Increased Scene Complexity
18.2.3 Subsurface Scattering
18.2.4 Precomputation for Interactive Rendering
18.3 Conclusion

APPENDIXES
A UTILITIES
B SCENE DESCRIPTION INTERFACE
C INPUT FILE FORMAT
D INDEX OF FRAGMENTS
E INDEX OF CLASSES AND THEIR MEMBERS
F INDEX OF IDENTIFIERS

REFERENCES
INDEX
ABOUT THE CD-ROM
COLOPHON

商品描述(中文翻譯)

描述

電腦圖形學,特別是渲染,充滿了美麗的理論。這些理論涵蓋了物理概念,如光場和光與不同材料的相互作用,以及數學概念,如積分方程和蒙特卡羅積分。電腦的偉大之處在於它們允許我們基於最佳理論來構建渲染系統。本書將圖像製作的理論轉化為創建圖像的實用方法。——來自於Pat Hanrahan的前言,他是Canon USA教授,斯坦福大學。

從電影到視頻遊戲,電腦生成的圖像在今天無處不在。《基於物理的渲染》介紹了逼真渲染的概念和理論,並提供了一個複雜渲染器的源代碼。通過將渲染算法的討論與其實現相結合,Matt Pharr和Greg Humphreys能夠揭示這些算法的許多細節和微妙之處。但本書更進一步,它還描述了構建真實系統所涉及的設計策略——撰寫一個好的渲染器不僅僅是將一組快速算法串聯在一起。例如,高質量的抗鋸齒技術必須從一開始就考慮,因為它們對整個系統都有影響。本書中描述的渲染系統本身非常易讀,採用了一種稱為“文學編程”的風格,將描述系統的文本與實現它的代碼混合在一起。文學編程為初次接觸這麼大型程式的人提供了一個循序漸進的介紹。這種清晰的文本和代碼配對提供了最全面和深入的書籍,用於理解、設計和構建物理寫實的渲染系統。

目錄

前言:Pat Hanrahan,斯坦福大學
前言
指示高級主題
第1章:介紹
1.1 文學編程
1.1.1 索引和交叉引用
1.2 逼真渲染和光線追蹤算法
1.2.1 相機
1.2.2 光線-物體交叉
1.2.3 光分佈
1.2.4 可見性
1.2.5 表面散射
1.2.6 遞歸光線追蹤
1.2.7 光線傳播
1.3 pbrt:系統概述
1.3.1 執行階段
1.3.2 場景表示
1.3.3 主渲染循環
1.3.4 場景方法
1.3.5 用於Whitted風格光線追蹤的整合器
1.4 如何閱讀本書
1.4.1 練習
1.5 使用和理解代碼
1.5.1 指針還是引用?
1.5.2 代碼優化
1.5.3 書籍網站
1.5.4 Bug
進一步閱讀
練習

第2章:幾何和變換
2.1 坐標系統
2.1.1 坐標系統的左右手性
2.2 向量
2.2.1 算術
2.2.2 縮放
2.2.3 點積和叉積
2.2.4 正規化
2.2.5 從向量獲取坐標系統
2.3 點
2.4 法線
2.5 光線
2.5.1 光線微分
2.6 三維包圍框
2.7 變換
2.7.1 齊次坐標
2.7.2 基本操作
2.7.3 平移
2.7.4 縮放
2.7.5 x、y和z軸旋轉
2.7.6 繞...旋轉