Height of working plane

Hi all,
Don’t know if this needed a new topic as I touched this section of the cookbook in an old post concerning a different issue https://discourse.radiance-online.org/t/illuminance-values-contour-lines-on-a-working-plane/5167?u=danka
However, this is the procedure used:

$ vwrays -x 400 -y 400 -vf horizontal.vf
| rcalc -e '$1=$1;$2=$2;$3=.4;$4=$4;$5=$5;$6=1
| rtrace -fac -w -I -ov vwrays -d -vf outside.vf \ -x 400 -y 400 room.oct > wp_illu.hdr

I am not sure how in the Radiance cookbook the working plane is decided. Is the z coordinate of the camera (vp) the sets the height of the working plane, right? So vwrays would calculate all the values concerning the virtual horizontal plane that includes the vp. Would this be correct?

The working plane height is hard-coded to 0.4 units in this example: $3=.4

It has nothing to do with the camera view point.

Ok, not easy for me to spot it. So what the entire line

rcalc -e '$1=$1;$2=$2;$3=.4;$4=$4;$5=$5;$6=1

would mean?

The first passage is this:

$ vwrays -x 400 -y 400 -vf horizontal.vf |head -3
5.1920e+00 6.1920e+00 2.000e+00 0.000e+00 0.000e+00 -1.000e+00
5.1920e+00 6.1760e+00 2.000e+00 0.000e+00 0.000e+00 -1.000e+00
5.1920e+00 6.1600e+00 2.000e+00 0.000e+00 0.000e+00 -1.000e+00

So it creates vectors for each pixel, at this stage $3=2 as the z coordinate of vp. This is what suggested me that the value came from there.
But then it say:

You will notice that the direction of those rays is in -z (down towards the floor) which is
no good if what we are after is the horizontal illuminance (in +z). Nothing that rcalc
couldn’t fix.
$ vwrays -x 400 -y 400 -vf horizontal.vf
|rcalc -e ’$1=$1;$2=$2;$3=.4;$4=$4;$5=$5;$6=1 |head -3
5.19201 6.192 0.4 0 0 1
5.19201 6.176 0.4 0 0 1
5.19201 6.16 0.4 0 0 1

But apparently it’s not only fixing the z thing, but also replacing 2 with 0.4. Am I missing something?

You didn’t include the horizontal.vf file, but it sounds like a parallel plan view (-vtl) with center, width and height designed to cover the workplane. The view rays for a plan view are typically directed downwards, which is why rcalc is used to replace the Z-direction with 1, to face the lux sensors upwards, instead. Also, the workplane height is used to replace the origin height for the plan view, which is 2 (meters?) in this case, a sensible height if you want a plan view of the space.

So, though I am not well-familiar with Axel’s cookbook, this seems a clever and friendly way to correlate a plan view with a set of workplane sensors that cover that view. There are other ways to do it of course, as there are almost always in Radiance, but this seems quite sensible.

Sorry, this is the horizontal file:

$ cat horizontal.vf
rvu -vtl -vp 2.5 3 2 -vd 0 0 -1 -vu 1 0 0 -vh 5 -vv 4 -vo 0 -va 0 -vs 0 -vl 0

That was clear thank you Greg and Axel.