POV-Ray : Newsgroups : povray.general : Seeing the Light Server Time
15 Nov 2024 15:16:43 EST (-0500)
  Seeing the Light (Message 1 to 8 of 8)  
From: Rick Measham
Subject: Seeing the Light
Date: 4 Aug 2004 03:35:01
Message: <web.4110918616c0096978d4ef100@news.povray.org>
The ceiling in my office is white. And when it's light outside it looks
white (radiosity aside). However when I turn the light on and I look
directly at the light, the ceiling looks dark. I'm guessing this is because
my eyes are dilating due to the large amount of light pouring in.

In POV-Ray, is it possible to automate this? When I look at a light_source I
see nothing of course. I'm wondering if I wrap a translucent sphere around
a light source I'll get a visible light. Turn up the brightness of the
light enough to compensate for the translucent globe and I'll have an
effective, visible light source (right?)

However a computer monitor is only capable of 100% white and so no matter
how far I turn up the light it'll still be white. Can I get an effect
similar to looking at the roof whereby everything else dims? I guess one
way to do it would be to use two hemisheres for the globe, one facing the
user with high transparency and one away with very low transparency. But is
there a default way to do it?


Post a reply to this message

From: Lutz-Peter Hooge
Subject: Re: Seeing the Light
Date: 4 Aug 2004 04:27:53
Message: <41109e09$1@news.povray.org>
Rick Measham <nomail@nomail> wrote:
> The ceiling in my office is white. And when it's light outside it looks
> white (radiosity aside). However when I turn the light on and I look
> directly at the light, the ceiling looks dark. I'm guessing this is because
> my eyes are dilating due to the large amount of light pouring in.
> 
> In POV-Ray, is it possible to automate this?

IMHO it is not possible to automate it inside of Povray, since when it is
is tracing Pixel (1,1) is does not yet know what brightness the rest of the 
picture will have, so it can't compensate for it at this point.

So you will have to do this manually (most practical for still images),
or with postprocessing.

For postprocessing, a version of Povray that doesn't clip colors and outputs
to a high dynamic format range format obviously would be optimal, but I don't
know if such a version is available.

Lutz-Peter


Post a reply to this message

From: John VanSickle
Subject: Re: Seeing the Light
Date: 4 Aug 2004 12:47:53
Message: <41111339@news.povray.org>
Lutz-Peter Hooge wrote:

> Rick Measham <nomail@nomail> wrote:
> 
>>The ceiling in my office is white. And when it's light outside it looks
>>white (radiosity aside). However when I turn the light on and I look
>>directly at the light, the ceiling looks dark. I'm guessing this is because
>>my eyes are dilating due to the large amount of light pouring in.
>>
>>In POV-Ray, is it possible to automate this?
> 
> 
> IMHO it is not possible to automate it inside of Povray, since when it is
> is tracing Pixel (1,1) is does not yet know what brightness the rest of the 
> picture will have, so it can't compensate for it at this point.
> 
> So you will have to do this manually (most practical for still images),
> or with postprocessing.
> 
> For postprocessing, a version of Povray that doesn't clip colors and outputs
> to a high dynamic format range format obviously would be optimal, but I don't
> know if such a version is available.

It should be relatively easy to patch to support one of these formats.

Regards,
John


Post a reply to this message

From: Chris B
Subject: Re: Seeing the Light
Date: 4 Aug 2004 19:13:07
Message: <41116d83$1@news.povray.org>
"Rick Measham" <nomail@nomail> wrote in message
news:web.4110918616c0096978d4ef100@news.povray.org...
> The ceiling in my office is white.. snip .. when I turn the light on and I
look
> directly at the light, the ceiling looks dark. .. snip .. In POV-Ray, is
it possible to automate this?
>

Well you can cheat   :o)

The following scene tests whether the light source is in shot and, if it is,
it wraps the light in a bright and slightly translucent sphere, making the
sphere visible and blocking out most of the light. To test whether the light
is in shot it defines a box that exactly fills the screen and traces a line
from the light source to the camera.
If the line intersects the box, the light is in shot. (If you use up or
right vectors in your camera statement you'll need to change the size of the
box accordingly)

Any good?


#declare lookAt=<0,7.5,10>;   // Centre of light is just in shot
//#declare lookAt=<0,7.6,10>; // Centre of light is just out of shot
#declare cameraPos=<0,0,-5>;
#declare lightLocation=<0,0,0>;

camera {location cameraPos look_at lookAt}
light_source { lightLocation color rgb <1, 1, 1>}
sphere { 0, 10 pigment { radial frequency 80}}


#include"transforms.inc"

// Create a screen object 1 unit from the camera
// centred on the centre of the image
#declare screenObject = object{
  box {<-0.677,-0.5,0><0.677,0.5,0.001>}
  #declare orientationVector = lookAt-cameraPos;
  Reorient_Trans(z,<orientationVector.x,0,orientationVector.z>)

Reorient_Trans(<orientationVector.x,0,orientationVector.z>,orientationVector
)
  translate cameraPos+vnormalize(lookAt-cameraPos)
}

// Trace a ray through the camera and the light
// to see if it hits the screen object
#declare hitNormal = <0,0,0>;
#declare hitLocation =
trace(screenObject,lightLocation,cameraPos-lightLocation,hitNormal);

// if the ray hit the 'screen' (in front of the camera), the light is in
shot
#if (vlength(vnormalize(hitLocation-cameraPos) -
vnormalize(lightLocation-cameraPos)) = 0
   & vlength(hitNormal)!=0)
  // So add a sphere to block the light
  sphere {
    lightLocation, 0.1
    pigment { color rgb <5,5,5,0.04> }
  }
#end

Have fun,
Chris.


Post a reply to this message

From: Alain
Subject: Re: Seeing the Light
Date: 4 Aug 2004 19:14:00
Message: <41116db8$1@news.povray.org>
Lutz-Peter Hooge nous apporta ses lumieres ainsi en ce 04/08/2004 
04:26... :

>Rick Measham <nomail@nomail> wrote:
>  
>
>>The ceiling in my office is white. And when it's light outside it looks
>>white (radiosity aside). However when I turn the light on and I look
>>directly at the light, the ceiling looks dark. I'm guessing this is because
>>my eyes are dilating due to the large amount of light pouring in.
>>
>>In POV-Ray, is it possible to automate this?
>>    
>>
>
>IMHO it is not possible to automate it inside of Povray, since when it is
>is tracing Pixel (1,1) is does not yet know what brightness the rest of the 
>picture will have, so it can't compensate for it at this point.
>
>So you will have to do this manually (most practical for still images),
>or with postprocessing.
>
>For postprocessing, a version of Povray that doesn't clip colors and outputs
>to a high dynamic format range format obviously would be optimal, but I don't
>know if such a version is available.
>
>Lutz-Peter
>  
>
If outputing to PNG or PPM, you can set the bit-per-chanel to anything 
from 5 to 16 (default is 8). If you use, say, 10 bits and divide all 
your lights by 4 (or divide the diffuse and ambient values by 4), you 
can simulate a higher dinamic range. If doing this, be sure to lower the 
asc_bailout acordingly.

Alain


Post a reply to this message

From: Mike Raiford
Subject: Re: Seeing the Light
Date: 5 Aug 2004 09:22:35
Message: <4112349b$1@news.povray.org>
Alain wrote:


> If outputing to PNG or PPM, you can set the bit-per-chanel to anything 
> from 5 to 16 (default is 8). If you use, say, 10 bits and divide all 
> your lights by 4 (or divide the diffuse and ambient values by 4), you 
> can simulate a higher dinamic range. If doing this, be sure to lower the 
> asc_bailout acordingly.
> 
> Alain

What about using POV-Ray's internal gamma correction? This seems to me 
to be an issue that gamma could very well take care of ... but, then 
again, I'm not an expert at getting "photographic" lighting from POVRay

-- 
~Mike


Post a reply to this message

From: Christoph Hormann
Subject: Re: Seeing the Light
Date: 5 Aug 2004 09:45:02
Message: <cetdjd$8a6$1@chho.imagico.de>
Alain wrote:
>>
> If outputing to PNG or PPM, you can set the bit-per-chanel to anything 
> from 5 to 16 (default is 8). If you use, say, 10 bits and divide all 
> your lights by 4 (or divide the diffuse and ambient values by 4), you 
> can simulate a higher dinamic range. If doing this, be sure to lower the 
> asc_bailout acordingly.

No, high dynamic range is not the same as more than 8 bits per value. 
It means the format can represent several orders of magnitude in color 
values.  With 16 bit you can represent a contrast ratio of 65535:1 
(meaning the smallest color difference that can be represented is 
1/65535 of the brightest color value in the image), a high dynamic range 
format usually handles at least a few million. You could store 
logarithmic values in an integer file format but simply scaling them 
will not help.

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 06 Jul. 2004 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Alain
Subject: Re: Seeing the Light
Date: 5 Aug 2004 19:56:10
Message: <4112c91a$1@news.povray.org>
Christoph Hormann nous apporta ses lumieres ainsi en ce 05/08/2004 
09:44... :

> Alain wrote:
>
>>>
>> If outputing to PNG or PPM, you can set the bit-per-chanel to 
>> anything from 5 to 16 (default is 8). If you use, say, 10 bits and 
>> divide all your lights by 4 (or divide the diffuse and ambient values 
>> by 4), you can simulate a higher dinamic range. If doing this, be 
>> sure to lower the asc_bailout acordingly.
>
>
> No, high dynamic range is not the same as more than 8 bits per value. 
> It means the format can represent several orders of magnitude in color 
> values.  With 16 bit you can represent a contrast ratio of 65535:1 
> (meaning the smallest color difference that can be represented is 
> 1/65535 of the brightest color value in the image), a high dynamic 
> range format usually handles at least a few million. You could store 
> logarithmic values in an integer file format but simply scaling them 
> will not help.
>
> Christoph
>
I said "simulate a higher" dynamic range, like "faking it". I should 
have said "expanded dynamic range". In some cases, it can be enough, it 
depend on the particular case. I never wanted to imply "true" high 
dynamic range.

Alain


Post a reply to this message

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