What do you mean by a cache of shaded points?
The Render Cache stores shading results as a cache of shaded points in 3D.
The location of the point is the first visible surface seen through
the corresponding eye ray (pixel). The color is the shading value produced
by the underlying renderer (eg, a ray tracer in the example application)
for that eye ray. Once entered in the cache, the point maintains it
position and color until it is eventually evicted from the cache or recomputed
by the underlying renderer in some future frame.
For each frame, the current contents of the point cache are projected onto
the current image plane. Because we want to maintain interactive performance,
we limit ourselves to a maximum of one usuable point per pixel and use a
z-buffer to select the closest point visible through each pixel. But
due to the latency and limited number of results that the underlying renderer
can produce each frame, many pixels may not have any point map to them in
any particular frame. The point cache size is sized just slightly larger
than the number of pixels in the image (more points would increase the amount
of work required each frame, while fewer would not allow us to eventually
reach the desired goal one point-per-pixel when the scene and camera are
static).
Instructions
- Start the render cache program from the button on the main page. It will start by showing a simple
environment with 7 spheres.
- Select "Load Lotus Model" from the Scene menu.
- Select "Ray Points" from the Display pull-down box. To
show the projected points without any interpolation to fill in gaps between
the points.
- Disable (uncheck) the "Depth Cull" box in the Options panel
to disable the depth cull filter. (The depth cull filter tries to remove
some points which it thinks should have been occluded, but we just want to
see the raw projected points in this example.)
- Notice that there are a few black pixels where there is no point, but
most of the pixels have points. The render cache may never exactly
converge to filling every pixel with a point, but it will come very close
over time. These gaps are normally filled in or hidden by the interpolation
filters.
- Enable (check) the "Freeze Points" in the Options panel. This
prevents points from being added to or removed from the point cache, so that
we observe it from other viewpoints without view-dependent adaptation that
would normally occur
- Now try moving the camera to observe the frozen point set from other
viewpoints, by positioning the mouse over the image and using the camera control keys. Notice
how there are only points in regions that were visible from the original
viewpoint. (You can return to the original viewpoint using the "Reset
Camera" command in the Scene menu.)
- You can also unfreeze the point cache (uncheck "Freeze Points") in
another viewpoint and watch the render cache adapt the point cache for the
new viewpoint using new shaded results from the underlying renderer as they
beomce available.
Sample Images
Shaded points generated for this viewpoint. There is nearly
a one-to-one mapping between points and pixels
Same shaded points viewed from another viewpoint. Note that
there are only points in regions that were visible from the original viewpoint.