Hi Ruggiero,
As given, your command:
rcontrib -c 105 -I+ -f tregenza.cal -m skyglow -m groundglow test.oct <
samps.txt > daycoef.mtx
does average 105 irradiance positions, taken them in sequence from
samps.txt. I assume this contains exactly 105 random sample positions &
directions.
The output will not be Tregenza sky patches, because you are missing some
needed options. If you want your ground average to precede your 145
Tregenza patches in your matrix, then use the following order:
rcontrib -c 105 -y 1 -I+ -f tregenza.cal -m groundglow -b tbin -bn 145 -m
skyglow test.oct < samps.txt > daycoef.mtx
The above process can in fact be simplified by merging your ground.rad and
sky.rad files with some comments like so:
<combined_sky.rad>
# Combined ground and sky vault for calculating cylindrical irradiance
# Start by telling rfluxmtx to generate a single coefficient for the
ground:
#@rfluxmtx h=u
void glow groundglow
0 0 4 .8 1.1 .8 0
groundglow source ground
0 0 4 0 0 -1 180
# Now, tell rfluxmtx to generate a set of Tregenza sky patches using Y for
"north/up":
#@rfluxmtx h=t u=+Y
void glow sky_glow
0 0 4 1 1 1 0
sky_glow source sky
0 0 4 0 0 1 180
------------------
Notice how I took out the actual sky distribution, which you don't need
for a coefficient calculation. (It would make no difference to the results
in fact.)
Then, you can then use rfluxmtx to call oconv and rcontrib for you:
rfluxmtx -c 105 -y 1 - combined_sky.rad < samps.txt > daycoef.mtx
Note that the lone hyphen ("-") tells rfluxmtx to read from its standard
input, and must be given as shown above. Assuming you have just 105
positions in samps.txt, I've specified -y 1, so that the output matrix has
both its dimensions set properly.
Once you have the above matrix, you can multiply it against any sky vector
to get the desired cylindrical irradiance:
gendaylit [options] | genskyvec | dctimestep daycoef.mtx
The above command should produce a single RGB triplet corresponding to the
cylindrical irradiance with the given sky.
Cheers,
-Greg
*From: *Ruggiero Guida <ruggiero.guida@gmail.com>
*Subject: *Re: [Radiance-general] Irradiation on standing subject with
Radiance
*Date: *March 3, 2016 12:35:35 AM PST
Hi Greg,
I finally managed to have a look at this problem again.
To begin with I was starting with a basic case: just sky and ground.
<sky.rad>
void light solar
0 0 3 5.326e+06 5.326e+06 5.326e+06
solar source sun
0 0 4 0.463565 0.022184 0.885785 0.533000
void brightfunc skyfunc
2 skybright perezlum.cal
0 10 5.802e+01 4.447e+01 -0.843574 -1.078181 11.876231 -3.091220 0.271617
0.463565 0.022184 0.885785
skyfunc glow sky_glow
0 0 4 1 1 1 0
sky_glow source sky
0 0 4 0 0 1 180
<ground.rad>
skyfunc glow groundglow
0 0 4 .8 1.1 .8 0
groundglow source ground
0 0 4 0 0 -1 180
I then generate the scene with
oconv materials.rad sky.rad ground.rad > test.oct
Let's suppose I want to calculate the contributions on the subject from a
tregenza subdivision I would use
rcontrib -c 105 -I+ -f tregenza.cal -m skyglow -m groundglow test.oct <
samps.txt > daycoef.mtx
This is my understanding of this command.
1 - For each of the 105 random points
2 - create a tregenza dome subdivision
3 - calculate all the contributions from groundglow and skyglow and add
them up (this considers the cosine between the normal of the point and the
patch vector)
4 - finally average all the results for the 105 points.
Does this make any sense? How would I obtain the actual matrix?
Thanks
Ruggiero
_______________________________________________
Radiance-general mailing list
Radiance-general@radiance-online.org
http://www.radiance-online.org/mailman/listinfo/radiance-general