Computing irradiances for glow materials

Dear Radiance list,

I have a problem with using glow for backprojecting an image onto the geometry of the scene. I have compiled a small .html page with some images to support my question:

http://www.cvmt.dk/~cbm/tmp/radianceglowproblem/glowproblem.html

In short: I have acquired an image of a scene for which I also have a 3D model. The camera is calibrated to the scene, and therefore I am able to backproject the image pixels onto the geometry. Now I want to use the rpict -i option to compute the irradiances in the scene, where the backprojected image should be the only illumination in the scene. I.e., the backprojected image should be treated as emitted radiance from diffusely emitting surfaces, and I want to render the irradiance received at all locations in the scene. But when I do that, the only thing which shows up in the render are the glow materials, not the irradiances.

I am hoping my will be clear if someone finds time to look at the images on the above link.

Best,
Claus

Morning.

My comments are below to keep the context of the question.

http://www.cvmt.dk/~cbm/tmp/radianceglowproblem/glowproblem.html

As a side note: You can get rid of light sources with the "-dv" switch
of rpict. However, sky domes are usually made out of the "glow"
primitive which is treated differently than a proper "source".

In any case, to eliminate the sky dome in your second image just set a
"-va" clipping plane just behind your geometry.

In short: I have acquired an image of a scene for which I also have a 3D
model. The camera is calibrated to the scene, and therefore I am able to
backproject the image pixels onto the geometry. Now I want to use the rpict
–i option to compute the irradiances in the scene, where the backprojected
image should be the only illumination in the scene. I.e., the backprojected
image should be treated as emitted radiance from diffusely emitting
surfaces, and I want to render the irradiance received at all locations in
the scene. But when I do that, the only thing which shows up in the render
are the glow materials, not the irradiances.

If I understand correctly, you want to use the projected texture as
HDR light source. Your problem now is that you can not show irridiance
values because your scene is made up of glow materials for which rpict
does not show irridiance values (that's why it's called "glow").

One idea would be to split the texture image in two or more parts and
define only the surfaces covered by a partial image as glow. The rest
is an ordinary plastic material which will show irridiance values. You
then create separate images and add up all the irridiance values to
create the final image. You probably have to use "-dv" as well to keep
the glow surfaces out of the partial image (although I don't really
know if that affects "glow").

When you split the image you have to check which surfaces can
illuminate others. For example the roof can illuminate the chimney but
not the walls. This also shows a problem of your method of projecting
the image from a single camera view point: The lantern on top of the
building is partially hidden by the chimney so it's texture will not
cover the full geometry. However, the roof could receive light from
the whole structure but because there is no texture there the hidden
part will not contribute to the irridiance on the roof. Of course
that's only a problem if you only do have a single camera view point.

Another more complex solution to your problem would be the following:

1) You create the view point and direction of each image pixel with vwrays.
2) Along each ray you check for an intersection with the geometry.
3) At the intersection point you calculate the irridiance value with
"rtrace -I" using the intersection point and surface normal as origin
and direction. The calculated value gives you the RGB values for this
pixel.
4) You compile a new image pixel by pixel out of individual irridiance values.

Although that sounds complicated it is possible to do this in Radiance
with a single (long) command line. You can find an introduction to the
various tools and their command options here:

Happy reading,
Thomas

···

2010/8/4 Claus Brøndgaard Madsen <cbm@create.aau.dk>:

Just an idea... if you assume all materials to be lambertian, you just need the reflectance of any visible surface to be able to calculate the irradiance it receives...?

Cheers, Lars.

Hi Thomas,

Thanks for your swift reply ... sorry I couldn't reply yesterday.

You're right, the "-dv" option does not disable direct view of glow materials. The far clip plane tip is great, though. Thanks.

You understood my question perfectly. Yes, I wish to use the image as an HDR light source. Your idea of carving the process into separate steps is viable, but messy and cannot really be automated.

I think I'm gonna go with the excellent idea of computing the irradiance on a per-pixel basis ... I have looked at your stencil "tutorial" and think I can re-create something that would suit my purpose. Allow me to return to you if I run into severe problems, though :slight_smile:

Best
Claus

···

-----Original Message-----
From: radiance-general-bounces@radiance-online.org [mailto:radiance-general-bounces@radiance-online.org] On Behalf Of Thomas Bleicher
Sent: 4. august 2010 11:40
To: Radiance general discussion
Subject: Re: [Radiance-general] Computing irradiances for glow materials

Morning.

My comments are below to keep the context of the question.

2010/8/4 Claus Brøndgaard Madsen <cbm@create.aau.dk>:

http://www.cvmt.dk/~cbm/tmp/radianceglowproblem/glowproblem.html

As a side note: You can get rid of light sources with the "-dv" switch
of rpict. However, sky domes are usually made out of the "glow"
primitive which is treated differently than a proper "source".

In any case, to eliminate the sky dome in your second image just set a
"-va" clipping plane just behind your geometry.

In short: I have acquired an image of a scene for which I also have a 3D
model. The camera is calibrated to the scene, and therefore I am able to
backproject the image pixels onto the geometry. Now I want to use the rpict
-i option to compute the irradiances in the scene, where the backprojected
image should be the only illumination in the scene. I.e., the backprojected
image should be treated as emitted radiance from diffusely emitting
surfaces, and I want to render the irradiance received at all locations in
the scene. But when I do that, the only thing which shows up in the render
are the glow materials, not the irradiances.

If I understand correctly, you want to use the projected texture as
HDR light source. Your problem now is that you can not show irridiance
values because your scene is made up of glow materials for which rpict
does not show irridiance values (that's why it's called "glow").

One idea would be to split the texture image in two or more parts and
define only the surfaces covered by a partial image as glow. The rest
is an ordinary plastic material which will show irridiance values. You
then create separate images and add up all the irridiance values to
create the final image. You probably have to use "-dv" as well to keep
the glow surfaces out of the partial image (although I don't really
know if that affects "glow").

When you split the image you have to check which surfaces can
illuminate others. For example the roof can illuminate the chimney but
not the walls. This also shows a problem of your method of projecting
the image from a single camera view point: The lantern on top of the
building is partially hidden by the chimney so it's texture will not
cover the full geometry. However, the roof could receive light from
the whole structure but because there is no texture there the hidden
part will not contribute to the irridiance on the roof. Of course
that's only a problem if you only do have a single camera view point.

Another more complex solution to your problem would be the following:

1) You create the view point and direction of each image pixel with vwrays.
2) Along each ray you check for an intersection with the geometry.
3) At the intersection point you calculate the irridiance value with
"rtrace -I" using the intersection point and surface normal as origin
and direction. The calculated value gives you the RGB values for this
pixel.
4) You compile a new image pixel by pixel out of individual irridiance values.

Although that sounds complicated it is possible to do this in Radiance
with a single (long) command line. You can find an introduction to the
various tools and their command options here:

Happy reading,
Thomas

_______________________________________________
Radiance-general mailing list
Radiance-general@radiance-online.org
http://www.radiance-online.org/mailman/listinfo/radiance-general

No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.851 / Virus Database: 271.1.1/3049 - Release Date: 08/03/10 16:22:00

Hi Lars,

I'm sorry. I don't understand what you mean by this. I am assuming that all materials are diffuse, but, as Thomas said, I wish to treat the image as a emitted radiance in an image-based illumination scheme, and I wish to compute the irradiance for every point in the scene under the condition that the backprojected HDR image is the only energy in the scene.

Best,
Claus

···

-----Original Message-----
From: radiance-general-bounces@radiance-online.org [mailto:radiance-general-bounces@radiance-online.org] On Behalf Of Lars O. Grobe
Sent: 4. august 2010 21:47
To: Radiance general discussion
Subject: Re: [Radiance-general] Computing irradiances for glow materials

Just an idea... if you assume all materials to be lambertian, you just need the reflectance of any visible surface to be able to calculate the irradiance it receives...?

Cheers, Lars.

No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.851 / Virus Database: 271.1.1/3050 - Release Date: 08/04/10 06:45:00

I think Lars is saying you can calculate irradiance based only on the radiance values of your back-projected image, without any ray-tracing. Important to note that this - and most of this discussion - assumes your back-projected image is captured in a calibrated way such as what Photosphere/hdrgen can do (there's a separate forum for HDR images if you're unsure).

Radiance = Irradiance * Reflectance / Pi

···

Just an idea... if you assume all materials to be lambertian, you just need the reflectance of any visible surface to be able to calculate the irradiance it receives...?

____________________________________________________________
Electronic mail messages entering and leaving Arup business
systems are scanned for acceptability of content and viruses

Hi!

Radiance = Irradiance * Reflectance / Pi

That was the idea, yes, assuming that the ultimate goal is to get irradiance.

As Christopher mentioned, using some raw exposure will probably not allow you to get any approximation of pixel Radiance. You can try multiple exposures to widen the dynamic range, but in any case you need calibration. I would recommend spending some time with an integrating sphere to calibrate the response and to validate the results over the dynamic range you expect to cover.

Cheers, Lars.