What is the prefilter?

The render cache works by caching and reusing shading results from frame to frame.  Ideally we would have a one-to-one mapping between shaded points and pixels, in general this will not be the case.  The render cache uses interpolation to fill in gaps where the point data is sparse.  There is an inherent tradeoff in the size of the interpolation filter kernel.  Large filters can fill larger gaps, but produce blurry images.  We choose to use a 3x3 kernel as the standard interpolation filter because it could fill small gaps in the data without introducing too much blurring.  However when the point data is to sparse, this small filter will be unable to fill the gaps.

Thus we introduced a new additional filter called the prefilter which uses a larger 7x7 kernel to fill in gaps that are too large for  the main 3x3 filter.  However because it produces quite blurry results, we only use it where main interpolation filter fails.  Actually we run the larger filter first (hence the name prefilter) and then the main interpolation filter overwrites any pixels where it can with its sharper results.

Instructions

  1. Start the render cache program from the button on the main page.  It will start by showing a simple environment with 7 spheres.
  2. Select "Load Lotus Model" from the Scene menu.
  3. Change the Display mode to "Prefilter Only" to see the blurry image produced by using the 7x7 interpolation filter.  Changing back to "Normal Image" allows the main 3x3 filter to overwrite prefiltered image with its sharper results.  To see why the prefilter is necessary, we need to force a low point density.
  4. Set the "Clear First" and "Freeze Points" checkboxes in the Options panel.  This will prevent the render cache from updating the cache of shaded points which normally would automatically adapt as we changed the camera parameters.
  5. Now zoom-in the cameras field of view by positioning you mouse over the image and holding the plus "+" key.
  6. Once you have zoomed-in enough you'll start the see the image break up as the point density becomes too low for the interpolation filters to handle.  Zoom-out again (with the minus "-" key) until the black gaps are just starting to appear.
  7. Now turn off the prefilter by unchecking  "7x7 Prefilter" in the Options panel.  Notice that the gaps in the image suddenly get much larger.  The smaller 3x3 filter is not nearly as effective at filling in such sparse data.
  8. You can also view the points without any interpolation by selecting the "Raw Points" or "Occupancy" modes from the Display pull-down box.

Sample Images

without prefilter
For this example, we have forced a point density which is too low for the standard 3x3 interpolation filter to be able to fill in the gaps between the points.

with prefilter
The prefilter with its larger 7x7 filter used with the same point density as above, does a much better job at filling in the gaps between shading results.