Nighttime Digital Photography with Adobe Photoshop CS3

John Carucci





Nighttime photography often transforms otherwise mundane subject matter into spectacular images such as a warmly-lit subject positioned against a rich blue sky, or the red, yellow, and green swirls of an amusement park ride.  Capturing these images can be challenging though.  
Nighttime Digital Photography with Adobe Photoshop CS3 explains why night photos turn out the way that they do, and shows how to avoid, correct, and take advantage of each low-light situation. The operation of cameras, computers, printers, and software is covered step-by-step with creative enhancement and other advanced techniques in Adobe Photoshop CS3.

Table of Contents

Figures      xxi

Tables      xxv

Examples      xxix

About This Guide      xxxv

What This Guide Contains      xxxv
What's New in This Edition      xxxviii
What You Should Know Before Reading This Guide      xxxviii
How to Obtain the Sample Code      xxxix
Nate Robins' OpenGL Tutors       xl
Errata       xl
Style Conventions       xl

Acknowledgments       xliii

Chapter 1: Introduction to OpenGL       1

What Is OpenGL?       2
A Smidgen of OpenGL Code       5
OpenGL Command Syntax       7
OpenGL as a State Machine       9
OpenGL Rendering Pipeline       10
OpenGL-Related Libraries       14
Animation 20

Chapter 2: State Management and Drawing Geometric Objects       27

A Drawing Survival Kit       29
Describing Points, Lines, and Polygons        37
Basic State Management       48
Displaying Points, Lines, and Polygons       50
Normal Vectors       63
Vertex Arrays       65
Buffer Objects       82
Attribute Groups       91
Some Hints for Building Polygonal Models of Surfaces       94

Chpater 3: Viewing       103

Overview: The Camera Analogy       106
Viewing and Modeling Transformations       117
Projection Transformations       133
Viewport Transformation       138
Troubleshooting Transformations       142
Manipulating the Matrix Stacks       145
Additional Clipping Planesv 149
Examples of Composing Several Transformations       152
Reversing or Mimicking Transformations       160

Chapter 4: Color       165

Color Perception       166
Computer Color       168
RGBA versus Color-Index Mode 170
Specifying a Color and a Shading Model       176

Chapter 5: Lighting 183

A Hidden-Surface Removal Survival Kit 185
Real-World and OpenGL Lighting 187
A Simple Example: Rendering a Lit Sphere 190
Creating Light Sources 194
Selecting a Lighting Model 207
Defining Material Properties 211
The Mathematics of Lighting 220
Lighting in Color-Index Mode 226

Chapter 6: Blending, Antialiasing, Fog, and Polygon Offset       229

Blending       231
Antialiasing       247
Fogv 261
Point Parameters       271
Polygon Offset v274

Chapter 7: Display Lists 277

Why Use Display Lists?       278
An Example of Using a Display List       279
Display List Design Philosophy v282
Creating and Executing a Display List       285
Executing Multiple Display v292
Managing State Variables with Display Lists        297

Chapter 8: Drawing Pixels, Bitmaps, Fonts, and Images       301

Bitmaps and Fonts       303
Images       312
Imaging Pipeline       321
Reading and Drawing Pixel Rectangles       337
Using Buffer Objects with Pixel Rectangle Data        341
Tips for Improving Pixel Drawing Rates       345
Imaging Subsetv 346

Chapter 9: Texture Mapping       369

An Overview and an Example       375
Specifying the Texture       380
Filtering       411
Texture Objects       414
Texture Functions       421
Assigning Texture Coordinates       425
Automatic Texture-Coordinate Generation       434
Multitexturing       443
Texture Combiner Functions       449
Applying Secondary Color after Texturing       455
Sprites       456
The Texture Matrix Stack       457
Depth Textures       459

Chapter 10: The Framebuffer       465

Buffers and Their Uses       468
Testing and Operating on Fragments       475
The Accumulation Bufferv 490

Chapter 11: Tessellators and Quadrics       505

Polygon Tessellation       506
Quadrics: Rendering Spheres, Cylinders, and Disks       523

Chapter 12: Evaluators and NURBS       533

Prerequisites       535
Evaluatorsv 536
The GLU NURBS Interface       550

Chapter 13: Selection and Feedback       569

Selection       570Feedbackv 591

Chapter 14: Now That You Knowv 599

Error Handling       601
Which Version Am I Using?       603
Extensions to the Standard       605
Cheesy Translucency       608
An Easy Fade Effect       608
Object Selection Using the Back Buffer       610
Cheap Image Transformation       611
Displaying Layers        612
Antialiased Characters       613
Drawing Round Points       616
Interpolating Images       616
Making Decals       616
Drawing Filled, Concave Polygons Using the Stencil Buffer       618
Finding Interference Regions       619
Shadows       621
Hidden-Line Removal       622
Texture Mapping Applications       624
Drawing Depth-Buffered Images       625
Dirichlet Domains       625
Life in the Stencil Buffer       627
Alternative Uses for glDrawPixels() and glCopyPixels()       628

Chapter 15: The OpenGL Shading Language       631

The OpenGL Graphics Pipeline and Programmable Shading       632
Using GLSL Shaders       636
The OpenGL Shading Language       644
Creating Shaders with GLSL       645
Accessing Texture Maps in Shaders       661
Shader Preprocessor       664

Appendix A: Order of Operations       679

Overview       680
Geometric Operations       681
Pixel Operations       682
Fragment Operations       683Odds and Ends       684

Appendix B: State Variables       685

The Query Commands       686
OpenGL State Variables       688

Appendix C: OpenGL and Window Systems       735

Accessing New OpenGL Functions       736
GLX: OpenGL Extension for the X Window System       737
AGL: OpenGL Extensions for the Apple Macintosh       744
PGL: OpenGL Extension for IBM OS/2 Warp       749
WGL: OpenGL Extension for Microsoft Windows 95/98/NT/ME/2000/XP      753

Appendix D: Basics of GLUT: The OpenGL Utility Toolkit       759

Initializing and Creating a Window       760
Handling Window and Input Events        761
Loading the Color Map       763
Initializing and Drawing Three-Dimensional Objects       763
Managing a Background Process       765
Running the Program      765

Appendix E: Calculating Normal Vectors       767

Finding Normals for Analytic Surfaces       769
Finding Normals from Polygonal Data       771

Appendix F: Homogeneous Coordinates and Transformation Matrices       773

Homogeneous Coordinates       774
Transformation Matrices       775

Appendix G: Programming Tips       779

OpenGL Correctness Tips       780
OpenGL Performance Tips       782
GLX Tips 784

Appendix H: OpenGL Invariance       785

Appendix I: Built-In OpenGL Shading Language Variables and Functions       789

Variables       790
Built-In Functions       802

Glossary        815
Index       837