← Blog

PBRT Chapter 3: Geometry and Transformations

· PBRT, Rendering

These are notes I took while studying the contents in the PBR book.

3.8 Spherical Geometry

Rendering often involves integration over the domain of directions, which can be represented as areas on the unit sphere.

The Solid Angle

The concept of solid angles provides a way to measure the area that a set of directions. It is the 3D extension of the planar angle in 2D.

A planar angle measures the opening between two rays in 2D. In rendering, we use it to measure the angle subtended by an object from a specific viewpoint. This describes the portion of an observer’s field of view that the object occupies.

Extending this to 3D, the solid angle is the measure of the projected area of a 3D object onto a unit sphere centered at the viewpoint. It is quanitifed in steradians.

Spherical Polygons

The projection of a planar polygon onto a unit sphere forms a spherical polygon.

Constructing a spherical polygon. The vertices of a spherical polygon are the intersection points of the unit sphere with the vectors from the sphere’s origin to the planar polygon’s vertices. The edges of the spherical polygon are the great arcs (segments of great circles) formed by intersecting the sphere with planes that contain the sphere’s origin and the planar polygon’s edges. A great arc is the shortest path between two vertices on the surface of the sphere.

The rules of spherical polygons. Interestingly, the three angles of a spherical triangle do not sum to π\pi radians. Girard’s theorem states that the area A of a spherical triangle is its spherical excess:

A=α+β+γ−π,A = \alpha + \beta + \gamma - \pi,

where α,β,γ\alpha, \beta, \gamma are the interior angles of the triangle. These angles are equal to the dihedral angles between the planes that form the edges.

3.11 Interactions

Modern rendering systems use interaction interfaces to represent the interaction of light and either the surface (SurfaceInteraction )or participating medium (MediumInteraction ).

Surface Interactions and Differential Geometry

For surface interactions, in addition to the hit position pp, normal nn and surface parametrization (u,v)(u,v) data, we also need the derivatives of position and the normal with respect to surface parameterization: ∂p∂u,∂p∂v\frac{\partial p}{\partial u},\frac{\partial p}{\partial v} and ∂n∂u,∂n∂v\frac{\partial n}{\partial u}, \frac{\partial n}{\partial v}.

Figure from PBRT book.

Figure from PBRT book.

Positional derivatives (∂p∂u,∂p∂v\frac{\partial p}{\partial u},\frac{\partial p}{\partial v} ): ****These two vectors represent directions on the tangent plane at p, and are orthogonal to the surface normal at p. They describe how the position changes with small perturbations in the (u,v)(u,v). They need not be perpendicular to each other. The normalized cross product of these two derivatives yields the surface normal.

Normal derivatives. These vectors describe the differential change in surface normal as we perturb (u,v)(u,v) along the surface. They encode the local curvature of the surface. Rendering systems track them for several key reasons:

  • Ray differentials for texture filtering: These derivatives are essential for calculating how the shape of a beam of light (”a ray differential”) changes upon hitting a curved surface. This information can be used to correctly select texture mipmap levels, leading to high-quality antialiased renderings.
  • High-order geometric approximations: They provide more detailed information about the local shape, i.e. curvature. This can be useful when applying displacement mapping.