[Radiance-general] Attempt to illuminate Paul Debevec's rnl_scene.rad with a hemispherical HDR image of the sky

Claus Brøndgaard Madsen cbm at create.aau.dk
Sun Oct 14 12:23:25 PDT 2012



Hi Kyle,

Solving your problem is easy and not so easy.

There will be some overlap between this response and my response To your other post, but for completeness...

The easiest solution would be to re-map your hemispherical sky image to angular mapping that Debevec always prefers. I, myself, prefer the lat-long mapping, so I have written my own mapping .cal file. Writing such a .Cal is easy but you have to know what you are doing and there can be some debugging (trial and error) involved. 

In order to remap you sky view to an angular mapping it would be simple and easy to use the HDRshop progam (www.hdrshop.com), but there is no longer a free 1.0 version. Versions for academia are not too expensive though. 

Best
Claus




Claus B. Madsen
AD:MT/AAU


On 14/10/2012, at 12.17, "kyle konis" <kskonis at gmail.com> wrote:

> 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
> 
> _______________________________________________
> Radiance-general mailing list
> Radiance-general at radiance-online.org
> http://www.radiance-online.org/mailman/listinfo/radiance-general



More information about the Radiance-general mailing list