can we refer to two sky description files in oconv?

Hi, list,

May I ask if we can merge two skies through one oconv command?

The irradiance value for an unobstructed upward sensor I get from referring
2 sky files in oconv is different from the sum of the two irradiance
values, each of them obtained by referring to just one sky file at a time
...

The problem is described below:

1). I have the following two sky description files:

"sky_12.sky":
# gendaylit 6 22 12 -a 51.15 -o 0.18 -m 0 -W 248.0 427.0 -O 1
# Ground ambient level: 129.0
void light solar
0
0
3 3.649e+06 3.649e+06 3.649e+06
solar source sun
0
0
4 0.009337 -0.464787 0.885373 0.533000
void brightfunc skyfunc
2 skybright perezlum.cal
0
10 6.250e+01 3.978e+01 -0.842096 -1.184194 10.982493 -3.062295 0.268820
0.009337 -0.464787 0.885373
skyfunc glow sky_glow
0
0
4 1 1 1 0
sky_glow source sky
0
0
4 0 0 1 180

"sky_13.sky":
# gendaylit 6 22 13 -a 51.15 -o 0.18 -m 0 -W 250.0 428.0 -O 1
# Ground ambient level: 129.7
void light solar
0
0
3 3.678e+06 3.678e+06 3.678e+06
solar source sun
0
0
4 -0.228410 -0.442326 0.867281 0.533000
void brightfunc skyfunc
2 skybright perezlum.cal
0
10 6.393e+01 3.975e+01 -0.856480 -1.207987 10.711184 -3.050613 0.255098
-0.228410 -0.442326 0.867281
skyfunc glow sky_glow
0
0
4 1 1 1 0
sky_glow source sky
0
0
4 0 0 1 180

2). I run the following shell script and get a irradiance value of *859.8564
(Wh/m^2)*

"autorun.sh":
oconv ./sky_12.sky ./sky_13.sky > ./sky_12_13.oct
echo '0 0 0 0 0 1' | rtrace -w -h -I+ -ab 1 ./sky_12_13.oct | rcalc -e
'$1=$1*0.265+$2*0.670+$3*0.065' > ./results_12_13.txt

Windows version of the script autorun.bat is:
oconv ./sky_12.sky ./sky_13.sky > ./sky_12_13.oct
echo 0 0 0 0 0 1 | rtrace -w -h -I+ -ab 1 ./sky_12_13.oct | rcalc -e
"$1=$1*0.265+$2*0.670+$3*0.065" > ./results_12_13.txt

3). However, if I do the same by using one sky file at a time I get *
640.1146* and *640.1624* (Wh/m^2) for sky_12 and sky_13, respectively, and
they're close to the global horizontal radiance in London's weather file
for 22 Jun 12pm and 13pm. The sum of the these two values, which is
around *1280
(Wh/m^2)*, is not equal to the one mentioned above that is obtained by
using the two sky files together in oconv...

Dose this mean that only one sky description is allowed in oconv? If
that's the case then why the value shown in 2) is not close to either of
the values shown in 3)?

Advises are appreciated!

- Cheers, Ji

I think you get two suns but one sky. Not sure which one of the two. Suspect the one listed last in the octree.
if you want to cumulate sky contributions you need to add images of each sky together and map them back in a new scene with brightfunc and glow.
The process may look something like this:

rpict -w- -x 256 -y 256 -vta -vh 180 -vv 180 -vd 0 0 1 -vu 0 1 0 -ps 1 model1.oct > yoursky1.pic
rpict -w- -x 256 -y 256 -vta -vh 180 -vv 180 -vd 0 0 1 -vu 0 1 0 -ps 1 model2.oct > yoursky2.pic
pcomb yoursky1.pic yoursky2.pic > yoursky.pic

and then back in a new radiance scene, like this

void colorpict dist
11 noop noop noop yoursky.pic fisheye.cal fish_u fish_v -rx 90 -rz 90
0
0
dist glow skyglow
0
0
4 1 1 1 0
skyglow source sky
0
0
4 0 0 1 180

Please check it works and debug as appropriate.
It has been some time I have run this… and I do not recall why rx and ry, but probably has to do with the fisheye.cal.
Not sure.

Nowadays I would suggest using rtcontrib as it does the same and much more...
Good luck,
G

···

On 20 May 2012, at 11:43, Ji Zhang wrote:

Hi, list,

May I ask if we can merge two skies through one oconv command?

The irradiance value for an unobstructed upward sensor I get from referring 2 sky files in oconv is different from the sum of the two irradiance values, each of them obtained by referring to just one sky file at a time ...

The problem is described below:

1). I have the following two sky description files:

"sky_12.sky":
# gendaylit 6 22 12 -a 51.15 -o 0.18 -m 0 -W 248.0 427.0 -O 1
# Ground ambient level: 129.0
void light solar
0
0
3 3.649e+06 3.649e+06 3.649e+06
solar source sun
0
0
4 0.009337 -0.464787 0.885373 0.533000
void brightfunc skyfunc
2 skybright perezlum.cal
0
10 6.250e+01 3.978e+01 -0.842096 -1.184194 10.982493 -3.062295 0.268820 0.009337 -0.464787 0.885373
skyfunc glow sky_glow
0
0
4 1 1 1 0
sky_glow source sky
0
0
4 0 0 1 180

"sky_13.sky":
# gendaylit 6 22 13 -a 51.15 -o 0.18 -m 0 -W 250.0 428.0 -O 1
# Ground ambient level: 129.7
void light solar
0
0
3 3.678e+06 3.678e+06 3.678e+06
solar source sun
0
0
4 -0.228410 -0.442326 0.867281 0.533000
void brightfunc skyfunc
2 skybright perezlum.cal
0
10 6.393e+01 3.975e+01 -0.856480 -1.207987 10.711184 -3.050613 0.255098 -0.228410 -0.442326 0.867281
skyfunc glow sky_glow
0
0
4 1 1 1 0
sky_glow source sky
0
0
4 0 0 1 180

2). I run the following shell script and get a irradiance value of 859.8564 (Wh/m^2)

"autorun.sh":
oconv ./sky_12.sky ./sky_13.sky > ./sky_12_13.oct
echo '0 0 0 0 0 1' | rtrace -w -h -I+ -ab 1 ./sky_12_13.oct | rcalc -e '$1=$1*0.265+$2*0.670+$3*0.065' > ./results_12_13.txt

Windows version of the script autorun.bat is:
oconv ./sky_12.sky ./sky_13.sky > ./sky_12_13.oct
echo 0 0 0 0 0 1 | rtrace -w -h -I+ -ab 1 ./sky_12_13.oct | rcalc -e "$1=$1*0.265+$2*0.670+$3*0.065" > ./results_12_13.txt

3). However, if I do the same by using one sky file at a time I get 640.1146 and 640.1624 (Wh/m^2) for sky_12 and sky_13, respectively, and they're close to the global horizontal radiance in London's weather file for 22 Jun 12pm and 13pm. The sum of the these two values, which is around 1280 (Wh/m^2), is not equal to the one mentioned above that is obtained by using the two sky files together in oconv...

Dose this mean that only one sky description is allowed in oconv? If that's the case then why the value shown in 2) is not close to either of the values shown in 3)?

Advises are appreciated!

- Cheers, Ji

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general