0%

Computer graphics are at work everywhere today, adding eye-popping details to video games, hyper-realistic CGI to major blockbusters, and life-like imagery to computer-animated films. This beginners book will introduce you to a core slice of this ever-expanding field, 3D rendering, with a focus on two popular algorithmic methods: raytracing and rasterization.

Written to be easily understood by high-school students but rigorous enough for professional engineers, you’ll build each of these surprisingly simple algorithms into complete, fully functional renderers as you build your knowledge base. The first half covers raytracing, which simulates rays of light as they bounce off of objects in a scene; the second half breaks down rasterization, the real-time process for converting 3D graphics into a screen-compatible array of 2D pixels. Every chapter gives you something visually new and exciting to add to your works-in-progress, from creating reflections and shadows that make objects look more realistic, to rendering a scene from any directional point of view.

You’ll learn how to:

•Represent objects in a scene, and use perspective projection to draw them in
•Compute the illumination for light sources (point, directional, and ambient)
•Render mirror-like reflections on surfaces, and cast shadows for depth
•Use clipping algorithms to render a scene from any camera position
•Implement flat shading, Gouraud shading, and Phong shading algorithms
•""Paint” textures that fake surface details and turn shapes into everyday objects

The book uses informal pseudocode throughout the text, so you can write your renderers in any language. In addition, the author provides links to live working versions of his algorithms.

Table of Contents

  1. Cover Page
  2. Title Page
  3. Copyright Page
  4. Dedication
  5. About the Author
  6. About the Technical Reviewer
  7. BRIEF CONTENTS
  8. CONTENTS IN DETAIL
  9. ACKNOWLEDGMENTS
  10. INTRODUCTION
    1. Who This Book Is For
    2. What This Book Covers
    3. Why Read This Book?
    4. About This Book
    5. About the Author
  11. 1 INTRODUCTORY CONCEPTS
    1. The Canvas
    2. Color Models
    3. Color Depth and Representation
    4. Color Manipulation
    5. The Scene
    6. Summary
  12. PART I RAYTRACING
  13. 2 BASIC RAYTRACING
    1. Rendering a Swiss Landscape
    2. Basic Assumptions
    3. Canvas to Viewport
    4. Tracing Rays
    5. Rendering our First Spheres
    6. Summary
  14. 3 LIGHT
    1. Simplifying Assumptions
    2. Light Sources
    3. Illumination of a Single Point
    4. Diffuse Reflection
    5. Specular Reflection
    6. Summary
  15. 4 SHADOWS AND REFLECTIONS
    1. Shadows
    2. Reflections
    3. Summary
  16. 5 EXTENDING THE RAYTRACER
    1. Arbitrary Camera Positioning
    2. Performance Optimizations
    3. Supporting Other Primitives
    4. Constructive Solid Geometry
    5. Transparency
    6. Supersampling
    7. Summary
  17. PART II RASTERIZATION
  18. 6 LINES
    1. Describing Lines
    2. Drawing Lines
    3. Drawing Lines with Any Slope
    4. The Linear Interpolation Function
    5. Summary
  19. 7 FILLED TRIANGLES
    1. Drawing Wireframe Triangles
    2. Drawing Filled Triangles
    3. Summary
  20. 8 SHADED TRIANGLES
    1. Defining Our Problem
    2. Computing Edge Shading
    3. Computing Interior Shading
    4. Summary
  21. 9 PERSPECTIVE PROJECTION
    1. Basic Assumptions
    2. Finding P’
    3. The Projection Equation
    4. Properties of the Projection Equation
    5. Projecting Our First 3D Object
    6. Summary
  22. 10 DESCRIBING AND RENDERING A SCENE
    1. Representing a Cube
    2. Models and Instances
    3. Model Transform
    4. Camera Transform
    5. The Transform Matrix
    6. Homogeneous Coordinates
    7. The Transform Matrix Revisited
    8. Summary
  23. 11 CLIPPING
    1. An Overview of the Clipping Process
    2. The Clipping Volume
    3. Clipping the Scene Against a Plane
    4. Defining the Clipping Planes
    5. Clipping Whole Objects
    6. Clipping Triangles
    7. Clipping Pseudocode
    8. Clipping in the Rendering Pipeline
    9. Summary
  24. 12 HIDDEN SURFACE REMOVAL
    1. Rendering Solid Objects
    2. Painter’s Algorithm
    3. Depth Buffering
    4. Back Face Culling
    5. Summary
  25. 13 SHADING
    1. Shading vs. Illumination
    2. Flat Shading
    3. Gouraud Shading
    4. Phong Shading
    5. Summary
  26. 14 TEXTURES
    1. Painting a Crate
    2. Bilinear Filtering
    3. Mipmapping
    4. Trilinear Filtering
    5. Summary
  27. 15 EXTENDING THE RASTERIZER
    1. Normal Mapping
    2. Environment Mapping
    3. Shadows
    4. Summary
  28. AFTERWORD
  29. APPENDIX: LINEAR ALGEBRA
    1. Points
    2. Vectors
    3. Point and Vector Operations
    4. Matrices
    5. Matrix Operations
  30. INDEX
3.142.200.226