Title: CS 655
1CS 655
2Distributed Ray Tracing
- What is distributed ray tracing?
- Distributed ray tracing is not ray tracing on a
distributed system. - Distributed ray tracing is a ray tracing method
based on randomly distributed oversampling to
reduce aliasing artifacts in rendered images. - Also called distribution ray tracing or
stochastic ray tracing - (The images in this presentation are from Andrew
G. Zaferakis, Aneesh Naman, Allen Martin, Daqing
Xue, Henrik Wann Jensen, and Jinho Lee)
3Distributed Ray Tracing
- Idea Introduce noise into the ray tracer to
minimize visual artifacts such as aliasing,
perfect reflections, etc. - Stocastically distribute rays over
- Space antialiases the image
- Reflection angle produces glossy reflections
- Transmission angle produces translucency
- Shadow ray produces soft shadows (penumbra)
- Lens area produces depth of field
- Time produces motion blur
4Antialiasing
- The human eye samples using a Poisson disk
distribution - A finite number of photoreceptors
- Cones in the eye are distributed stochastically,
but such that no two cones are closer than a
certain distance
5Antialiasing
- We can apply this approach to ray tracing
- Send out rays stochastically, but such that they
maintain a Poisson disk distribution - This reduces aliasing, but is expensive to
compute - However, we can approximate a Poisson disk
distribution fairly quickly - Idea begin with a regular grid
- Jitter the ray locations slightly within the grid
6Uniform Sampling
Prone to aliasing in the image
7Jittered Sampling
Antialiases the image
8Jittered Sampling
- Approximates a Poisson disk distribution
- Not exact, but much cheaper
- Removes high frequencies
- Introduces noise in place of high frequencies
- Can still have problems
- May leave large areas uncovered by samples
- May have some areas with more samples than
necessary
9Improved Jittered Sampling
- To improve the image further, send out multiple
jittered rays per pixel - Make the number of sub-pixels easily changeable
start small then increase as you are confident
your ray-tracer works.
Similarly for all other pixels
10Standard Ray Tracing
11Distributed Ray Tracing
12Standard Ray Tracing - detail
13Distributed Ray Tracing - detail
14Glossy Reflections
- We can use the concept of ray jittering to
produce glossiness (blurred reflections) - Tracing a ray based on perfect reflection angle
produces sharp reflections
15Glossy Reflections
- We can create a blurred reflection by sending out
jittered rays about the reflection ray
N
R
I
Bound of jittered reflection rays
16Glossy Reflections
- This has the effect of blurring the reflection
- The exact reflection vector is computed, then
slightly jittered from the original direction - The jittered ray may hit an entirely different
object than the one hit by the true reflection
ray - This gives a smoothly blurred reflection
17Reflections Standard Ray Tracer
18Reflections Distributed Ray Tracer
19Reflections Distributed Ray Tracer
20Reflections Distributed Ray Tracer
21Standard Ray Tracing
22Glossy reflections
23Glossy reflections
24Glossy reflections
25Altering Jitter Amount
26Altering Jitter Amount
27Altering Jitter Amount
28Translucency
- We can also apply the concept of ray jittering to
produce translucency (blurred transmissions) - Tracing a ray based on perfect transmission angle
produces sharp transparencies
N
I
T
29Translucency
N
I
- Jittering the rays about the actual transmission
angle produces a blurred effect
T
Bound of jittered reflection rays
30Transmissions Standard Ray Tracer
31Transmissions Distributed Ray Tracer
32Transmissions Distributed Ray Tracer
33From Jia, Sun, and Xu
34Altering Jitter Amount
35Altering Jitter Amount
36Soft Shadows
- We have been simulating lights with point light
sources - This produces hard shadows
Point light source -hard shadow
37Soft Shadows
- Lights in the real world are not point light
sources, thus the shadows are not sharp
Area light source
penumbra
umbra
Area light source -soft shadow
38Soft Shadows
- The penumbra is the portion of the shadow
resulting from partially obscured lights - To simulate penumbra
- Send out multiple shadow rays from the
intersection point to the area light source - Jitter the rays according to the area light
source - The intensity of the surface point depends on the
number of jittered rays that reach the light
source
Area light source
Bounds of jittered shadow rays
Occluding object
Intersection point
39Hard Shadows
40Soft Shadows
41Standard Ray Tracing
42Ray Tracing with an Area Light Source
- Visible penumbra and umbra, but too distinct
43Distributed Ray Tracing
44Distributed Ray Tracing
45Distributed Ray Tracing
46Depth of Field
- Idea the camera (or eye) should have a fixed
focal length - Objects at that distance should be in focus
- Objects closer or further away should not be in
focus
Lens
Image Plane
Focal Plane
47Lens Properties
D
VD
r
P
Vp
PD
Pf
C
F/n
Object in Scene
Lens
Image Plane
Focal Plane
48Lens Properties
- F Focal length
- n aperture number
- F/n lens diameter
- Pf the focal point
- P distance from lens to focal point
- Vp distance from lens to image plane
- PD a point not on the focal plane
- D distance from lens to PD
- r radius of cone for object at distance D
- C circle of confusion
49Simulating a lens
- Approach 1
- For an object located at PD, send out a group of
jittered rays that lie within a cone of radius r - How do we compute r?
- This simulates a lens without actually having
one, but isnt very accurate
50Simulating a lens
- Approach 2
- Find the focal point
- Send a ray from the center of the lens (eye
point) through the screen and follow it a
distance P - Choose a jittered point on the lens
- Trace a ray from that jittered point through the
focal point - Return intensity information based on what that
ray hits
51Simulating a lens
- Step 1 determine the focal point by tracing a
ray from the lens center through the pixel a
distance P
52Simulating a lens
- Step 2 Choose a jittered point on the lens
New point
53Simulating a lens
- Step 3 Trace the ray from the new point through
the focal point
54Simulating a lens
- Step 4 Return the intensity information
55Depth of Field Example
56Depth of Field Example
From Alan Watt, 3D Computer Graphics
57(No Transcript)
58Motion Blur
- Distribute rays over time
- Static objects will not change
- Moving objects will be blurred, depending on
their velocity - How
- Jitter the rays with respect to time
- Determine object positions at each of the
jittered time values - Send each ray with the objects positioned
appropriately - Combine the rays back into one to get the motion
blurred object
59Motion Blur Example
60Motion Blur Example (from Cook et. al.)
61(No Transcript)
62Summary of Distributed Ray Tracing
- For each ray do
- Jitter the spatial screen location of the ray
- Select a time for the ray and move the objects to
that time - Perform depth of field calculation
- Determine the focal point by sending a ray from
the eye point (center of the lens) through the
pixel, a distance P - Determine a lens location by jittering the origin
of the ray to a position on the lens - Compute the intersection by sending the primary
ray from the jittered location through the focal
point - Trace jittered reflection rays
- Trace jittered trasmission rays
- Trace jittered shadow rays
63Summary of Distributed Ray Tracing
Shadow Ray
Reflected Ray
Transmitted Ray
64Distributed Ray Tracing (Cook et.al.)