[Radiance-general] Attempt to illuminate Paul Debevec's rnl_scene.rad with a hemispherical HDR image of the sky
kyle konis
kskonis at gmail.com
Sun Oct 14 03:13:00 PDT 2012
Dear list,
I am attempting to illuminate Paul Debevec's rnl_scene.rad with a
hemispherical HDR image of a dynamic sky.
After the tutorial in http://www.pauldebevec.com/RNL/Source/
I have succeeded in simply substituting in my image, but because it is
a 180-degree fisheye image (zenith view of sky) rather than a light
probe, i am encountering some issues with the resulting "reality" of
the output image.
I would appreciate suggestions for how to properly map this image data
to a hemisphere (i.e. sky) in radiance to enable the image to serve
properly as a light source.
I have included the relevant code below, and sample images on a
temporary webpage:
https://sites.google.com/site/konisskytemp/
I would appreciate any suggestions!
-Kyle
### Here is the relevant description of the lighting environment ( i
have only changed the image file name to source my 1350 x 1350 px
cropped sky image)
################################################################
#
# Lighting Environment
#
################################################################
# specify the probe image and how it is mapped onto geometry
void colorpict hdr_env
7 red green blue cropped.hdr angmap.cal sb_u sb_v
0
0
# specify a "glow" material that will use this image
hdr_env glow env_glow
0
0
4 1 1 1 0
# specify a large inward-pointing box to be mapped with the HDR environment
!genbox env_glow boxenv 500 500 500 -i | xform -t -250 -18 -250
################################################################
### and here is angmap.cal
################################################################
{
angmap.cal
Convert from directions in the world to coordinates on the angular sphere image
-z is forward (outer edge of sphere)
+z is backward (center of sphere)
+y is up (toward top of sphere)
}
sb_u = 0.5 + DDx * r;
sb_v = 0.5 + DDy * r;
r = 0.159154943*acos(DDz)/sqrt(DDx*DDx + DDy*DDy);
DDy = Py*norm;
DDx = Px*norm;
DDz = Pz*norm;
norm = 1/sqrt(Py*Py + Px*Px + Pz*Pz);
### Any suggestions for solutions would be appreciated
I assume that i need to map the image to a hemisphere (representing
the sky dome) rather than a box
perhaps passing the image as a glow rather than the standard sky glow?
skyfunc glow skyglow
0
0
4 1.000 1.000 1.000 0
skyglow source sky
0
0
4 0 0 1 180
Or to a sphere?
And i assume that i need a different angmap.cal file, given that this
was written to interpret light probe images . . . and not
hemispherical fisheye images
More information about the Radiance-general
mailing list