sblur: blurs a spheremap
Copyright (C) Herf Consulting LLC 2000-2001. All rights reserved.


Usage: inputfile.JPG diffusesamples specularsamples shininess

The input is a JPG, and output is a "max quality" JPG.

It needs three values as input.

Diffuse samples: number of samples to use for computing hemispherical
(diffuse) reflection.  Typically use 20 for a preview, 200 for a 
medium-noisy result, and 500-1000 for final-quality.

Specular samples: Used for weighted sampling of specularity.
If your shininess is high, you must use more samples to get rid of noise.  For high specularity (50+) 5000 or more samples is not 
unreasonable.

Shininess: Analogous to Phong shininess (50-100 is shiny).

Tips:

Generally, you can start tweaking material parameters using low
numbers of samples (<200 for each), and then just multiply by
10 for a final render.

Use many more specular samples than diffuse, since they're "weaker" and, as a result, noisier too.  If you wanted, say, equal parts diffuse and specular, you might need 10x as many specular samples.

Weighting of specular vs. diffuse is not predictable (though it will make sense if you don't change shininess), but in general you have to do it visually.


Output:

All files will be written with their parameters in the filename, so you can remember the values.


Examples:

Blur the jpg at low quality (50 diffuse samples), no specular:
> SBlur bryce.jpg 50 0 0

Blur the jpg at medium quality, with specular coefficient 25:
> SBlur bryce.jpg 500 2000 25

