POV-Ray : Newsgroups : povray.binaries.images : Dome lights from image : Re: Dome lights from image Server Time
5 Nov 2024 02:18:45 EST (-0500)
  Re: Dome lights from image  
From: m1j
Date: 3 Dec 2005 14:50:01
Message: <web.4391f6a9f7fee7d2f222b3b0@news.povray.org>
I changed and fixed a few things!


#declare SP = 0.005;//sample spacing
#declare HEMI = 0.5;//percent of hemisphere from the top down
#declare ANGLE = 210;
#declare MULT = 0.003;//Light multiplier
#declare THRES = 0.50;//image intensity threshold
#declare SSAMP = 30;//Subsamples for spacing average
#declare RAD = 100;//radius of light dome
#declare AREA = no;//use area lights or not
#declare AS = 5;//size of area light
#declare LV = no; //lights are visible
#declare PIMAGE = function {pigment{image_map {hdr "Timage.hdr"}}}//grab
image


#declare X = 0;
#while(X < 1)
  #declare Y = HEMI;
  #while(Y < 1)
    #local S = seed(10);

    #local CNT = 0;
    #local COL = PIMAGE(X,Y,0);
    #while (CNT < SSAMP)
           #local COL = (COL + PIMAGE(X+(rand(S)*SP),Y+(rand(S)*(SP)),0))/2;
           #local CNT = CNT + 1;
    #end

    #if(COL.gray > THRES)
      light_source{x*RAD color (COL*MULT)
        #if(LV) looks_like{sphere{x*RAD,2 pigment{color COL}}} #end
        #if(AREA) area_light  <AS, 0, 0> <0, 0, AS>   3, 3 adaptive 1
jitter  circular  orient  #end
        rotate z*(Y*180-90)
        rotate y*((1-X)*360+ANGLE)
        translate y*0.1
      }
    #end
  #declare Y = Y + SP*2;
  #end
#declare X = X + SP;
#end


The image is the results of the changes compared to the last.


Post a reply to this message


Attachments:
Download 'building4.jpg' (36 KB)

Preview of image 'building4.jpg'
building4.jpg


 

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