Foundations

of

Game Engine Development

Foundations of Game Engine Development, Volume 1: Mathematics Foundations of Game Engine Development, Volume 2: Rendering Foundations of Game Engine Development, Volume 3: Models & Materials Foundations of Game Engine Development, Volume 4: Physics

Foundations of Game Engine Development is a new book series currently being written by Eric Lengyel. Its four volumes cover the essentials of game engine development in the broad areas of mathematics, rendering, models & materials, and physics.

Join the FGED Discord

Browse figures from the FGED series

Foundations of Game Engine Development, Volume 1: Mathametics

Volume 1: Mathematics
Release date: September 2016
ISBN: 978-0-9858117-4-7
200 pages • Full color • Soft cover

Purchase on Amazon.com

View sample section about normal vectors (PDF)

The first volume, known as FGED1, provides a detailed introduction to the mathematics used by modern game engine programmers. The book covers the topics of linear algebra (vectors and matrices), transforms, and geometry in a conventional manner. This is followed by an introduction to Grassmann algebra and geometric algebra, where a deeper understanding can be found along with explanations for why some pieces of the conventional mathematics aren’t quite right.

Below is the full table of contents. The book includes 49 figures, 36 code snippets, 62 exercises, and 327 numbered equations.

Preface

Chapter 1: Vectors and Matrices

  • 1.1 Vector Fundamentals
  • 1.2 Basic Vector Operations
    • 1.2.1 Magnitude and Scalar Multiplication
    • 1.2.2 Addition and Subtraction
  • 1.3 Matrix Fundamentals
  • 1.4 Basic Matrix Operations
    • 1.4.1 Addition, Subtraction, and Scalar Multiplication
    • 1.4.2 Matrix Multiplication
  • 1.5 Vector Multiplication
    • 1.5.1 Dot Product
    • 1.5.2 Cross Product
    • 1.5.3 Scalar Triple Product
  • 1.6 Vector Projection
  • 1.7 Matrix Inversion
    • 1.7.1 Identity Matrices
    • 1.7.2 Determinants
    • 1.7.3 Elementary Matrices
    • 1.7.4 Inverse Calculation
    • 1.7.5 Inverses of Small Matrices
  • Exercises for Chapter 1

Chapter 2: Transforms

  • 2.1 Coordinate Spaces
    • 2.1.1 Transformation Matrices
    • 2.1.2 Orthogonal Transforms
    • 2.1.3 Transform Composition
  • 2.2 Rotations
    • 2.2.1 Rotation About a Coordinate Axis
    • 2.2.2 Rotation About an Arbitrary Axis
  • 2.3 Reflections
  • 2.4 Scales
  • 2.5 Skews
  • 2.6 Homogeneous Coordinates
  • 2.7 Quaternions
    • 2.7.1 Quaternion Fundamentals
    • 2.7.2 Rotations With Quaternions
  • Exercises for Chapter 2

Chapter 3: Geometry

  • 3.1 Triangle Meshes
  • 3.2 Normal Vectors
    • 3.2.1 Calculating Normal Vectors
    • 3.2.2 Transforming Normal Vectors
  • 3.3 Lines and Rays
    • 3.3.1 Parametric Lines
    • 3.3.2 Distance Between a Point and a Line
    • 3.3.3 Distance Between Two Lines
  • 3.4 Planes
    • 3.4.1 Implicit Planes
    • 3.4.2 Distance Between a Point and a Plane
    • 3.4.3 Reflection Through a Plane
    • 3.4.4 Intersection of a Line and a Plane
    • 3.4.5 Intersection of Three Planes
    • 3.4.6 Intersection of Two Planes
    • 3.4.7 Transforming Planes
  • 3.5 Plücker Coordinates
    • 3.5.1 Implicit Lines
    • 3.5.2 Homogeneous Formulas
    • 3.5.3 Transforming Lines
  • Exercises for Chapter 3

Chapter 4: Advanced Algebra

  • 4.1 Grassmann Algebra
    • 4.1.1 Wedge Product
    • 4.1.2 Bivectors
    • 4.1.3 Trivectors
    • 4.1.4 Algebraic Structure
    • 4.1.5 Complements
    • 4.1.6 Antivectors
    • 4.1.7 Antiwedge Product
  • 4.2 Projective Geometry
    • 4.2.1 Lines
    • 4.2.2 Planes
    • 4.2.3 Join and Meet
    • 4.2.4 Line Crossing
    • 4.2.5 Plane Distance
    • 4.2.6 Summary and Implementation
  • 4.3 Matrix Inverses
  • 4.4 Geometric Algebra
    • 4.4.1 Geometric Product
    • 4.4.2 Vector Division
    • 4.4.3 Rotors
  • 4.5 Conclusion
  • Exercises for Chapter 4

Index

Download code listings

Download solutions guide (PDF)

See errata for Volume 1

Foundations of Game Engine Development, Volume 2: Rendering

Volume 2: Rendering
Release date: July 2019
ISBN: 978-0-9858117-5-4
412 pages • Full color • Soft cover

Purchase on Amazon.com

View sample sections about tangent space, bump mapping, and parallax mapping (PDF)

FGED2 explores the vast subject of real-time rendering in modern game engines. The book provides a detailed introduction to color science, world structure, projections, shading, light sources, shadows, fog, and visibility methods. This is followed by extensive discussions of a variety of advanced rendering techniques that include volumetric effects, atmospheric shadowing, ambient occlusion, motion blur, and isosurface extraction.

Below is the full table of contents. The book includes 138 figures, 82 code snippets, 52 exercises, and 424 numbered equations.

Preface

Chapter 5: Graphics Processing

  • 5.1 Pixels
  • 5.2 Color Science
    • 5.2.1 The CIE RGB Color Space
    • 5.2.2 The CIE XYZ Color Space
    • 5.2.3 The sRGB Color Space
  • 5.3 Gamma Correction
  • 5.4 World Structure
    • 5.4.1 Coordinate Spaces
    • 5.4.2 Transform Hierarchy
    • 5.4.3 Vertex Transformations
  • 5.5 The Graphics Pipeline
    • 5.5.1 Geometry Processing
    • 5.5.2 Pixel Processing
    • 5.5.3 Frame Buffer Operations
  • Exercises for Chapter 5

Chapter 6: Projections

  • 6.1 The View Frustum
  • 6.2 Perspective-Correct Interpolation
  • 6.3 Projection Matrices
    • 6.3.1 Perspective Projection Matrices
    • 6.3.2 Infinite Projection Matrices
    • 6.3.3 Projected Depth Precision
    • 6.3.4 Orthographic Projections
    • 6.3.5 Frustum Plane Extraction
  • 6.4 Oblique Clipping Planes
  • Exercises for Chapter 6

Chapter 7: Shaders

  • 7.1 Rendering Fundamentals
    • 7.1.1 Luminance
    • 7.1.2 The Rendering Equation
  • 7.2 Diffuse Reflection
  • 7.3 Specular Reflection
  • 7.4 Texture Mapping
    • 7.4.1 Texture Coordinates
    • 7.4.2 Conventional Texture Mapping
    • 7.4.3 Cube Texture Mapping
  • 7.5 Tangent Space
  • 7.6 Bump Mapping
    • 7.6.1 Normal Map Construction
    • 7.6.2 Rendering with Normal Maps
    • 7.6.3 Blending Normal Maps
  • 7.7 Parallax Mapping
  • 7.8 Horizon Mapping
    • 7.8.1 Horizon Map Construction
    • 7.8.2 Rendering with Horizon Maps
    • 7.8.3 Ambient Occlusion Mapping
  • Exercises for Chapter 7

Chapter 8: Lighting and Shadows

  • 8.1 Light Sources
    • 8.1.1 Point Lights
    • 8.1.2 Spot Lights
    • 8.1.3 Infinite Lights
  • 8.2 Extent Optimization
    • 8.2.1 Scissor Rectangle
    • 8.2.2 Depth Bounds
  • 8.3 Shadow Maps
    • 8.3.1 2D Shadow Maps
    • 8.3.2 Cube Shadow Maps
    • 8.3.3 Cascaded Shadow Maps
    • 8.3.4 Shadow Depth Offset
  • 8.4 Stencil Shadows
    • 8.4.1 Rendering Algorithm
    • 8.4.2 Variant Selection
    • 8.4.3 Shadow Volumes
    • 8.4.4 Optimizations
  • 8.5 Fog
    • 8.5.1 Absorption and Scattering
    • 8.5.2 Halfspace Fog
  • Exercises for Chapter 8

Chapter 9: Visibility and Occlusion

  • 9.1 Polygon Clipping
  • 9.2 Polyhedron Clipping
  • 9.3 Bounding Volumes
    • 9.3.1 Bounding Spheres
    • 9.3.2 Bounding Boxes
  • 9.4 Frustum Culling
    • 9.4.1 Visibility Regions
    • 9.4.2 Sphere Visibility
    • 9.4.3 Box Visibility
  • 9.5 Light Culling
  • 9.6 Shadow Culling
  • 9.7 Portal Systems
    • 9.7.1 Zones and Portals
    • 9.7.2 Light Regions
  • 9.8 Occluders
  • 9.9 Fog Occlusion
  • Exercises for Chapter 9

Chapter 10: Advanced Rendering

  • 10.1 Decals
  • 10.2 Billboards
    • 10.2.1 Spherical Billboards
    • 10.2.2 Cylindrical Billboards
    • 10.2.3 Polyboards
    • 10.2.4 Trimming
  • 10.3 The Structure Buffer
  • 10.4 Volumetric Effects
    • 10.4.1 Halos
    • 10.4.2 Shafts
  • 10.5 Ambient Occlusion
    • 10.5.1 The Occlusion Buffer
    • 10.5.2 Depth-Aware Blurring
  • 10.6 Atmospheric Shadowing
    • 10.6.1 The Atmosphere Buffer
    • 10.6.2 Sample Randomization
    • 10.6.3 Anisotropic Scattering
    • 10.6.4 Implementation
  • 10.7 Motion Blur
    • 10.7.1 The Velocity Buffer
    • 10.7.2 Image Postprocessing
  • 10.8 Isosurface Extraction
    • 10.8.1 Marching Cubes
    • 10.8.2 Preferred Polarity
    • 10.8.3 Implementation
  • Exercises for Chapter 10

Index

Download code listings

Download solutions guide (PDF)

See errata for Volume 2

Foundations of Game Engine Development, Volume 3: Models & Materials

Volume 3: Models & Materials
ISBN: 978-0-9858117-6-1
Full color • Soft cover
Length to be determined

Below is a list of topics that are planned to be covered in the third volume.

  • Bézier curves
  • B-splines
  • Hierarchical models
  • Morphing
  • Skinning
  • Geometric Antiproduct
  • Homogeneous quaternion operators
  • Forward kinematics
  • Inverse kinematics
  • Animation trees
  • Physically based shading
  • Microfacet theory
  • Fresnel reflection
  • Projectile motion
  • Particle systems
  • Random distributions
Foundations of Game Engine Development, Volume 4: Physics

Volume 4: Physics
ISBN: 978-0-9858117-7-8
Full color • Soft cover
Length to be determined

Below is a list of topics that are planned to be covered in the fourth volume.

  • Linear velocity, angular velocity
  • Forces, acceleration
  • Center of mass
  • Moment of inertia
  • Collision detection
  • GJK algorithm
  • Conservative advancement
  • Velocity constraints, position constraints
  • Lagrange multipliers
  • Jacobians
  • Split impulses
  • Joints (e.g., spherical, cylindrical, revolute)
  • Restitution
  • Friction
  • Rolling resistance
  • Buoyancy