quick P.S.

The sencond (inline) vwrays is superfluous, so this simplifies it a little bit. Also, feel free to set the resolution to whatever makes sense. I chose 200 arbitrarily, which is probably overkill for most applications. Note that your view can be from anywhere, but the side you see of the polygon is the side you will end up sampling.

  % vwrays -x 200 -y 200 -vf view2poly.vf -fd \
    > rtrace -h -opN -fdd '\!oconv poly.rad' \
    > rcalc -id6 -od -e 's(x):x*x;cond=s($4)+s($5)+s($6)-.5' -e '$1=$1;$2=$2;$3=$3;$4=$4;$5=$5;$6=$6' \

···

rtrace -h -fda -I [render options] scene.oct > irrad_results.dat

Now all I need to do is spend half an hour figuring out what that actually does :stuck_out_tongue:

Greg Ward wrote:

···

The sencond (inline) vwrays is superfluous, so this simplifies it a little bit. Also, feel free to set the resolution to whatever makes sense. I chose 200 arbitrarily, which is probably overkill for most applications. Note that your view can be from anywhere, but the side you see of the polygon is the side you will end up sampling.

    % vwrays -x 200 -y 200 -vf view2poly.vf -fd \
        > rtrace -h -opN -fdd '\!oconv poly.rad' \
        > rcalc -id6 -od -e 's(x):x*x;cond=s($4)+s($5)+s($6)-.5' -e '$1=$1;$2=$2;$3=$3;$4=$4;$5=$5;$6=$6' \
        > rtrace -h -fda -I [render options] scene.oct > irrad_results.dat

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

    % vwrays -x 200 -y 200 -vf view2poly.vf -fd \
        > rtrace -h -opN -fdd '\!oconv poly.rad' \
        > rcalc -id6 -od -e 's(x):x*x;cond=s($4)+s($5)+s($6)-.5' -e '$1=$1;$2=$2;$3=$3;$4=$4;$5=$5;$6=$6' \
        > rtrace -h -fda -I [render options] scene.oct > irrad_results.dat

Ok, I get it now. A few things though:

If we have a complex scene describing a room and a single polygon (say named 'target') in it somewhere, should we instead of using -opN use -os and then use -is -e 'cond=if($1=target, 1, 0)' or something to check that we've hit the particular polygon, as it is likely that every ray will in fact hit something.

The other problem is what if any object is between the view point and the target polygon? Is there any way to trace through those objects?

And also, since we need quite an accurate rating of illuminance, we will need to do some trig to determine the distance between the sample illuminance points in the real world, in order to be able to compute irradiance/m^2 for example. This will depend on the distance of the view point from the target and other things, which is why obstructing objects become a problem.

Many thanks by the way - we had no idea that 'cond' existed. It's just allowed us to remove a heap of code :slight_smile:

Chris

Ok, I get it now. A few things though:

Actually, forget that - I just realised that the irradiance is viewpoint independent, given per m^2, so all we need to do is position a viewpoint such that we get a guaranteed number of samples per m^2, and use a fore clip plane just about the target poly to eliminate obstructions...

Chris

Hi Chris,

The idea with the first rtrace command is to render the polygon by itself. You don't need a fore (or aft) clipping plane simply because there is *nothing* else in the scene to render. (You'll even get a warning about no light sources unless you add a -w option to rtrace, which I forgot.)

-Greg

···

From: Christopher Kings-Lynne <[email protected]>
Date: January 20, 2005 3:40:03 AM PST

Ok, I get it now. A few things though:

Actually, forget that - I just realised that the irradiance is viewpoint independent, given per m^2, so all we need to do is position a viewpoint such that we get a guaranteed number of samples per m^2, and use a fore clip plane just about the target poly to eliminate obstructions...

Chris

The idea with the first rtrace command is to render the polygon by itself. You don't need a fore (or aft) clipping plane simply because there is *nothing* else in the scene to render. (You'll even get a warning about no light sources unless you add a -w option to rtrace, which I forgot.)

...but there's no point rendering it by itself - I need it to take into account windows, walls, doors, etc.

Chris

Yes, hence the second rtrace command.

···

From: Christopher Kings-Lynne <[email protected]>
Date: January 20, 2005 6:52:25 AM PST

The idea with the first rtrace command is to render the polygon by itself. You don't need a fore (or aft) clipping plane simply because there is *nothing* else in the scene to render. (You'll even get a warning about no light sources unless you add a -w option to rtrace, which I forgot.)

...but there's no point rendering it by itself - I need it to take into account windows, walls, doors, etc.

Chris