User Interface
The image above shows the user interface of the render cache sample application.
We will briefly describe each of the elements in the gui including the
mouse and key commands for moving the camera.
Scene Menu
- Reset Camera - Restores the camera to its initial position
for the current scene. Very useful if you get lost.
- Load Spheres - Loads the spheres model. Simply 7 spheres
floating in space (one of which is a mirror ball).
- Load Loft - Loads the loft model. A small single room
house with an upstairs and downstairs. A diffuse only model with 23
thousand triangles and two point lights.
- Load Lotus - Loads the lotus room model. A more interesting
space with multiple objects and several large mirrors. Includes 21 thousand
triangles and 3 point lights. (Thanks to Hector Yee for providing the
model.)
- Quit - Exits the sample application. You can also exit
by simply closing the window.
Ratio Menu
The ratio is the "render mismatch ratio"[1], defined as the number of pixels
in the image divided by the number of eye rays computed (shaded) per frame.
Thus a ratio of 32 means that ray tracer is only doing enough work to
compute 1/32nd of a complete image each frame. The rest of the data
comes from the cache of prior shading results maintained by the render cache.
The actual ratio being used is displayed at the bottom of the options
panel and may be higher if the ray tracer is unable to shade enough rays within
the frame time. (Very common in the more complicated scenes or shadings.)
Mode Menu
- Ray Trace Only Mode - This mode does not actually use the render
cache at all. Instead to achieve an interactive frame rate, the ray
tracer is used to compute and update 1/16th of the pixels each frame. Once
set, a pixel retains its color until it is updated again 16 frames later.
(Updating every pixel, every frame would generally produce frame rates
too low to be interactive.) This mode is single threaded, but since
it avoids the overhead of the render cache computations, the thread can devote
all its time to tracing rays. Despite this, the effective interactive
performance is generally worse than when using the render cache. Note:
many of the other controls do not apply in this mode since the render cache
is not being used.
- Single Processor Mode - In this mode, the render cache and
the ray tracer share time on a single thread with most of the time going
to the render cache computations. Despite the decreased amount of time
spent tracing rays, interactive performance is generally better than the
pure raytracing mode.
- Dual Processor Mode - In this mode the render cache and the
ray tracer run on separate threads and communicate asychronously. This
is the way the render cache is really designed to be run, but works best on
dual processor systems, where it allows full utilization of both processors.
Help Menu
- About - Brings up information box about the sample application
- Camera Controls - Brings up an information box with a brief
reminder of some of the camera control keys.
Image Display and Camera Controls
The main region displays the current image and allows you to move the camera
when you have mouse positioned over the image panel (hint if pressing these
keys doesn't seem to work, move the mouse pointer over the image). You
can use either number keys on the number pad (if you have one on your keyboard
and set the num lock) or an alternate set of keys on the main keyboard. Press
and hold to move continuously.
- 8 or I - move camera forward
- 5 or K - move camera backward
- 4 or J - move camera to your left
- 6 or L - move camera to your right
- 9 or O - move camera up
- 3 or > - move camera down
- 0 or Spacebar - toggle rotation mode on/off. In
rotation mode the camera will turn based on the current mouse position relative
to the center of the image.
- Minus - zoom out camera field of view
- Plus - zoom in camera field of view
Framerate Display
The framerate line below the image display panel shows the current framerate
(in frames per second).
Movement Scale
The movement scale allows you to adjust how quickly the camera moves during
camera manipulations. Because different models are built to different
scales, this is quite useful. Its an exponential scale, so small changes
are often sufficient.
Exposure Controls
- Minus - Darken the image by reducing the effective exposure
time.
- Auto - Automatically guess at an appropriate exposure setting
for the current image. May need to be fine-tuned with the lighten and
darken buttons
- Plus - Lighten the image by increasing the effective exposure
time
Shading Mode Controls
- Diffuse - Diffuse only shading
- +Phong - Diffuse shading plus phong highlights (depending on
object's material)
- +Shadows - Diffuse shading plus phong highlights and shadow
from light sources
- +Reflections - Diffuse plus phong, with shadows and reflections
on mirror surfaces
Display Mode Controls
This control allows the display of various visualization modes that help
show how the render cache works by displaying various intermediate stages
in its processing.
- Raw Points - Show the "raw" projected points for this frame
without any filtering (except that the depth cull is still applied if active)
- Prefilter Only - Show the image after point projection and
the 7x7 prefilter, but before the normal smaller 3x3 filter. This image
is typically quite blurry. Only works if the prefilter is active, otherwise
it just produces a black image.
- Normal Image - Show the image after point projection, prefilter
(if active) and the 3x3 interpolation filter have been used. This is
the image that would normally be shown to the user.
- Priority - Show the priority image which is constructed to
guide the sampling. Highest priority (white) is given to pixels when
no valid points map into their 3x3 neighborhood. Lowest priority (black)
is given to pixels which had a recently computed point map to them
- Requests - Shows the subset of image locations where the render
cache chooses to ask the ray tracer to compute a new sample (i.e. shade an
eye ray). Locations should be spread somewhat uniformly over the image
plane while also more concentrated in regions of sparse or changing data.
- Occupancy - Shows a false-color visualization of which pixels
had valid sample mapped to them (green) or were empy (blue). Note that
the depth cull filter (when active) incorrectly invalidates some pixels
near depth discontinuities.
- Pred. Occupancy - When prediction is active, this mode shows
the estimated occupancy in the predicted (future) image plane. White
for predicted occupied and black for regions predicted to lack samples. Note
this image has 1/16th as many pixels as the normal image, so it is magnified
for display.
- Pred. Requests - Shows the locations in the predicted image
plane where samples are requested because a lack of data is predicted for
that location. Allows data to be precomputed just before it is needed and
provide at least sparse data in new regions as they become visible.
Options controls
- Use Prediction - enable/disable predictive sampling. When
enabled, uses a predicted camera to detect soon to be visible regions that
have no shading results (points) cached and requests a sparse set of samples
to provide at least some data in such regions before they become visible.
- Clear First - enable/disable clearing of the image to black
between frames. Sometime due to a lack of nearby cached shading results,
the render cache is unable to compute a color for a pixel. In this case
the pixel can either be cleared to black (enabled) or left the same color
it had in the prior frame (disabled). Leaving it with its old color
is usually less visually distracting, but clearing to black helps when visualizing
on the render cache works.
- 7x7 Prefilter - enable/disable use of the prefilter stage.
The prefilter has a larger filter kernel and is thus able to fill in
larger gaps between points (cached shading results) than the regular interpolation
filter with its 3x3 filter. Because the regular interpolation overwrites
any pixels that it can, effectively only pixels that cannot be computed by
the regular interpolation are affected.
- Freeze Points - Freeze the state of the point cloud (shading
result cache). When frozen, points are neither added nor removed from
the cache and aging of the points is disabled. Very useful for visualizing
how the render cache works. You can freeze the point cloud from
particular viewpoint and then look at it from other positions and visualization
modes.
- Rate Display - Show the current "render mismatch" ratio. This
ratio is defined as the number of pixels divided by the number of new samples
(shaded eye rays) computed by the underlying renderer (ray tracer in this
case). A 512x512 image contains 262144 pixels. If the ray tracer
is able to compute 8192 eye rays per frame, then the mismatch ratio is 32.
If the ray tracer can only compute compute 2000 eye rays per frame then
the ratio is 131.