I am planning to use an experiment to validate the luminance map and illuminance calculations of the three-phase method. However, the chamber used for the experiment is surrounded by nearby trees and buildings. To address this, I used a Raspberry Pi to capture HDR images of the surroundings, as shown in the figure below.
However, the challenge lies in converting the image-based sky into sky vectors for use in the three-phase method. Below is the sky definition. I also tried using genskyvec
to generate the sky vectors, but it reported: “Bad sky description!”
void colorpict hdr_probe_image
7 red green blue surroundings2.hdr angmap.cal u v
0
0
void colorpict hdr_probe_image1
7 red green blue surroundings1.hdr angmap1.cal u v
0
0
hdr_probe_image glow light_probe
0
0
4 1 1 1 0
hdr_probe_image1 glow light_probe1
0
0
4 1 1 1 0
light_probe source ibl_environment
0
0
4 0 1 0 180
light_probe1 source ibl_environment
0
0
4 0 -1 0 180
{
angmap.cal
Convert from directions in the world \
(Dx, Dy, Dz) into (u,v) \
coordinates on the light probe \
image
-z is forward (outer edge of sphere)
+z is backward (center of sphere)
+y is up (toward top of sphere)
}
d = sqrt(Dx*Dx + Dz*Dz);
r = if(d, 2*0.159154943*acos(Dy)/d,0);
u = 0.5 + Dx * r;
v = 0.5 + Dz * r;
{
angmap1.cal
Convert from directions in the world \
(Dx, Dy, Dz) into (u,v) \
coordinates on the light probe \
image
-z is forward (outer edge of sphere)
+z is backward (center of sphere)
+y is up (toward top of sphere)
}
d = sqrt(Dx*Dx + Dz*Dz);
r = if(d, 2*0.159154943*acos(-Dy)/d,0);
u = 0.5 + Dx * r;
v = 0.5 + Dz * r;
Best,
Yongqing