![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
I worked out a way to build a dome of lights from an image. Truespace has a
feature like this. This allows the finish properties to react with the
colors of the image better. I used a very low quality radiosity setting.
Render times are around 20min on a amd 64 3200 with 1gig, windows32 and
megapov. Megapov is only needed for the hdr image. Any image could be used.
I wanted to make it a macro but ran into a snag with the file spec keyword.
If any one has an idea for that let me know.
//Light Dome---------
#declare SP = 0.0175;//sample spacing
#declare HEMI = 0.5;//percent of hemisphere from the top down
#declare MULT = 0.24;//Light multiplier
#declare THRES = 0.45;//image intensity threshold
#declare SSAMP = 30;//Subsamples for spacing average
#declare RAD = 60;//radius of light dome
#declare AREA = yes;//use area lights or not
#declare AS = 5;//size of area light
#declare PIMAGE = function {pigment{image_map {hdr "Timage.hdr"}}}//grab
image
#declare X = HEMI;
#while(X < 1)
#declare Y = 0;
#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)
looks_like{sphere{x*RAD,1 pigment{color COL}}}
#if(AREA) area_light <AS, 0, 0> <0, 0, AS> 2, 2 adaptive 3
jitter circular orient #end
fade_distance 1
fade_power 1
rotate z*(X*180-90)
rotate y*(Y*360)
translate y*1
}
#end
#declare Y = Y + SP;
#end
#declare X = X + SP;
#end
Post a reply to this message
Attachments:
Download 'building1.jpg' (34 KB)
Preview of image 'building1.jpg'
![building1.jpg](/povray.binaries.images/attachment/%3Cweb.43912795ae23e4252f222b3b0%40news.povray.org%3E/building1.jpg?ttop=443866&toff=4850&preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"m1j" <mik### [at] hotmail com> wrote:
> I worked out a way to build a dome of lights from an image. Truespace has a
> feature like this. This allows the finish properties to react with the
> colors of the image better. I used a very low quality radiosity setting.
> Render times are around 20min on a amd 64 3200 with 1gig, windows32 and
> megapov. Megapov is only needed for the hdr image. Any image could be used.
>
> I wanted to make it a macro but ran into a snag with the file spec keyword.
> If any one has an idea for that let me know.
>
>
> //Light Dome---------
>
> #declare SP = 0.0175;//sample spacing
> #declare HEMI = 0.5;//percent of hemisphere from the top down
> #declare MULT = 0.24;//Light multiplier
> #declare THRES = 0.45;//image intensity threshold
> #declare SSAMP = 30;//Subsamples for spacing average
> #declare RAD = 60;//radius of light dome
> #declare AREA = yes;//use area lights or not
> #declare AS = 5;//size of area light
> #declare PIMAGE = function {pigment{image_map {hdr "Timage.hdr"}}}//grab
> image
>
> #declare X = HEMI;
> #while(X < 1)
> #declare Y = 0;
> #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)
> looks_like{sphere{x*RAD,1 pigment{color COL}}}
> #if(AREA) area_light <AS, 0, 0> <0, 0, AS> 2, 2 adaptive 3
> jitter circular orient #end
> fade_distance 1
> fade_power 1
> rotate z*(X*180-90)
> rotate y*(Y*360)
> translate y*1
> }
> #end
> #declare Y = Y + SP;
> #end
> #declare X = X + SP;
> #end
Post a reply to this message
Attachments:
Download 'building2.jpg' (33 KB)
Preview of image 'building2.jpg'
![building2.jpg](/povray.binaries.images/attachment/%3Cweb.439128e8f7fee7d2f222b3b0%40news.povray.org%3E/building2.jpg?ttop=443866&toff=4850&preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Post a reply to this message
Attachments:
Download 'building3.jpg' (17 KB)
Preview of image 'building3.jpg'
![building3.jpg](/povray.binaries.images/attachment/%3Cweb.43912900f7fee7d2f222b3b0%40news.povray.org%3E/building3.jpg?ttop=443866&toff=4850&preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Post a reply to this message
Attachments:
Download 'building4.jpg' (45 KB)
Preview of image 'building4.jpg'
![building4.jpg](/povray.binaries.images/attachment/%3Cweb.4391adedf7fee7d2f222b3b0%40news.povray.org%3E/building4.jpg?ttop=443866&toff=4850&preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
m1j nous apporta ses lumieres en ce 2005-12-03 00:05:
> #if(AREA) area_light <AS, 0, 0> <0, 0, AS> 2, 2 adaptive 3
> jitter circular orient #end
Just a little detail about adaptive area_ligh.
adaptive 0 try to use at least a 2*2 aray, adaptive 1 try to start with an 3*3 aray,
adaptive 2 try
to start at 5*5, adaptive 3 at 9*9... (2^<adaptive value>+1)
In your case, adaptive 3 with a 2*2 aray is completely useless, as it want to start
with 9*9 but
have only a 2*2 aray to work with. So it only use the 2*2 it have, and you never get
any speed
improvement.
--
Alain
-------------------------------------------------
Change is inevitable, except from vending machines.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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](/povray.binaries.images/attachment/%3Cweb.4391f6a9f7fee7d2f222b3b0%40news.povray.org%3E/building4.jpg?ttop=443866&toff=4850&preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
An updated image with blurred reflection and photons.
Post a reply to this message
Attachments:
Download 'building5.jpg' (37 KB)
Preview of image 'building5.jpg'
![building5.jpg](/povray.binaries.images/attachment/%3Cweb.43928c2df7fee7d2f222b3b0%40news.povray.org%3E/building5.jpg?ttop=443866&toff=4850&preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |