POV-Ray : Newsgroups : povray.general : realistic lighting I (fading) Server Time
1 Aug 2024 10:18:18 EDT (-0400)
  realistic lighting I (fading) (Message 1 to 3 of 3)  
From: maesju
Subject: realistic lighting I (fading)
Date: 3 Dec 2005 06:10:01
Message: <web.43917b418a00281f7b4fb7150@news.povray.org>
the way povray handles the darkening of light_sources with distance (r)
isn`t very realistic unfortunately. in reality without(!) any attenuation,
intensity (I) follows I(r)= d^2/r^2, d being some normal distance where I=1
is assumed. for distances >> d "fade_power 2 fade_distance d " works pretty
well but for small distances intensity should rise much faster than
provided by the fade formula (see documentation).
My personal workaround was now to dramatically increase the light color (16
or so) and adjust a relatively short fade_distance by trial and error in a

anyone solved the problem yet?

maesju


Post a reply to this message

From: Zeger Knaepen
Subject: Re: realistic lighting I (fading)
Date: 3 Dec 2005 06:34:56
Message: <439182e0$1@news.povray.org>
"maesju" <nomail@nomail> wrote in message 
news:web.43917b418a00281f7b4fb7150@news.povray.org...
> the way povray handles the darkening of light_sources with distance 
(r)
> isn`t very realistic unfortunately. in reality without(!) any 
attenuation,
> intensity (I) follows I(r)= d^2/r^2, d being some normal distance 
where I=1
> is assumed. for distances >> d "fade_power 2 fade_distance d " works 
pretty
> well but for small distances intensity should rise much faster than
> provided by the fade formula (see documentation).
> My personal workaround was now to dramatically increase the light 
color (16
> or so) and adjust a relatively short fade_distance by trial and error 
in a

inconvenient...
> anyone solved the problem yet?

actually, I often use light_sources with *extremely* high (all is 
relative, I know) brightness, like this:

light_source {<10,10,10> rgb <.9,.95,1>*5000 fade_distance .02 
fade_power 2}

I believe there is a set of macros that makes all this easier to do.

yep, found it, it's this: http://www.ignorancia.org/lightsys.php

cu!
-- 
#macro G(b,e)b+(e-b)*C/50#end#macro _(b,e,k,l)#local C=0;#while(C<50)
sphere{G(b,e)+3*z.1pigment{rgb G(k,l)}finish{ambient 1}}#local C=C+1;
#end#end _(y-x,y,x,x+y)_(y,-x-y,x+y,y)_(-x-y,-y,y,y+z)_(-y,y,y+z,x+y)
_(0x+y.5+y/2x)_(0x-y.5+y/2x)            // ZK http://www.povplace.com


Post a reply to this message

From: maesju
Subject: Re: realistic lighting I (fading)
Date: 3 Dec 2005 16:05:01
Message: <web.4392074d3395f0037b4fb7150@news.povray.org>
"Zeger Knaepen" <zeg### [at] povplacecom> wrote:
> actually, I often use light_sources with *extremely* high (all is
> relative, I know) brightness, like this:
>
> light_source {<10,10,10> rgb <.9,.95,1>*5000 fade_distance .02
> fade_power 2}
>
> I believe there is a set of macros that makes all this easier to do.
>
> yep, found it, it's this: http://www.ignorancia.org/lightsys.php
>
> cu!
> --
> #macro G(b,e)b+(e-b)*C/50#end#macro _(b,e,k,l)#local C=0;#while(C<50)
> sphere{G(b,e)+3*z.1pigment{rgb G(k,l)}finish{ambient 1}}#local C=C+1;
> #end#end _(y-x,y,x,x+y)_(y,-x-y,x+y,y)_(-x-y,-y,y,y+z)_(-y,y,y+z,x+y)
> _(0x+y.5+y/2x)_(0x-y.5+y/2x)            // ZK http://www.povplace.com

wow. that's exactly what i was looking for. It actually solves my next two
problems also.

I started writing a similar macro some time ago but dropped it again when i
read all this stuff about white point temperature. a.s.o.
another proof for my #1 coding rule:
don`'t think -- search.

Thanks a lot
Maesju


Post a reply to this message

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