POV-Ray : Newsgroups : povray.binaries.images : Dome lights : Re: Dome lights Server Time
7 Aug 2024 19:20:20 EDT (-0400)
  Re: Dome lights  
From: m1j
Date: 20 Dec 2005 10:10:00
Message: <web.43a81e35e93c309aed196ef10@news.povray.org>
I was trying to find a way to decrease the lights at the top. The only way
My code could be changed for that is to randomly remove lights at an
increasing rate as the angle moves closer to the top. This is not a good
solution.

With the adition of the sub sampling your code looks like it is better. This
could be done by sampling at 2 or more levels deeper in subdivision but
placing lights at the undivided level. Also I added a photon statment to
see what that would be like. I am still working with the setting to try to
get it right.

"Trevor G Quayle" <Tin### [at] hotmailcom> wrote:
> Nice
> From what I can gather from your code, is the light spacing based on the x-y
> coordinates of the un-wrapped HDRI?  This may cause you problems with lights
> close to the poles of the image as you would tend to get a higher density of
> lights in these areas, which is why I tried to do a geodesic dome
> configuration, to try to get a more even sampling around the dome.  I do
> like the supersampling idea, which I didn't try implementing.  One thing
> that you can do to help with the light brightness, is do 2 identical passes
> so you can get a light count on the first one and adjust the lights
> accordingly. BTW, I see you did get it macroed after all.  I would like to
> figure out some way to get better adaptive sampling.  With larger sampling
> spacing, you can miss smaller light sources and with finer sample spacing
> you can get too many lights, depending on the threshold level.  The random
> super sampling probably helps a bit with this.
> My macro if you are interested:
>
> //start
> #macro MapLight(n,R,Map,SS,BR,TH, LI)
>   #declare PIMAGE = function {pigment{image_map {hdr Map}}}
>   union{
>     #if (SS)
>       sphere{0 R*1.01
>         pigment {image_map {hdr MAP once interpolate 2 map_type 1} scale
> <1,1,-1>}
>         finish {ambient BR diffuse 0}
>       }
>     #end
>     #declare nL=pow(2,(n-1));
>     #declare numL=0;
>     #declare MaxB=0;
>     #declare k=0; #while (k<=1)
>       #declare i=-nL; #while (i<=nL)
>         #declare nS=4*(nL-abs(i));
>         #declare j=0; #while (j<=nS)
>           #if (nS=0)
>             #declare xp=0;
>           #else
>             #declare xp=2*j/nS-1;
>           #end
>             #declare yp=i/nL/2;
>             #declare COL = PIMAGE(xp/2+0.5,yp+0.5,0);
>
>             #if (COL.gray > MaxB) #declare MaxB=COL.gray; #end
>
>             #if (COL.red>TH|COL.green>TH|COL.blue>TH)
>               #if (k=0)
>                 #declare numL=numL+1;
>               #else
>                 light_source{0 color (COL/numL)*LI fade_power 2
> fade_distance R translate<0,0,-R> rotate x*i*90/nL rotate y*j*360/nS rotate
> y*270}
>               #end
>             #end
>         #declare j=j+1; #end
>       #declare i=i+1; #end
>     #declare k=k+1; #end
>     #debug concat("NumLights:",str(numL,0,0),"/",str(2+pow(2,2*n),0,0),"
> (",str(numL/(2+pow(2,2*n))*100,0,1),"%)n")
>     #debug concat("MaxB-(",str(MaxB,0,3),")n")
>   }
> #end
> //end
>
> I attached a few more scnes samples as well.
> In the last one, I removed the HDRI sky sphere and used visible light
> sources instead to be able to see the distribution.


Post a reply to this message


Attachments:
Download 'building.jpg' (17 KB)

Preview of image 'building.jpg'
building.jpg


 

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