rlux - compute illuminance from ray origin and direction
rlux [ rtrace args ] octree
The ximage command can output certain information about the pixel under the cursor. This is configurable with the -o command line option. The default setting is -ood, which outputs the ray origin and ray direction. This output can be directly passed to rtrace which, in combination, with the original octree that the image was rendered from, can compute the irradiance at this pixel for the red, green and blue channels.
This is essentially what rlux does, but it additionally converts the RGB irradiance output from rtrace, which is in W/m2/sr, into the corresponding illuminance, given in lux.
To calculate the RGB irradiance for a certain pixel in an HDR picture
|
ximage nice.hdr | rtrace -i+ -dv -h- -ab 3 scene.oct |
Now left-click on a pixel and press the ’t’ key in ximage, or middle-click.
To do the same, but output the illuminance
|
ximage nice.hdr | rtrace -i+ -dv -h- -ab 3 scene.oct | rcalc -e ’$1=47.4*$1+120*$2+11.6*$3’ -u |
To let rlux do all the work. This is equivalent to the previous example.
|
ximage nice.hdr | rlux -ab 3 scene.oct |
ximage(1), rtrace(1), rcalc(1)