March sometime: Phase 8
Ok, so you may be wondering, exactly HOW would one go about setting up
a Radiance scene to use these Lightprobe images... which are freely available
on his site, and don't even seem to be THAT difficult to make (though I've
not tried). Well here you go:
First you'll need a mapping function to get the images on the 2D Lightprobe
image to a point in 3D Space in the Radience Scene:
This was the hardest part for me to come by, I originally started
out with the globe.cal file that was in the Radiance package and basically took
a 2D Globe pict and posted it on a sphere... but this didn't work for the long run.
Here's what finally did:
EQUATION 1: For any given Dx,Dy,Dz the corresponding (u,v) in the lightprobe
is given by (Dx*r,Dy*r), where r=(1/PI)*acos(Dz)/Sqrt(Dx^2+Dy^2)...
Ok so you need a little more than that, I'd guess, so here's an example which
shows the mapping and the Material Setup (which is a 'source' with glow parameter):
If you set your vp = 0,0,0 vd=0,0,1 and vu=0,1,0.. and -ab [1+] (or IND=[1+])
FILE: angmap.cal
sb_u = 0.5 + Dx * r;
sb_v = 0.5 + Dy * r;
r = 0.159154943*acos(Dz)/Sqrt(Dx*Dx + Dy*Dy);
FILE: example.rad
void colorpict distant_scene
7 red green blue kitchen_probe.hdr angmap.cal sb_u sb_v
0
0
distant_scene glow sky_mat
0
0
4 1 1 1 0
sky_mat source sky
0
0
4 0 1 0 360
Then simply render the image and view:
$ oconv example.rad > example.oct
$
$ rview -vp 0 0 0 -vd 0 0 1 -vu 0 1 0 example.oct
and away you go!