Radiosity and Photon Mapping
Radiometry
Radiometry is a set of techniques for measuring electromagnetic radiation, including visible light.
- Many physcial processes convert energy into photons. (e.g. incandescent lightbulb turns heat into light)
- Each photon carries a small amount of energy.
- Brightness is determined by energy of photons hitting an object. We need this information to make accurate images!
Solid angle
Angle is a ratio of subtended arc length on circle to radius.
Circle has 2π radians.
Solid angle is a ratio of subtended area on sphere to radius squared. Sphere has 4π steradians.
Differential solid angle
Note that smaller θ makes smaller area!
That's why we have term.
We'll use as a unit length direction vector, so denotes differential solid angle in the direction of the direction vector.
Radiant Energy
Radiant energy is the total number of hits that occur anywhere in the scene, over the complete duration of the scene.
Energy of a signle photon is .
Radiant Flux
Radiant flux is the total number of hits per second.
Or we can think in other way: integral of flux is the total radiant energy.
Radiant energy density
Radiant energy density is the total number of hits per unit area.
Irradiance
Irradiance is the total number of hits per second, per unit area.
Image generation estimates the irradiance at each point of an image!
To be precise, we estimate the total radiant flux per pixel.
Spectral Power Distribution
Spectral power distribution describes the irradiance per unit wavelength.
Radiance
Radiance is the solid angle density of irradiance.
is an irradiance when differential surface area is oriented to face in the direction .
Radiance is the total number of hits per second, per unit area, per unit solid angle...!
Surface Radiance
Normally, surface is not oriented to ...
We need term!
Spectral Radiance
The total number of hits per second, per unit area, per unit solid angle, per unit wavelength??
Spectral radiance describes the radiance per unit wavelength.
Incident/Exitant radiance
In general, incident radiance and exitant radiance are different. We have to distinguish between them!
Properties of radiance
Radiance is the energy along a ray defined by origin point p and direction .
It characterizes the distribution of light in an environment.
Rendering is all about radiance!
Pinhole camera model can measure radiance.
Radiant Intensity
Radiant Intensity is the power per solid angle emanating from a point source.
Instead of constant intensity, we can use goniometric diagram that measures light intensity as a function of angle.
Computing irradiance from radiance
Irradiance can be computed from radiance.
For most sources, the integral has already been computed.
If integral is not analytical, we should compute it numerically with Monte Carlo method.
Irrandiance from a uniform hemispherical source
Irrandiance from a uniform area source
Where is a projected solid angle, an area of object (O) projected onto unit sphere (), then projected onto plane. ()
Irrandiance from a uniform disk source
Ambient Occlusion (AO)
Assume spherical light source at infinity, then irradiance is now rotation, translation invariant.
Therefore, we can pre-compute and bake irradiance into texture to enhance shading.
Especially we use AO in games!
Precomputing makes runtime efficient, so we can mimic global illumination in realtime!
Photometry
Radiometry is about physical energy, photometry is about actual perception of light!
Photometry accounts for response of human visual system to electromagnetic radiation.
e.g. Luminance integrate radiance over all wavelengths, weight by eye's luminuous efficacy curve. (sensitivity per frequency)
All radiometric quantities have equivalents in photometry.
Unfortunately, units of photometric quantities is not good...
Physics | Radiometry | Photometry | MKS | CGS | British |
---|---|---|---|---|---|
Energy | Radiant Energy | Luminous Energy | Talbot | Talbot | Talbot |
Flux (Power) | Radiant Power | Luminous Power | Lumen | Lumen | Lumen |
Flux Density | Irradiance (incoming) Radiosity (outgoing) | Illuminance (incoming) Luminosity (outgoing) | Lux | Phot | Footcandle |
Angular Flux Density | Radiance | Luminance | Nit / Apostilb / Blondel | Stilb / Lambert | Footlambert |
Intensity | Radiant Intensity | Luminous Intensity | Candela | Candela | Candela |
The Rendering Equation
Ray tracing is not enough!
It miss out on small-scale effects, (e.g. diffraction, iridescence)
and also miss out on large-scale effects. (e.g. bending of light due to gravity)
Rendering equation can compute radiance at a given point p, in a given direction .
- is an outgoing radiance.
- is an emitted radiance.
- is a scattering function. (e.g. BRDF)
- is an incoming radiance.
- is an angle between incoming direction () and surface normal
Problem: To compute incoming radiance, you need to use rendering equation again. This is a recursive function!
Estimating the rendering equation
Solve the rendering equation with assumptions!
- All surfaces are small, opaque, ideal diffuse reflectors.
- The system is closed. (No extra energy can be in/out)
We can assume radiance and scattering function differ only by surface.
is the reflectivity factor for surface k, and is the fractional amount of radiant energy from surface j that reaches surface k. (called the form factor)
Since rendering equation is now a linear system, we can solve it!
Form factor
The form factor can be calculated before solving the equation.
is the area of the surface j.
Again, most cases in which the integral is analytical have already been computed.
Note that this equation satisfies some properties!
- Conservation of energy,
- Uniform light reflection,
- Only plane or convex patches,
We can avoid computing integral by... rendering?
Render from each surface j, then the fractional amount of pixel of surface k is !
Difference between radiosity and ray tracing
Ray tracing is also sort of the estimate of the rendering equation!
Ray tracing tends to render sharp parts, while radiosity tends to render soft.
Also, radiosity renders surface less shiny.
Radiosity is used in construction industry, especially making indoor footage.
However, you can always use both method.
Photon mapping
Various effects such as caustics, BSSRDF is hard to implement using ray tracing or radiosity.
Why not simulate the light's behavior?
Photon mapping is two-pass global illumination algorithm.
It can effectively make various effects!
First pass
Emit photons randomly from the light sources throughout the scene.
The emitted photons are traced through the scene until they strike an object.
Based upon a probability distribution for that object, phtons are reflected, transmitted or absorbed by the object.
At each intersection with an object, information about the photon's incident direction, incoming power, and the intersection point are stored into the photon map.
Second pass
Render image using the photon map!
Cast rays into the scene, and estimate the radiance from the intersection points along the ray. (e.g. use k-nearest algorithm)
The estimated radiance is used in the calculation of the pixel color.
Pros and cons
Basically modified version of ray tracing! If ray tracing is implemented, photon mapping is easy.
However even millions of photon has a lot of aliasing.
We need to shoot billions of photon.... or use a good anti-aliasing methods.