Thus far our discussion of 3D graphics has
concentrated mainly of real-time rendering.
In today’s lecture, we will discuss the two main
techniques for non real-time rendering.
Local reflection model
Imagine lights and objects are floating in dark space
Considers only direct illumination
Global reflection model
Indirect light considered
Light is reflected multiple times
Much more computationally expensive.
Outside the reach of most real-time applications.
LOCAL VERSUS GLOBAL
In theory, for this we:
Trace rays from each light source to each point
visible from that light source
Trace reflections and refractions from this point to
We reach the viewport, or
We exit the scene entirely
Approximations still used
Can’t trace all rays of light from a light source.
Ray tracing is the process of tracing the
path of light through pixels in an image.
Capable of producing high degrees of realism.
Still not quite photorealistic, but not far off.
High computational cost
Best used for scenes and animations that can be pre-
Incorporates many aspects of physics
Rays send away from the camera rather
than to it
Most rays of light emitted from a source would
not hit the viewing plane.
Comparable method called photon mapping exists.
Many orders of magnitude more expensive to calculate.
Reflections and shadows realistically produced
Expensive to calculate each scene
Still an approximation
Rays sent backwards
from the camera.
expensive than the
Remember our different kinds of light
Must be able to combine light interactions
in a ray-tracing model.
Specular to Diffuse
Diffuse to Specular
And so on
TRANSMISSION OF LIGHT
Indirect transmission of light occurs in several
Transparency should refract light
It looks unrealistic otherwise.
Translucency transmits light in multiple new
For each pixel, we calculate the ray from the
centre of the viewport through that pixel.
Find the intersection of that ray with the nearest
Determine the pixel colour based o surface
properties, orientation, and light intensities
This may in itself have a component from reflected or
refracted light rays
If the surface is reflective or transparent,
generate a new ray.
Trace that onwards.
Repeat for all pixels.
If no intersection, pixel colour is background
Secondary rays may be used for diffuse reflection.
Generate multiple new rays and trace them on.
Depends on the kind of reflection needed.
Each secondary ray is followed until it hits another
object, light source, or background.
Recursion is used to permit this relationship to
extend to predefined limits.
Expense of computation based on number
of calculations required.
Consider a 1000x1000 resolution.
On a scene with 1000 objects.
With a single light source.
Consider primary illumination first
How about secondary rays?
Further orders of illumination?
How about a second light source?
Or a third?
Various optimisation schemes exist.
Radiosity is based on a model of radiative
Assumes conservation of light energy in a
Energy emitted or reflected by every
surface accounted for by:
All surfaces are broken up into patches
Patches can emit or send light
They send light to other parts of the model.
Elements can absorb light
They receive light from other parts of the model.
Number of patches relates to
Each element is associated with a patch.
Indeed, a patch may have many elements
Radiosity works through a system of progressive
Start with the patch which has most energy to ‘shoot’
Each of the elements receive the energy appropriately, and
add to the energy of their own patches.
Repeat with the patch which now has the most unspent
Repeat until all patches are empty, or some minimal bound is
gets treated as a
patch (a light
Every patch is
associated with a
Patches may be present in higher resolution than
One surface may be broken up into many patches.
Subdivision algorithms used to further refine
patch mapping over surfaces.
Can be done blindly
Focus at areas of high contrast in light levels.
RADIOSITY – A FIRST APPROACH
Imagine a simple room
No light source
Radiosity makes each of the surfaces in the scene a light
Some of these surfaces may have no energy to spend to begin
Imagine the roof as a giant light source.
Like in a supermarket
Each surface stores:
How brightly lit it is
How much surplus energy it has to spend.
We must calculate the interaction of energy to surface of
all surfaces in the scene.
Can be calculated in many ways. Most usual is by geometric
The resulting number is the form factor.
Radiosity creates a scene of soft
diffuse light. Represents the
interaction of surfaces well, but
cannot suitably deal with specular
GLOBAL REFLECTION MODELS
Simulates perfect specular reflections
Good for shiny objects reflecting in each other.
Ray-traced images tend to have lots of shiny objects
with perfect reflections.
Is viewport dependant.
Change the viewport and you need to rerender.
Simulates the interactions of diffuse light
Good for matte surfaces
Images rendered using radiosity tend to be softly lit
rooms without shiny objects.
Is viewport independent.
Change the viewport and the radiosity image remains the
GLOBAL REFLECTION MODELS
Best results obtained by combining the two into a
Radiosity used to build a model of diffuse
illumination across a scene.
Raytracing used to build a viewport dependant
illumination of the scene.
Combination of two has representation of specular
and diffuse radiation.
Permits soft and hard lighting in a single scene.
Non real-time rendering works through two
Map the path of light from a viewport to objects.
Light interactions modelled as energy interactions between
Best results obtained by combining both
approaches into a two-pass algorithm.