Computer Graphics from Scratch: A Programmer's Introduction to 3D Rendering

  • 2h 51m
  • Gabriel Gambetta
  • No Starch Press
  • 2021

Computer graphics programming books are often math-heavy and intimidating for newcomers. Not this one. Computer Graphics from Scratch takes a simpler approach by keeping the math to a minimum and focusing on only one aspect of computer graphics, 3D rendering.

You’ll build two complete, fully functional renderers: a raytracer, which simulates rays of light as they bounce off objects, and a rasterizer, which converts 3D models into 2D pixels. As you progress you’ll learn how to create realistic reflections and shadows, and how to render a scene from any point of view.

Pseudocode examples throughout make it easy to write your renderers in any language, and links to live JavaScript demos of each algorithm invite you to explore further on your own.

Learn how to:

  • Use perspective projection to draw 3D objects on a 2D plane
  • Simulate the way rays of light interact with surfaces
  • Add mirror-like reflections and cast shadows to objects
  • Render a scene from any camera position using clipping planes
  • Use flat, Gouraud, and Phong shading to mimic real surface lighting
  • Paint texture details onto basic shapes to create realistic-looking objects

Whether you’re an aspiring graphics engineer or a novice programmer curious about how graphics algorithms work, Gabriel Gambetta’s simple, clear explanations will quickly put computer graphics concepts and rendering techniques within your reach. All you need is basic coding knowledge and high school math. Computer Graphics from Scratch will cover the rest.

About the Author

Gabriel Gambetta has been coding games since the age of 5 on a ZX Spectrum. After studying CS and starting his career as a company man, he gave it all up to start a game development company, where he worked for over a decade while teaching Computer Graphics at a local university. Most recently, Gambetta has worked at Google in Zürich since 2011, except for a stint as an early engineer in London-based multiplayer game tech unicorn Improbable.

In this Book

  • Introduction
  • Introductory Concepts
  • Basic Raytracing
  • Light
  • Shadows and Reflections
  • Extending the Raytracer
  • Lines
  • Filled Triangles
  • Shaded Triangles
  • Perspective Projection
  • Describing and Rendering a Scene
  • Clipping
  • Hidden Surface Removal
  • Shading
  • Textures
  • Extending the Rasterizer
  • Afterword
SHOW MORE
FREE ACCESS

YOU MIGHT ALSO LIKE