What is point invalidation?
The render cache stores a color with each visible point (ie, the cached shading
values) and reuses that point and color in later frames. Sometimes
though, a point's color can change. For examples due to changes in
the shading mode, changes in the model, or for non-diffuse surfaces if they
are viewed from a different direction. To detect such changes the render
cache periodically asks to the underlying renderer to recompute the color
for the points. If the new color is significantly different from the
old, then the render cache detects that the color is changing in that region.
The one way to handle such changes is to have the underlying renderer recompute
all the points in the changed region. However if the renderer is shading
points at a very slow rate, it may take too long to recompute all the affected
points. We can often speed the image convergence by throwing away or
invalidating points whose color is very likely to have changed (eg, if the
colors of nearby points are known to have changed). The invalidation
mechanism does exactly this to remove stale data from the cache more quickly.
(It is better to interpolate from sparser fresh data rather than denser
stale data in such a case.)
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.
- Change the Shading option to "+Shadows" to turn on shadows.
This changes the color of all points in shadow from any of the three
lights. Watch as the image updates with this new shading
- Change the Shading option to "+Reflections" to enable the reflections
in the mirrors on the wall, and watch the image update. Change back
to "+Shadows" to watch the reflections disappear
- Change the Display mode to "Occupancy". This shows a false-color
image where pixels which had valid points map to them are shown in green
and empty pixels without point data are shown in blue. Try changing
between Shading options and notice how the system detects the regions
of changing color and invalidates points there (causing the region to turn
temporarily blueish). (You may also notice some unrelated permanent
blue around the edges of objects caused by the depth cull filter.)
- You can also change the Display mode to "Priority" which shows
the priority map used to guide sampling. Try changing the Shading options
again and notice how the regions of changed color are detected and are given
higher sampling priority (become whiter).
Sample Images
Point invalidation example. The mirrors on the far wall are
updating because we have just disabled mirror reflections.
Point invalidation example. The point density on the mirror
is reduced (shown by blue color) because of point invalidation due the shading
change on the mirror.