[Radiance-general] Average illuminance of polygon in scene

Greg Ward gregoryjward at gmail.com
Thu Dec 22 09:54:30 PST 2016


It may also be possible to use rfluxmtx for this task, since it has code for sampling polygons built in.  The basic steps are:

1) Separate your light sources, including electric lights, sun, sky, etc. and combine them in a single file.  (You can use !xform calls and that sort of thing.)

2) Create a separate file for each polygon you want to measure, and put the following line at the top of each:

	#@rfluxmtx h=u

3) Put your scene geometry except for light sources in a single octree:

	oconv -f all scene except sources > scene.oct

4) Run rfluxmtx on each "sender" polygon and sum the output:

	rfluxmtx -V+ [rendering options] poly1.rad sources.rad -i scene.oct | total | rcalc -e '$1=PI*179*(.265*$1+.670*$2+.065*$3)'

Using the -V+ option, this should sum together the irradiance contributions from your light sources for that particular polygon and give you an RGB triplet as the result, which is multiplied by PI and converted to illuminance in the final rcalc command. I haven't tried it, but I believe it should work.  If you want to know the individual source contributions to illuminance for a given polygon, just remove "total" from the command chain.

The final command needs to be repeated for each surface, unfortunately, so it's not the most efficient method in the world.  There's no irradiance cache with rfluxmtx.

Cheers,
-Greg

> From: Giulio Antonutto <geotrupes at me.com>
> Date: December 22, 2016 12:33:37 AM PST
> 
> Is this to calculate the average exitance of the scene?
> 
> you can read the polygon geometry and average the coordinates, then use the normal to offset a point.
> some math required but not impossible.
> Alternatively with UV maps and the script I have donated in the London Radiance workshop
> G.
> 
> 
>> On 22 Dec 2016, at 06:29, Terrance McMinn <t.mcminn at ocpms.com.au> wrote:
>> 
>> I have a need to be able to calculate the average illuminance of specific polygons in a scene via a script.
>> 
>> Does any one have suggestions as to how to go about this process? The procedure will end up inside a larger script which will be used to list the average illuminance of specified polygons in the scene.
>> 
>> -- 
>> Regards
>> Terrance McMinn
>> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.radiance-online.org/pipermail/radiance-general/attachments/20161222/8a79ac91/attachment.html>


More information about the Radiance-general mailing list