Me again. I have a couple of test scenes I'm
experimenting with, and I'd now like to use rtrace et. al.
to automate the extraction of illuminance levels to a file.
Rob Guglielmetti wrote:
Me again.
YOU again? :^)
I tried something like:
rtrace -h -I 60 60 30 0 0 1 scene.octI thought this would give me the irradiance at a point 60"
over(+x), 60" up (+y), and 30" off the floor (+z), whth the
"light meter" facing up along the z axis. But this gave me
an error at the command line. WHat is the proper syntax?
the position and orientation vectors are grabbed from standard input.
For example, grabbing them from a file would require:
rtrace -h -I scene.oct < scene.pos
For your single measurement you'd use:
echo 60 60 30 0 0 1 | rtrace -h -I scene.oct
Ain't UNIX fun? :^)
--Roland
···
--
"Life is too short for core dumps"
Hi Rob,
Do you have rillum? if you have rillum, it makes this process somewhat easier.
1. create an input file with a pile of measuring points and positions, similar to your 60 60 30 0 0 1. cnt and rcalc can help in the creation of this file, but it can also be done in any text editor, or spreadsheet and exported as an ascii file. use one line per measuring point.
2. rillum [rtrace options] octree < infile > outfile
the output file then contains a column of illuminances corresponding to the measuring points and orientations defined in the input file. if you wish, you can then use lam to put the input and output files together in a table.
good luck!
Phil Greenup.
···
At 03:58 pm 22/05/02 -0400, you wrote:
Me again. I have a couple of test scenes I'm
experimenting with, and I'd now like to use rtrace et. al.
to automate the extraction of illuminance levels to a file.>From a Radiance digest:
> As an example of producing illuminance values at regularly
> spaced points on a 4x5 workplane, you might use the
> following command:
>
> % cnt 3 4 | rcalc -e
> '$1=$1+.5;$2=$2+.5;$3=1;$4=0;$5=0;$6=1' \
> > rtrace -h -I [options] octree \
> > rcalc -e '$1=179*(.3*$1+.59*$2+.11*$3)' > outfileCould you decipher this a little bit? I don't see where you
feed it the 4x5 grid. Also, looking at the manpage, it
looks like rtrace with the -I switch takes the input origin &
direction and interprets it as "measurement point and
orientation".I tried something like:
rtrace -h -I 60 60 30 0 0 1 scene.octI thought this would give me the irradiance at a point 60"
over(+x), 60" up (+y), and 30" off the floor (+z), whth the
"light meter" facing up along the z axis. But this gave me
an error at the command line. WHat is the proper syntax?
I was hoping to fill a text file with measurement points
and feed it to rtrace, and use something like your script
above to produce a table of measurement points and
corresponding illuminance values...====================
Rob Guglielmetti <[email protected]>
http://home.earthlink.net/~rpg777
THanks again for the advice. Replies to the replies below:
For your single measurement you'd use:
echo 60 60 30 0 0 1 | rtrace -h -I scene.oct
Ain't UNIX fun? :^)
It's getting more fun all the time, as I move out of the
"complete idiot" category and into the "pathetic novice"
category, unix-wise. Greg's tip about OSX and his pre-
compiled binaries have really helped me get up & running
on a unix-based Radiance learning trip, and this list is
now helping too. I appreciate it.
Do you have rillum? if you have rillum, it makes this
process somewhat easier.1. create an input file with a pile of measuring points and
positions, similar to your 60 60 30 0 0 1. cnt and rcalc
can help in the creation of this file, but it can also be
done in any text editor, or spreadsheet and exported as an
ascii file. use one line per measuring point. 2. rillum
[rtrace options] octree < infile > outfile
Well, that sounds like a useful little program. I don't have
this. Where do I get it?? I am using pre-compiled
binaries for OS X, created by Greg Ward. Most of the
other stuff is there, but not glrad or this rillum.
I'd compile the source myself, but I get errors all the time,
both on OSX and Linux. (Yes, I installed Yellow Dog Linux
2.2 on my Powerbook. I couldn't help myself.) And at the
moment I'm far more interested in using Radiance than
administering a unix system, so I guess I'm cheating a bit
by using precompiled binaries. =8-)
the output file then contains a column of illuminances
corresponding to the measuring points and orientations
defined in the input file. if you wish, you can then use
lam to put the input and output files together in a table.
a better example for a grid
of 15 by 30 points spread in a 10x20 room and 2.5 feet
off
the floor with a half foot margin on each side would be:
% cnt 15 30 | rcalc -e
'$1=(10-.5)/(15-1)*$1;$2=(20-.5)/(30-1);$3=2.5' \
-e '$4=0;$5=0;$6=1' | rtrace -I -h [options] octree \
> rcalc -e '$1=179*(.265*$1+.670*$2+.065*$3)' >
output.dat
Thanks Greg. Since I don't have rillum (yet) this works
well. I typed this up in a text file, and did a chmod 755 on
it, so I can call that whole mess with one filename.
(Roland- fun with unix! ;-)) However, my problem now is
that it recorded values of zero! The scene is not dark. I
double checked the inputs. It's still zero. My room is
12'x14', but I'm working in inch units, so my code went
like this:
cnt 15 30 | rcalc -e
$1=(144-6)/(15-1)*$1;$2=(168-6)/(30-1);$3=30' \
-e '$4=0;$5=0;$6=1' | rtrace -I -h [options] octree \
> rcalc -e '$1=179*(.265*$1+.670*$2+.065*$3)' >
output.dat
(note: the first two lines above are on one line in the
command file. Damn emailer.)
This should place a grid of "light meters" facing up, 2'6"
off the floor, right? Why is my scene illuminance reading
zero?? It's a daylit space! When I load a pic into ximage
and pick a point & press return, I get radiance values of
.298, .428, on the floor. Hmmm...
Also, I'm wondering how rtrace gets its information, since
it's working with an octree, not a pic file. I don't
understand how it can compute irradiance so fast unless
it somehow works with a pic file and/or the cached
ambient file. Along those lines, if you want accurate
values for a room, and only have generated a pic of, say,
the north elevation, how accurate are the vertical
illuminance values on the south elevation?
···
On 22 May 2002, at 22:33, Roland Schregle wrote:
On 23 May 2002, at 8:31, Phillip Greenup wrote:
On 22 May 2002, at 14:21, Greg Ward wrote:
====================
Rob Guglielmetti <[email protected]>
http://home.earthlink.net/~rpg777
Some more info:
I just did a falsecolor image of my scene and it too shows
a totally dark room, with a single patch of direct sun. THe
rest of the space is < 1Lux. So, that explains why the
cnt/rcalc/rtrace/rcalc program is returning these zero
values, but I don't understand why the lighting analysis
and the pic files don't seem to agree on things at all. It's
a simple room with a north-facing clerestory and an
opening punched out of the south wall. There is a scene
description with a gensky command and the two
hemispheres for sky/ground glow. Several renderings of
the space show that it is indeed illuminated, and running
it through pcond -h creates a nice looking image. I've
been using the rad program for now, so I think the
parameters are in order, I have ambient=4 detail=high
quality=medium.
So, my photons are leaving the scene between the time I
create the pic files and the time I run the ligting analysis.
Did I create my model over a black hole? Hmmm...
···
====================
Rob Guglielmetti <[email protected]>
http://home.earthlink.net/~rpg777
Rob Guglielmetti wrote:
cnt 15 30 | rcalc -e
$1=(144-6)/(15-1)*$1;$2=(168-6)/(30-1);$3=30' \
-e '$4=0;$5=0;$6=1' | rtrace -I -h [options] octree \
> rcalc -e '$1=179*(.265*$1+.670*$2+.065*$3)' >
output.dat(note: the first two lines above are on one line in the
command file. Damn emailer.)This should place a grid of "light meters" facing up, 2'6"
off the floor, right? Why is my scene illuminance reading
zero?? It's a daylit space! When I load a pic into ximage
and pick a point & press return, I get radiance values of
.298, .428, on the floor. Hmmm...
That's what you get for using those weird nonstandad units...
I suspect that your points are located inside some wall,
since they all have the same y-value of 5.5862069.
You migh want to check the output of the first two stages
of the pipe sequence for a sanity check:
cnt 15 30 | rcalc -e '$1=(144-6)/(15-1)*$1;$2=(168-6)/(30-1);$3=30' \
-e '$4=0;$5=0;$6=1'
(You also had a quote character missing at the start of the first
expression, but that's probably a copying error in the e-mail)
-schorsch
···
--
Georg Mischler -- simulations developer -- schorsch at schorsch.com
+schorsch.com+ -- lighting design tools -- http://www.schorsch.com/
Rob Guglielmetti wrote:
Some more info:
I just did a falsecolor image of my scene and it too shows
a totally dark room, with a single patch of direct sun. THe
rest of the space is < 1Lux.
That's a pretty safe indicator for the -ab 0 syndrome...
-schorsch
···
--
Georg Mischler -- simulations developer -- schorsch at schorsch.com
+schorsch.com+ -- lighting design tools -- http://www.schorsch.com/
Also, I'm wondering how rtrace gets its information, since
it's working with an octree, not a pic file. I don't
understand how it can compute irradiance so fast unless it
somehow works with a pic file and/or the cached ambient
file. Along those lines, if you want accurate values for a
room, and only have generated a pic of, say, the north
elevation, how accurate are the vertical illuminance values
> Some more info:
>
> I just did a falsecolor image of my scene and it too
shows
> a totally dark room, with a single patch of direct sun.
> The rest of the space is < 1Lux.
To which Schorsch replied:
That's a pretty safe indicator for the -ab 0 syndrome...
Which I suppose is one way of saying RTFM. Sorry gang.
Now I see that rtrace needs to be told what to do just
like rpict, in terms of the myriad switches. Sigh. I guess
coming from the Lightscape/radiosity world I still can't
shake the idea that once you wait a while for a calc, all
the data is there for the asking.
Is there a way to somehow tell rad to do some rtrace
stuff and have rad control the options based on a .rif file,
in the manner that rad controls rpict?
···
On 23 May 2002, at 11:35, I wrote:
on the south elevation? And then later I wrote:
====================
Rob Guglielmetti <[email protected]>
http://home.earthlink.net/~rpg777
> That's a pretty safe indicator for the -ab 0 syndrome...
Which I suppose is one way of saying RTFM. Sorry gang.
Now I see that rtrace needs to be told what to do just
like rpict, in terms of the myriad switches. Sigh. I guess
coming from the Lightscape/radiosity world I still can't
shake the idea that once you wait a while for a calc, all
the data is there for the asking.
I really hate this damned machine,
I wish that I could sell it.
It never does quite what I want,
But only what I tell it.
Ok, I admit that the default parameters of the various Radiance
programs are not designed to give you a first "nice looking"
result without any tweaking. Which is probably a healthy fact
to get bumped against right before the first illusions of
perfection can kick in...
Is there a way to somehow tell rad to do some rtrace
stuff and have rad control the options based on a .rif file,
in the manner that rad controls rpict?
You can run a "rad -n" on the rif, and copy the relevant parts of
the output to a file. Then use the @<file> parameter with rtrace.
In fact, it often is a good idea to run a small picture before the
rtrace, to more thoroughly initialize the ambient file. The few
dozen initial rays from your grid may not cause the altorithm to
look at all corners of your space in sufficient density, which can
result in somewhat erratic or even lopsided output values.
-schorsch
···
--
Georg Mischler -- simulations developer -- schorsch at schorsch.com
+schorsch.com+ -- lighting design tools -- http://www.schorsch.com/
Georg Mischler wrote:
I really hate this damned machine,
I wish that I could sell it.
It never does quite what I want,
But only what I tell it.
Get an SGI... :^)
···
--
"Life is too short for core dumps"
Hi Rob,
rillum is available with Adeline, Desktop Radiance and Rayfront. Perhaps it's not a unix thing.
as Georg has said, all your y values are the same possibly placing your measuring point in the wall somewhere. try adding a '*$2' into your y definition, as below.
cnt 15 30 | rcalc -e
'$1=(144-6)/(15-1)*$1;$2=(168-6)/(30-1)*$2;$3=30' \
-e '$4=0;$5=0;$6=1' | rtrace -I -h [options] octree \
> rcalc -e '$1=179*(.265*$1+.670*$2+.065*$3)' >
output.dat
good luck!
Phil Greenup.
···
On 23 May 2002, at 8:31, Phillip Greenup wrote:
> Do you have rillum? if you have rillum, it makes this
> process somewhat easier.
>
> 1. create an input file with a pile of measuring points and
> positions, similar to your 60 60 30 0 0 1. cnt and rcalc
> can help in the creation of this file, but it can also be
> done in any text editor, or spreadsheet and exported as an
> ascii file. use one line per measuring point. 2. rillum
> [rtrace options] octree < infile > outfileWell, that sounds like a useful little program. I don't have
this. Where do I get it?? I am using pre-compiled
binaries for OS X, created by Greg Ward. Most of the
other stuff is there, but not glrad or this rillum.On 22 May 2002, at 14:21, Greg Ward wrote:
> a better example for a grid
> of 15 by 30 points spread in a 10x20 room and 2.5 feet
off
> the floor with a half foot margin on each side would be:
>
> % cnt 15 30 | rcalc -e
> '$1=(10-.5)/(15-1)*$1;$2=(20-.5)/(30-1);$3=2.5' \
> -e '$4=0;$5=0;$6=1' | rtrace -I -h [options] octree \
> > rcalc -e '$1=179*(.265*$1+.670*$2+.065*$3)' >
output.datThanks Greg. Since I don't have rillum (yet) this works
well. I typed this up in a text file, and did a chmod 755 on
it, so I can call that whole mess with one filename.
(Roland- fun with unix! ;-)) However, my problem now is
that it recorded values of zero! The scene is not dark. I
double checked the inputs. It's still zero. My room is
12'x14', but I'm working in inch units, so my code went
like this:cnt 15 30 | rcalc -e
$1=(144-6)/(15-1)*$1;$2=(168-6)/(30-1);$3=30' \
-e '$4=0;$5=0;$6=1' | rtrace -I -h [options] octree \
> rcalc -e '$1=179*(.265*$1+.670*$2+.065*$3)' >
output.dat(note: the first two lines above are on one line in the
command file. Damn emailer.)This should place a grid of "light meters" facing up, 2'6"
off the floor, right? Why is my scene illuminance reading
zero?? It's a daylit space! When I load a pic into ximage
and pick a point & press return, I get radiance values of
.298, .428, on the floor. Hmmm...
Phillip Greenup wrote:
Hi Rob,
rillum is available with Adeline, Desktop Radiance and Rayfront. Perhaps
it's not a unix thing.
Interesting, I wasn't even aware of that...
Rillum came with the Radiance for Windows sources, so I just
included it without having another look. I am not licensed to
distribute the source, but on a unix system, a shell script
doing the same thing would look like this:
#!/bin/sh
rtrace -I+ -dv- -h- -x 1 $* | rcalc -e '$1=47.1*$1+117.2*$2+14.7*$3'
You call this with all the rtrace parameters you like, followed
by the octree, and it will read the points and vectors from
stdin, spitting out illuminance values at the other end.
Basically rillum is part of what we have already seen written out
few times now, just implemented in C because there's no decent
shell on Windows...
-schorsch
···
--
Georg Mischler -- simulations developer -- schorsch at schorsch.com
+schorsch.com+ -- lighting design tools -- http://www.schorsch.com/
Hi Guys,
I am continually impressed by the quality of support this group offers! They even caught the little mistake I included in my example, which Rob so dutifully copied, where I forgot the second index variable:
as Georg has said, all your y values are the same possibly placing your
measuring point in the wall somewhere. try adding a '*$2' into your y
definition, as below.cnt 15 30 | rcalc -e
'$1=(144-6)/(15-1)*$1;$2=(168-6)/(30-1)*$2;$3=30' \
-e '$4=0;$5=0;$6=1' | rtrace -I -h [options] octree \
> rcalc -e '$1=179*(.265*$1+.670*$2+.065*$3)' >
output.datgood luck!
Phil Greenup.
The only thing we all missed is that the rillum script does exist in the Unix distribution -- it's just called "rlux". It wasn't until schorsch pointed out the contents that I recognized it. I thought rillum might do something more than this. Anyway, there is also a program called "dayfact" which can generate false color images of the workplane illuminance (as well as daylight factor contours), and that might be useful in this situation. It's also interactive, which means a little less command-line coding for the "pathetic novice."
Regarding calculation options, you can use rad directly to do what schorsch was suggesting with cut and paste:
rad scene\.rif OPTFILE=render\.opt ... | rtrace @render.opt [other options] octree | ...
If you like, you can put the OPTFILE definition right in your scene.rif file, then you'll always have this file handy when you need it. Rad is careful only to put options that are understood by all the renderers into this file, rtrace, rpict, and rview.
-Greg
The only thing we all missed is that the rillum script does exist in the
Unix distribution -- it's just called "rlux". It wasn't until schorsch
pointed out the contents that I recognized it. I thought rillum might
do something more than this.
Beware! In fact rlux is not exactly similar to rillum since it calls rtrace
with option -i+ instead of -I
rlux is supposed to be used in conjunction with ximage to compute
irradiance at locations in the scene selected from an already exsiting
picture like this:
ximage picture.pic | rlux (rtrace options) octreefile
where octreefile is the same that served for producing the picture