Computer Graphics (WIP)

Radiosity

Diffuse global illumination through patch-to-patch energy transfer.

General

Ray Tracing vs. Radiosity

  • Ray Tracing and radiosity complement each other.
  • Ray Tracing is good at:
    • Perfect specular reflections.
    • Refractions and transmissions.
    • Hard shadows.
  • Ray Tracing is expensive for:
    • Diffuse inter-reflections.
    • Color bleeding.
    • Soft indirect light.
    • Scattering over many diffuse surfaces.
  • Radiosity solves the diffuse-light problem.
  • It is especially useful for indoor scenes where diffuse surfaces dominate.
  • It is not efficient for specular reflection or refraction.

Object Space vs. Image Space

  • Ray Tracing is an image-space method.
    • It traces rays per pixel.
    • It is tied to the current camera view.
  • Radiosity is an object-space method.
    • It computes light transfer between scene patches.
    • It is view independent.
    • The camera can move without recomputing radiosity.
    • Recompute only when scene geometry, lights, or materials change.

Radiosity Setup

Patches

  • Split the scene into surface patches.
  • Patches can be uniform or adaptive.
  • Light sources are also approximated as patches.
  • Compute light energy transfer from patch to patch.
  • Cost is roughly O(n2)O(n^2) for nn patches.
  • The low-resolution radiosity result is reconstructed onto the final scene.

Radiosity Equation

  • Radiosity BiB_i is the energy leaving patch ii per unit area and time.
  • It contains emitted light and reflected incoming light.
Bi=Ei+ρijFijBjB_i = E_i + \rho_i \sum_j F_{ij} B_j
  • EiE_i is emission of patch ii.
  • ρi\rho_i is reflectance of patch ii.
  • FijF_{ij} is the form factor from patch ii to patch jj.
  • BjB_j is radiosity of patch jj.

Form Factors

Meaning

  • A form factor describes how much light leaving one patch reaches another patch.
  • It depends on:
    • Distance.
    • Orientation.
    • Visible area.
    • Occlusion.
  • Form factors are reciprocal because light transport is symmetric when patch properties are swapped.

Visibility

  • Patches can be blocked by other geometry.
  • Use a visibility factor VijV_{ij}.
  • V=1V=1 means visible.
  • V=0V=0 means blocked.
  • Occlusion can remove transfer between patches.

Exact Solution

  • Exact surface-to-surface form factors need a double integral over both patch areas.
  • This is too expensive for practical rendering.
  • Practical methods approximate the integral.

Computing Form Factors

Nusselt Analog

  • Place a hemisphere above a patch point.
  • Project the other surface onto the hemisphere.
  • Project the hemisphere onto the base disk.
  • Projected area divided by π\pi gives the form factor contribution.

Hemicube Method

  • Approximate the hemisphere with a half cube.
  • Center the hemicube above a patch point.
  • Project scene polygons onto the cube faces.
  • Use z-buffering for visibility.
  • Sum the covered cell contributions.
  • Advantage:
    • Uses standard graphics pipeline operations.
    • Can run on GPU.
  • Disadvantage:
    • Discretization errors.
    • Aliasing, visibility, and proximity errors.
    • Higher resolution becomes slower.

Area Sampling

  • Subdivide the destination patch into small samples.
  • Cast rays between the source point and destination samples.
  • Add a contribution only if the ray is visible.
  • It is slower than hemicube rendering.
  • Accuracy can be increased as needed.
  • It is preferred in modern implementations.

Solving Radiosity

Linear System

  • Every patch contributes one equation.
  • All equations together form a large linear system.
  • Direct solving is usually infeasible.
  • Gaussian elimination is around O(n3)O(n^3).
  • Iterative methods are preferred.

Gathering

  • Compute one patch by gathering light from all other patches.
  • Initialize emitting patches with B=EB=E.
  • Update patches repeatedly until convergence.
  • Typical methods:
    • Jacobi.
    • Gauss-Seidel.

Shooting

  • Choose one patch and shoot its unshot energy to all other patches.
  • Initialize emitting patches with B=EB=E.
  • Often shoot the patch with the highest unshot energy first.
  • Typical method:
    • Southwell.
    • Progressive radiosity.

Progressive Radiosity

  • Iterative solutions produce usable images early.
  • Every iteration improves the result.
  • Stop when the image changes only slightly.
  • Frame rate is inversely related to iteration cost.

Light Bounces

Neumann Series

  • Radiosity can be interpreted as a sum of light bounces.
  • II term means emission.
  • AA term means first bounce.
  • A2A^2 term means second bounce.
  • AkA^k term means kth bounce.
  • This is useful when only the first few bounces matter.

Patch Subdivision

Uniform Patches

  • Uniform patches are simple.
  • Low resolution creates artifacts:
    • Blocky shadows.
    • Discontinuities.
    • Rough indirect light.
  • Increasing resolution everywhere is expensive.

Adaptive Patches

  • Refine only where needed:
    • Shadow borders.
    • Strong light changes.
    • High-detail regions.
  • Keep unimportant regions coarse.
  • This gives a better quality-cost tradeoff.

Reconstruction

  • Mesh surfaces into patches.
  • Compute form factors.
  • Solve the radiosity equation.
  • Reconstruct or interpolate the low-resolution result.
  • Remember:
    • Radiosity is best for diffuse, soft, indirect light.
    • Ray Tracing is best for specular effects, refraction, and hard shadows.
Last updated: