POV-Ray : Newsgroups : povray.advanced-users : how can i do this? : Re: how can i do this? Server Time
28 Jul 2024 10:29:33 EDT (-0400)
  Re: how can i do this?  
From: Chris B
Date: 24 Aug 2006 12:09:33
Message: <44edcf3d$1@news.povray.org>
"pierre" <pie### [at] efpginpgfr> wrote in message 
news:web.44edac778da26955ad334ed60@news.povray.org...
> "amar" <amar> wrote:
>> Hello Everybody, i have a doubt. if i have my camera located at say
>> C[x,y,z]. Is it possible to measure the amount of light that is falling 
>> on
>> my camera?. is there anyway to calculate it based on the pixels within 
>> the
>> view of camera??
>>
>> would be verymuch thankfll to anyone who could help me out
>>
>> Thank you in advance
>>
>> cheers
>> amar
>
> Hi everybody,
>
> I have just posted a message asking exactly the same question. I hope that
> somebody would answer...
> Or perhaps amar found a way to do it?
> Thanks
> pierre
>
>

Hi Pierre,

It doesn't look like anybody rushed to answer it when it was posted, so I'll 
take a pop at it. Maybe that will help stimulate ideas or debate.

I don't know of any way of measuring the light that would be recorded by the 
camera during the render.
However, once you have the rendered bitmap you could read the values for 
each pixel and average them, which would give you an approximation of the 
amount of light that the camera captured.

You could probably do this post-rendering step using POV-Ray, by defining 
the image as a pigment and using the eval_pigment function to find the 
values of each pixel. You could then display the total or average value in 
the message stream or you could use the value on a second pass at rendering 
the scene (e.g. turn on another light if the first pass was too dull).

Regards,
Chris B.


Post a reply to this message

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