Advanced Lighting and Materials with Shaders

Free Download

Authors:

ISBN: 1556222920, 9781556222924

Size: 7 MB (7391481 bytes)

Pages: 361/361

File format:

Language:

Publishing Year:

Kelly Dempski, Emmanuel Viale1556222920, 9781556222924

Programmable GPUs provide the processing horsepower necessary to render realistic graphics in real time, but this has put a new burden on graphics programmers. They now need to have an in-depth understanding of lights and surface propertiex before they can use the capablities of the GPU.

Table of contents :
Team DDU……Page 1
Table of Contents……Page 6
Foreword……Page 18
Acknowledgments……Page 19
Introduction……Page 20
1.1 The Duality of Light……Page 22
1.2 Light as Particles……Page 23
1.3 Light as Waves……Page 25
1.3.1 Wavelength and Color……Page 26
1.3.2 Phase and Interference……Page 27
1.4 Light as Energy……Page 28
References……Page 29
Introduction……Page 30
2.1.1 Point Lights as Energy Sources……Page 31
2.1.2 Geometric Attenuation……Page 33
2.1.3 Attenuation through Matter……Page 34
2.1.4 Point Lights and Lighting Equations……Page 35
2.2.1 The Relationship between Point and Directional Lights……Page 36
2.2.2 Directional Lights and Lighting Equations……Page 37
2.3.1 The Relationship between Point and Area Lights……Page 38
2.3.2 Attenuation and Area Lights……Page 39
2.4.1 Spotlights as Physical Lights……Page 42
2.4.2 Spotlights and Lighting Equations……Page 43
2.4.3 Other Spotlight Models……Page 45
2.5.1 Global Illumination vs Local Illumination……Page 46
2.5.2 Ambient Light……Page 47
Conclusion……Page 49
Introduction……Page 50
3.1.1 Backward Raytracing……Page 51
3.1.2 Camera Models……Page 55
3.1.3 The Different Types of Rays……Page 57
3.1.5 Ray and Object Intersections……Page 59
3.1.6 Texturing and Shading……Page 60
3.1.7 Problems and Limitations……Page 64
3.1.8 Solutions and Workarounds……Page 66
3.1.9 The Algorithm……Page 71
3.2.1 Stochastic Sampling……Page 72
3.2.2 Path Tracing and Related Techniques……Page 76
3.2.3 Photon Mapping……Page 79
3.3 Real-time Raytracing……Page 80
3.4 Raytracing Concepts for Other Techniques……Page 81
References……Page 82
Other Resources……Page 83
Introduction……Page 84
4.1 Plastics……Page 85
4.2.1 Trees……Page 87
4.2.3 Finished Wood……Page 88
4.3 Leaves and Vegetation……Page 89
4.4 Metals……Page 91
4.5.1 Concrete……Page 92
4.5.3 Natural Stone……Page 93
4.6 Skin……Page 94
4.7 Hair and Fur……Page 95
4.8 Air and the Atmosphere……Page 96
4.9.1 Glass……Page 97
4.10 Paint……Page 98
4.11 Worn Materials……Page 99
Conclusion……Page 100
Introduction……Page 102
5.1 The Rendering Equation……Page 103
5.2.2 Radiance and Luminance……Page 104
5.3 Lambert’s Law for Illumination……Page 105
5.4 Bidirectional Reflectance Distribution Functions (BRDFs)……Page 108
5.4.1 Parameters to a BRDF……Page 109
5.4.2 Isotropic vs Anisotropic Materials……Page 110
5.5.1 A Simple Diffuse Shading Model……Page 111
5.5.2 Diffuse Materials and Conservation of Energy……Page 112
5.6.1 Purely Specular Materials……Page 114
5.6.2 Specular and the Phong Model……Page 115
5.6.3 The Blinn-Phong Model……Page 116
5.7.1 Oren-Nayar Diffuse Reflection……Page 118
5.7.2 Minnaert Reflection……Page 120
5.8.1 Ward Reflection Model……Page 121
5.8.2 Schlick Reflection Model……Page 123
5.8.3.1 The Geometric Term……Page 124
5.8.3.3 The Roughness Term……Page 125
5.8.3.4 The Complete Cook-Torrance Model……Page 126
Conclusion……Page 127
References……Page 128
Introduction……Page 130
6.1.1 Color Modulation……Page 131
6.1.2 Object Space Light Vectors……Page 132
6.2 Per-Vertex Warn Lights……Page 134
6.2.1 The Warn Shader……Page 135
6.2.2 The Warn Application……Page 137
6.2.3 The Results……Page 139
6.3.1 PS2.0 Lighting……Page 141
6.3.3 Lookup Textures……Page 144
Conclusion……Page 146
Other Resources……Page 147
Introduction……Page 148
7.1.1 Basic Application Code……Page 149
7.1.2 Basic Diffuse Material……Page 151
7.2.1 The Phong Shaders……Page 153
7.2.2 The Blinn-Phong Shaders……Page 157
7.3 Oren-Nayar Materials……Page 159
7.4 Minnaert Materials……Page 164
7.5.1 Isotropic Ward Materials……Page 166
7.5.2 Anisotropic Ward Materials……Page 170
7.6 Schlick Materials……Page 173
7.7 Cook-Torrance Materials……Page 175
References……Page 177
Introduction……Page 178
8.1.1 Hemispheres of Light……Page 179
8.1.3 Compressing Data Signals……Page 181
8.1.4 Compressing Hemispheres of Light……Page 184
8.2.1 Definition……Page 185
8.2.2 Projection and Reconstruction……Page 188
8.2.3 Main Properties……Page 191
8.2.4.1 The Rendering Equation……Page 192
8.2.4.2 SH Diffuse Lighting……Page 194
8.2.4.3 SH Diffuse Shadowed Lighting……Page 196
8.2.4.4 SH Diffuse Shadowed Inter-Reflected Lighting……Page 198
8.3.1 Introduction……Page 200
8.3.2.1 Design……Page 201
8.3.2.2 Implementation……Page 202
8.3.2.4 Results……Page 203
8.3.3.1 Design……Page 204
8.3.3.2 Implementation……Page 206
8.3.3.4 Keyboard Mapping and Mouse Usage……Page 207
8.3.4.1 Design……Page 208
8.3.4.2 Implementation……Page 210
8.3.4.4 Keyboard Mapping and Mouse Usage……Page 213
8.3.4.5 Results……Page 214
8.3.5.1 Design……Page 215
8.3.5.4 Results……Page 217
8.3.6.1 Design……Page 218
8.3.6.2 Implementation……Page 222
8.3.6.3 Command-line Parameters……Page 226
8.3.6.4 Keyboard Mapping and Mouse Usage……Page 227
8.3.6.5 Results……Page 228
References……Page 230
Introduction……Page 232
9.1.1 The Main SH Simulator……Page 233
9.1.2.1 Vertex Count……Page 234
9.1.2.2 Ray Count……Page 235
9.1.2.4 Order……Page 236
9.1.3.1 Generating Compressed SH Coefficients……Page 237
9.1.3.2 Using Compressed SH Coefficients……Page 240
9.2.1 Encoding Lights for SH Rendering……Page 243
9.2.2 The Basic SH Vertex Shader……Page 246
9.3 SH with Cube Maps……Page 249
9.4 DX SH with HDRI……Page 251
9.5 Multiple Meshes/Materials……Page 253
9.6 Subsurface Scattering……Page 256
9.7.1 The Basic Idea……Page 258
9.7.2 The Implementation……Page 261
Conclusion……Page 263
References……Page 264
Introduction……Page 266
10.1.2 Historical Background and Evolution……Page 267
10.1.3 Near Real-Time Radiosity……Page 268
10.2.1 Definitions……Page 269
10.2.2 The Radiosity Equation……Page 272
10.2.3.1 Properties……Page 274
10.2.3.2 Determination……Page 275
10.2.4 The Classic Radiosity Method……Page 277
10.2.5 The Progressive Refinement Method……Page 280
10.2.6 Radiosity and Subdivision……Page 282
10.3 Sample Implementation in OpenGL……Page 284
Conclusion……Page 285
Other Resources……Page 286
A.1.1 Requirements……Page 288
A.1.2 Building the Programs……Page 289
A.1.3 Running and Testing the Programs and Shaders……Page 291
A.2.2.1 Windows Platforms……Page 292
A.2.2.2 Linux Platforms……Page 294
A.3.1 Requirements……Page 295
A.3.2 Building the Programs……Page 296
A.3.3 Running and Testing the Programs and Shaders……Page 298
A.4.2.2 Lib3ds……Page 299
A.4.3.2 Windows Platforms……Page 301
Other Resources……Page 302
B.1 Design……Page 304
B.1.2 Data Types……Page 305
B.1.3 Main Functions and Program Flow……Page 307
B.1.4.1 Basic Data Types……Page 308
B.1.4.2 Primitives……Page 310
B.2.2 Core Raytracing Functions……Page 316
B.2.3 Ray/Primitive Intersection Functions……Page 323
B.2.4 File List and Auxiliary Functions……Page 324
B.3.1 Renderings……Page 326
B.3.2 Extending the Raytracer……Page 327
References……Page 328
Introduction……Page 330
C.1.2.1 Introduction……Page 331
C.1.2.3 Data Structures and Instantiation……Page 332
C.2.2.1 Introduction……Page 336
C.2.2.3 Data Structures……Page 337
C.2.2.4 Functions and Files……Page 338
C.2.2.5 Program Flow……Page 340
C.2.3.2 Simple Shader……Page 341
C.2.3.3 Advanced Shader……Page 342
C.3.2.1 Introduction……Page 343
C.3.2.3 Data Structures……Page 344
C.3.2.4 Functions and Files……Page 345
C.3.2.5 Program Flow……Page 346
C.3.3.2 Simple Shader……Page 347
References……Page 348
Other Resources……Page 349
Index……Page 350

Reviews

There are no reviews yet.

Be the first to review “Advanced Lighting and Materials with Shaders”
Shopping Cart
Scroll to Top