angmap.cal Angular map equation for mapping light probe to the environment anim.vf Animation camera path viewfile credits.tif RNL credits card TIF image gensup1.sh Sphere support stand generator script gensup1a.sh Central sphere support stand generator script marble.hdr Texture map for the pedestal optrad RADIANCE options for rendering the animation pflare.c C program for pflare, the HDR image blurring program pflare Intel Linux binary for pflare, the HDR image blurring program rnl_probe.hdr UC Berkeley Eucalyptus Grove light probe image rnl_scene.rad Main scene file for the spheres on the pedestal texmap0.cal Texture map equation for mapping marble.hdr onto pedestal"Rendering with Natural Light" was rendered entirely with Image-Based Lighting captured through High-Dynamic Range Photography in the UC Berkeley Eucalyptus Grove.
rnl_source.tgz gzip'ped tar archive of all these files (2,721,019 bytes)
To render the animation yourself, follow the following procedure:
% ximage rnl_probe.hdr(Note: the "%" signifies the csh shell prompt; don't type it.)
An image display window showing the RNL environment should come up if RADIANCE is working. Hit q in the window when you're done.
% oconv rnl_scene.rad > rnl_scene.oct
% rview -vf anim.vf rnl_scene.oct
After a moment, you should obtain a window with a somewhat dark rendering of the RNL scene (a collection of spheres on stands on a pedestal amongst trees.) When you're done, type q and then return in the window to quit. The file "anim.vf" contains all the camera views for the RNL animation. The interative renderer simply uses the last view in the file.
% rview -vf anim.vf -ab 1 -aa 0 -ad 256 rnl_scene.oct
This sets one ambient bounce with -ab 1, disables irradiance
cacheing with -aa 0, and specified 256 ambient divisions (rays that
fire out looking for light) per pixel. This rendering will take a
while to complete. You can stop it at any time with q
Once you have pflare compiled and on your path, type:
You will see a blurry image of render.hdr; pflare has applied a
Gaussian Blur of 10 pixels diameter. Now try:
This has applied a circular disk blur of 10 pixels; it's a more
realistic out-of-focus effect. Now try:
This applies a box blur; it's very fast but not very
realistic. Now try:
This darkens the corners of the image, which helps communicate the
dynamic range of the since (really bright things will stay bright
despite the darkening, since they were much brighter than white to
begin with.)
For efficiency, we can use -ds to downsample the image and -us
to upsample it. This lets us compute large blurs more quickly, but
requires evenly divisible image dimensions. We can also use the
-ac accumulate feature to add together several different
blurred
versions of the image to form the final rendering. Here's the
process used for the SIGGRAPH animation Rendering with Natural
Light:
Make sure to type this all as one line. This also applies a tone
mapping curve with a soft shoulder beginning at 75% image
brightness. You can accomplish much the same effect with the
hardcoded blur operation "-ha":
% rpict -vf anim.vf @optrad rnl_scene.oct > render.hdr
This will take a while; perhaps 20 minutes on an 800MHz Pentium
III. You will receive output status lines every 30 seconds:
rpict: 14284948 rays, 56.88% after 0.167u 0.000s 0.167r hours on hostname
Upon completion, you will have a HDR image "render.hdr". View it
with:
% ximage render.hdr
% pflare render.hdr -gb 10 > gblur.hdr
% ximage gblur.hdr
% pflare render.hdr -cb 10 > cblur.hdr
% ximage cblur.hdr
% pflare render.hdr -bb 10 > bblur.hdr
% ximage bblur.hdr
% pflare render.hdr -vi 200 400 > vignette.hdr
% ximage vignette.hdr
% pflare render.hdr -ds -ds -ds -gb 12 -us -us -us -ac 0.1 -ds -ds
-ds -gb 40 -us -us -us -ac 0.05 -ds -ds -ds -gb 3 -us -us -us
-ac 0.1 -gb 1 -ac 0.75 | pflare -sh 0.75 -vi 150 400 > rnl.hdr
% ximage rnl.hdr
% pflare render.hdr -ha | pflare -vi 150 400 -sh 0.75 > rnl.hdr
% ximage rnl.hdr
% ra_tiff render.hdr render.tif
% ra_ppm render.hdr render.ppm
% ra_ppm render.hdr | cjpeg -q 90 > render.jpg
These will properly apply a gamma 2.2 curve to the data and then
map the values zero to one to [0,255]. The last command requires
that you've also installed the JPEG library.
% mkdir frames
% rm frames/*.hdr /tmp/ambient.amb
% cat anim.vf | rpict -S 1 @optrad -o frames/rnl_%04d.hdr rnl_scene.oct
The first few hundred frames will render very quickly since the
camera is looking toward the sky and sees none of the objects.
Most of the frames will take considerably longer. Each saved
frame may be as large as a megabyte, so disk space may be an issue.
This command reads in RADIANCE options from the file "optrad", which
specifies an ambient cache file of /tmp/ambient.amb.
% cd frames
% foreach i (*.hdr)
% echo Processing $i...
% pflare $i -ha | pflare -vi 150 400 -sh 0.75 | ra_ppm | cjpeg -q 80 > $i:r.jpg
% end
The actual "Rendering with Natural Light" also included a high dynamic
range fade-in at the beginning and fade-out at the end.