POV-Ray : Newsgroups : povray.general : How to get the light intenity that hits a surface? Server Time
31 Oct 2024 12:14:27 EDT (-0400)
  How to get the light intenity that hits a surface? (Message 1 to 7 of 7)  
From: Grobi
Subject: How to get the light intenity that hits a surface?
Date: 16 Jul 2021 09:05:00
Message: <web.60f1833340bf024dbc2b4e9b2dab7b3@news.povray.org>
Hi,

I would like to mis-use POVRAY (or any other tool) a bit to get to the light
intensity that hits a surface of an object.
The original problem comes from design questions of a photocatalyst, where the
incident photons cause a chemical reaction.
So my thinking goes like this: I can construct a scene with the geometry that
holds my catalyst (usually some sort of 3D-grid, mostly cubic), edit the surface
properties of the catalyst in terms of
reflectivity, add a light source and let POVRAY calculate the scene.
What I obviously get is an image of the scene as seen from the camera.
Is there a way to get the intensity of light that hits surfaces that the camera
does not see in such a scene? And then get it in such a way that it can be
evaluated, lets say via ImageJ?

Thanks for any hints!


Post a reply to this message

From: Alain Martel
Subject: Re: How to get the light intenity that hits a surface?
Date: 16 Jul 2021 11:59:46
Message: <60f1acf2$1@news.povray.org>

> Hi,
> 
> I would like to mis-use POVRAY (or any other tool) a bit to get to the light
> intensity that hits a surface of an object.
> The original problem comes from design questions of a photocatalyst, where the
> incident photons cause a chemical reaction.
> So my thinking goes like this: I can construct a scene with the geometry that
> holds my catalyst (usually some sort of 3D-grid, mostly cubic), edit the surface
> properties of the catalyst in terms of
> reflectivity, add a light source and let POVRAY calculate the scene.
> What I obviously get is an image of the scene as seen from the camera.
> Is there a way to get the intensity of light that hits surfaces that the camera
> does not see in such a scene? And then get it in such a way that it can be
> evaluated, lets say via ImageJ?
> 
> Thanks for any hints!
> 
> 
Get the intensity of the illumination for part that are out of view ?
No.
Unless you see something, directly or in reflection/refraction, the 
intensity of light reaching it is not computed as it don't need to be.
In a radiosity scene, those surfaces are often evaluated,

What you can do is to use an animation where the camera orbits your 
scene. That way, by combining the images, you may get what you want. 
Just not from a single image.

Add :

rotate y*clock*360

at the end of the definition of your camera.
You may want to rotate around another axis. In that case, just replace 


Post a reply to this message

From: Bald Eagle
Subject: Re: How to get the light intenity that hits a surface?
Date: 16 Jul 2021 13:50:00
Message: <web.60f1c642c9a4060c1f9dae3025979125@news.povray.org>
"Grobi" <and### [at] boesmanncom> wrote:

> I would like to mis-use POVRAY (or any other tool) a bit to get to the light
> intensity that hits a surface of an object.
> The original problem comes from design questions of a photocatalyst, where the
> incident photons cause a chemical reaction.



> So my thinking goes like this: I can construct a scene with the geometry that
> holds my catalyst (usually some sort of 3D-grid, mostly cubic), edit the surface
> properties of the catalyst in terms of
> reflectivity, add a light source and let POVRAY calculate the scene.
> What I obviously get is an image of the scene as seen from the camera.
> Is there a way to get the intensity of light that hits surfaces that the camera
> does not see in such a scene? And then get it in such a way that it can be
> evaluated, lets say via ImageJ?
>
> Thanks for any hints!

What I would do as a good first approximation is model your scene and give
everything finish {diffuse 1}.  Then you can get 4 (or 6) different views - from
+/- each of the axes.  That will give you the renders with the light intensities
encoded in the pixel brightness values.

Then you can have a second scene that uses eval_pigment to scan the pixels and
read the rgb values.   Then you can sum all of the orthogonal views.

I would use a pigment of rgb 1, and an orthographic camera.

If you're doing photochemistry, then your catalyst will be in solution, and
absorbed photons won't be available to regions of solution farther away from the
light source, so likely something like Beer's Law will apply, and why
photochemists use things like falling film reactors.

You'll likely want to make sure your rendered pixels aren't saturated, and all
your pixels are between 0 and 1, but never AT 1.
See this thread as a way to check:
http://news.povray.org/povray.binaries.images/message/%3Cweb.6035d08b1995ddaf1f9dae300%40news.povray.org%3E/#%3Cweb.603
5d08b1995ddaf1f9dae300%40news.povray.org%3E


Post a reply to this message

From: clipka
Subject: Re: How to get the light intenity that hits a surface?
Date: 16 Jul 2021 21:17:57
Message: <60f22fc5$1@news.povray.org>
Am 16.07.2021 um 15:03 schrieb Grobi:

> I would like to mis-use POVRAY (or any other tool) a bit to get to the light
> intensity that hits a surface of an object.

The "mesh camera" feature could possibly help in achieving your goal.


Post a reply to this message

From: Kenneth
Subject: Re: How to get the light intenity that hits a surface?
Date: 22 Jul 2021 11:55:00
Message: <web.60f99432c9a4060c4cef624e6e066e29@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 16.07.2021 um 15:03 schrieb Grobi:
>
> > I would like to mis-use POVRAY (or any other tool) a bit to get to the light
> > intensity that hits a surface of an object.
>
> The "mesh camera" feature could possibly help in achieving your goal.

As in, using a cylindrical (or even spherical??) mesh for the camera, that
completely encloses the scene? (Sorry, I haven't used the mesh-camera feature
yet, so I don't know much about it.) I assume that such a mesh would need to be
high-resolution-- lots of triangles-- to get a detailed resulting view of the
scene.

Then use Bald Eagle's suggestions, especially the note about finding the
intensity of the resulting pixels (as a post-processing step.) The code examples
given in the thread he mentioned -- by him and myself-- could be modified I
think, to look for *any* intensity of the pixels in a render, which could then
be #written to a file for subsequent use.

It would be an interesting combination of techniques, to possibly get the result
you want. :-)


Post a reply to this message

From: Grobi
Subject: Re: How to get the light intenity that hits a surface?
Date: 30 Jul 2021 04:30:00
Message: <web.6103b694c9a4060c99ed7390b2dab7b3@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 16.07.2021 um 15:03 schrieb Grobi:
>
> > I would like to mis-use POVRAY (or any other tool) a bit to get to the light
> > intensity that hits a surface of an object.
>
> The "mesh camera" feature could possibly help in achieving your goal.

Thanks to everybody for answers!

The mesh camera brought me to lightmap baking, which seems to be what I need:
All surfaces are unwrapped to a UV-map, that map then stores the illumination
information.


I use Poseray to convert my .ogj to POVRay-scenes, then the POVRay lightmapping
helper by Jaime Vives Piqueres.

The problem now: the lightmaps that are generated are mostly black, only some
patches contain some very minute amounts of light.

The scene I use to test everything is a plain white cube with a spotlight on it.
(axes are non-baked).
The resulting lightmap is mostly dark, just some light along the seams.

Any idea what im doing wrong here?

Thanks!

 Grobi


Post a reply to this message


Attachments:
Download 'cube.jpg' (42 KB)

Preview of image 'cube.jpg'
cube.jpg


 

From: Alain Martel
Subject: Re: How to get the light intenity that hits a surface?
Date: 30 Jul 2021 07:56:03
Message: <6103e8d3$1@news.povray.org>

> clipka <ano### [at] anonymousorg> wrote:
>> Am 16.07.2021 um 15:03 schrieb Grobi:
>>
>>> I would like to mis-use POVRAY (or any other tool) a bit to get to the light
>>> intensity that hits a surface of an object.
>>
>> The "mesh camera" feature could possibly help in achieving your goal.
> 
> Thanks to everybody for answers!
> 
> The mesh camera brought me to lightmap baking, which seems to be what I need:
> All surfaces are unwrapped to a UV-map, that map then stores the illumination
> information.
> 
> 
> I use Poseray to convert my .ogj to POVRay-scenes, then the POVRay lightmapping
> helper by Jaime Vives Piqueres.
> 
> The problem now: the lightmaps that are generated are mostly black, only some
> patches contain some very minute amounts of light.
> 
> The scene I use to test everything is a plain white cube with a spotlight on it.
> (axes are non-baked).
> The resulting lightmap is mostly dark, just some light along the seams.
> 
> Any idea what im doing wrong here?
> 
> Thanks!
> 
>   Grobi
> 
> 
My first guess would be that the triangles of your mesh camera are 
facing outward.
Try reversing the vertices order of each triangles in your mesh.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.