# Typical Lighting Calculation

Hi group,

I don't really use radiance for architectural lighting calculations since rarely do I run into the situation where I need that kind of control, and more importantly I'm not always 100% comfortable with the results I've generated for anything other than "visualization" purposes. Therefore I was hoping to get some feedback from some of you and just have everything one would need to run a "typical" calc in one post. Then print it, frame it, and stick it on the wall!

Now, the calculations I do usually follow the same process: make a model, define your light sources, make a calculation grid, run the calc, present the results. In radiance this is how I would accomplish this. Anyone see any mistakes? It would be very easy to mess up the units since there are no apparent built in safeguards against this.

Let's look at calculating illuminance in SI first and then feet.

First we make a model in meters.

ies2rad *dm *m .85 iesfile.ies (I'm assuming a .85 Light Loss Factor. We are using *dm to match our model in meters. )

We might as well add the sky at this point too.
Gensky \$month \$day \$hour \$lat \$long \$stdmer > sky (No need for units to be defined? Same sky for SI Vs SU units?)

Then we make our calculation point grid. I would usually do a file (say input.inp) with six numbers per point (XYZ coordinate + aiming vector).

Next would be the calculation. This is a three part deal.
Â Â 1.- rpict options octree > luminance.pic (The units displayed in this image would be nits. cd/m^2)
Â Â 2.- rpict *i options octree > lux.pix (The units displayed would be lux. lm/m^2)
Â Â 3.- rtrace *i options < input.inp | rcalc -e '\$1=47.4*\$1+120*\$2+11.6*\$3' > output.out
(Now, that rcalc part is a bit spooky since it can be written more than one way. We've got \$1 \$2 & \$3 x the Vlamda curve x 179 lm/watt and then added together?. This converts watts to lumens and the results get placed in my output.out file.)

At this point it would be really awesome to be able to see where the calculation grid points are in relation to the space! I suppose a simple xform file placing spheres (or maybe a cone to help define direction?) in the space using the coordinates from input.inp would do the trick. Or better yet, xforming the disks to an empty scene and then using pcompos to combine the images together would probably be better since you could re-use the images you have already created and save time. Unfortunately the numerical results themselves are not visible. Anyone have any ideas how to display numerical calculation results on an image?

Next would come the falsecolor image creation.
falsecolor *i lux.pic -l lux > falsecolor.pic (Now, the *l thing worries me as well since one could botch things up pretty bad and not even realize it.)

Within reason that would be a basic SI unit calc from start to finish. Now, for feet.

We make a model in feet.

Then we bring our same ies files into radiance using the following command
ies2rad *df *m .85 iesfile.ies (We are using *df to match our model in feet.)

Gensky \$month \$day \$hour \$lat \$long \$stdmer > sky (No need for units to be defined? Same sky for SI Vs SU units?)

Then we make our calculation grid.

Next would be the calculations. * Not too sure about these...
Â Â 1.- rpict options octree > luminance.pic (The units displayed in this image would be footlamberts? cd/ft^2)
Â Â 2.- rpict *i options octree > footcandles.pic (The units displayed would be footcandles. lm/ft^2)
Â Â 3.- rtrace *i options < input.inp | rcalc -e '\$1=47.4*\$1+120*\$2+11.6*\$3' > output.out
Â Â (The numbers in the output file would be footcandles?)

Next would come the falsecolor image creation.
falsecolor *i footcandle.pic -l fc > falsecolor.pic

How does all that look?

Mark