The average radiance across a particular field of view

Hi Parisa,

Integrating irradiance over a surface is a bit challenging, and something I’ve never attempted in Radiance. If your surface is already a triangle or quad mesh, and the mesh elements are small, you could compute the irradiance at each centroid by passing the average vertex and surface normal to rtrace -I+, then multiply each by the element surface area, adding up all the results. Otherwise, you would have to device your own subdivision of the surface over which you wish to integrate.

There is nothing built into Radiance that does this for you.

Cheers,
-Greg

1 Like

Hi,

if you want so sample one or more coplanar surface and you know the orientation, you can get a set of random locations on the surface from

genklemsamp -c 10 -vp 0 0 1 -vd 0 0 -1 -vu 0 1 0 plane.rad | awk '{print $1,$2,$3}' | sort | uniq

This is not very efficient, but does the job for such simple cases. -c <n> sets the number of random locations on plane.rad. The view definition works for a horizontal surface. If you are interested in a group of surfaces that is not exactly co-planar, you may offset the coordinates returned by above hack and calculate the view directions for an intermediate rtrace -on by reversing the offset, providing the local surface normals. Running ’ rtrace -i’ (…) would than calculate the local radiances at the random samples, that you can average.

Another way to get the average irradiance on a surface is to compute an “irradiance-image” of it (e.g. using rpict -i), masking everything but the one surface you are interested in. You can then multiply the surface area with the average to get the integral.

All this should work for simple cases. For complicated geometries, it may be worth to generate a subdivision to produce sufficiently dense sample points, export the normals at each face, and invert them to produce the view points and directions for rtrace. Doing that in a modelling software such as Blender also gives you direct visual feed-back.

Best, Lars.

1 Like

Hi,

Thank you so much for the information, Lars.

Can I integrate any of these methods with rsensor? Basically, I need to integrate the RGB values that I get from the ‘rsensor’ program, and in this case, the area that I need to integrate over would be a spherical cap.