Global Illumination: Radiosity


Global Illumination: Local vs. Global

  • Global illumination captures indirect light source effects, unlike local illumination.

  • Global illumination provides a more realistic rendering by considering all light interactions.

Ray Tracing and Path Tracing Review

  • Both ray tracing and path tracing involve tracing light from the screen (eye) back to the light source.

  • Ray tracing considers a single light path, while path tracing considers multiple paths.

  • Path tracing uses methods like random walk or multi-column methods to select the best paths.

Radiosity Theory

  • Radiosity is a view-independent method, unlike ray tracing and path tracing, which are view-dependent.

  • It is designed for diffuse interactions, focusing on interactions between objects rather than light paths.

  • Radiosity provides a different approach to solving illumination problems without requiring recursion.

  • It directly calculates radiosity values without iterative estimation of integrals.

Radiosity Concept

  • The scene is divided into triangle patches.

  • The method is based on the conservation of energy.

  • Green arrows represent light interactions between patches.

  • Red and pink arrows indicate light emission and reflection by patches.

Wave Block and RGB Values

  • Radiosity values depend on wavelengths, necessitating the calculation of RGB values.

  • Each patch requires separate RGB value calculations due to different RGB waveforms.

  • The three radiosity volumes (RGB) determine the final scene colors.

  • The radioactive method calculates energy for each RGB color channel independently.

Patch Processing

  • Patch processing calculates radiosity weights and involves separating the scene into patches.

  • Small polygons can use polyamide directly.

  • Large polygons need to be subdivided into smaller ones.

  • Light is often inconsistent across large polygons, necessitating subdivision for realistic rendering.

Form Factors

  • Form factor determines the proportion of energy sent from one patch to another.

  • It is a key concept for calculating energy transfer between objects, not light tracing.

Radiosity Definitions and Calculations

  • Radiosity is defined as energy per unit area leaving a patch per unit time.

  • The energy is calculated using equations involving form factors, considering both emitted and reflected energy.

  • BiB_i: Radiosity value for patch i.

  • dAidA_i: Area of ​​patch i.

  • EiE_i: Energy emitted from patch i.

  • RiR_i: Reflected coefficient.

  • FjiF_{ji}: Form factor from patch j to patch i.

  • dAidA_i: Area of ​​patch i.

Radiosity Equation

  • Calculate energy transfer for each patch to render the entire scene.

  • B<em>idA</em>i=E<em>idA</em>i+R<em>i</em>j=1nF<em>jiB</em>jdAjB<em>i dA</em>i = E<em>i dA</em>i + R<em>i \sum</em>{j=1}^{n} F<em>{ji} B</em>j dA_j

  • This calculation is computationally expensive.

Reciprocity

  • Due to reciprocity between patches I and j:

  • F<em>jidA</em>j=F<em>ijdA</em>iF<em>{ji} dA</em>j = F<em>{ij} dA</em>i

  • The main equation is simplified

  • B<em>i=E</em>i+R<em>i</em>j=1nF<em>ijB</em>jB<em>i = E</em>i + R<em>i \sum</em>{j=1}^{n} F<em>{ij} B</em>j

Linear System of Equations

  • The problem is represented as a linear system of equations, solvable through iterative solvers.

Iterative Solver

  • The equations can be solved iteratively using methods like progressive refinement.

Matrix Representation

  • The linear system can be represented in matrix form for solving.

Radiosity Combination

  • Radiosity value for a specific patch is a combination of its own emitted energy and the energy reflected from other patches.

Closed Form Solutions

  • Closed-form solutions have a complexity, where n is the number of patches.

  • O(n3)O(n^3)

  • This is computationally expensive for large n.

  • Iterative solvers, such as the Jacobi method, are often used in practice.

Form Factor Calculation

  • The form factor (f) is calculated based on the energy leaving one area (Aj) and arriving directly at another area (Ai).

  • The cosine term represents the angle between the patches.

  • F<em>ij=</em>A<em>i</em>A<em>jcosθ</em>icosθ<em>jπr2dA</em>jdA<em>i</em>A<em>idA</em>iF<em>{i j}=\frac{\int</em>{A<em>{i}} \int</em>{A<em>{j}} \frac{\cos \theta</em>{i} \cos \theta<em>{j}}{\pi r^{2}} d A</em>{j} d A<em>{i}}{\int</em>{A<em>{i}} d A</em>{i}}

Angle Considerations

  • If the patches are at a right angle, there is no coupling.

  • When directly facing each other and parallel, the energy transfer is maximized.

Simplified Calculations

  • If area Ai is small compared to the distance r, the equation can be simplified.

Efficient Models for Computation

  • Models can simplify the calculation process, such as different projections.

  • These predefined models may reduce accuracy but improve efficiency, with minimal visual impact.

  • The primary objective is to reduce computational complexity.

Type Cube Method

  • This involves projecting a patch onto another to determine interactions.

  • Interactions through a bounding box help simplify calculations.

Pixel Areas

  • Delta factors are calculated for each pixel, representing the relationship between pixels and patches.

  • Predefined discrete pixels are used to convert complex integral equations.

Delta Form Factor

  • The delta form factor is calculated based on angles between light and pixel areas.

  • ΔF=cosθΔaπr2\Delta F = \frac{\cos \theta \Delta a}{\pi r^2}

  • Where:

    • θ\theta is the angle between the light and also the pixel areas.

    • Δa\Delta a is the area of the pixels.

    • r is the distance.

Simplifications

  • If the light is directly above, the equation simplifies based on area and distance.

  • Pre-calculated delta numbers are saved in a dictionary to speed up computations.

Projections and Visibility

  • Determine which patches are visible from the pixels.

  • Ray tracing or depth buffers can identify occluded areas, similar to shadow mapping.

Relationship Between Pixels and Patches

  • Identify the nearest visible patch using ray tracing or buffer methods.

  • Calculate delta form factors for each patch and save them in a table for quick lookup.

Computational Issues

  • Discrete computation methods may introduce errors, but these are often insignificant to the overall visual effect.

Reciprocity Issues

  • Reciprocity means energy exchange is equivalent between patches.

  • Only half the patches need to be calculated.

Interpolations

  • Interpolation methods improve the final result if aliasing occurs.

  • Linear or cubic interpolation can smooth the radiosity values, with cubic interpolation providing better results.

Artifacts and Discontinuities

  • Discontinuities can occur between shadow and non-shadow parts.

  • Accurate mesh separation can minimize these artifacts.

Adaptive Solutions

  • Adaptive methods compare patch values nearby to smooth boundary interactions.

  • Increase density or move boundaries to maximize mesh reflection of boundaries.

Radiosity Computations: Summary

  • Viewpoint independent, focusing on object interactions.

  • Divided into separate patches for computational efficiency.

  • Form factors computed by different methods, including delta form factors.

  • Matrix equations solved for each patch, emphasizing computational efficiency.