|
 |
"Trevor G Quayle" <Tin### [at] hotmail com> wrote:
> A sample from my latest work on this project. DomeLight.jpg is the actual
> image. DomeLightEval.jpg is a secondary output from the macro that allows
> the scene and adjustments to be pre-evaluated. The blue and red dots
> represent where samples are taken, with red being above the threshold and
> getting a light, and blue being below with no light. You can see in certain
> patches where the dots are much denser, this results from the adaptive
> sampling option. I will post the new code later when I'm a bit more
> satisfied with it.
> I ended up not doing subsampling for evaluating light sources as I found
> that more often it would steal lights away than adding additional lights to
> the scene. I may end up adding a small scale subsampling only to average
> the light colour/intensity of lightsources without adding or removing light
> sources though if I like the looks of it.
>
> -tgq
Here are the last two sets of code I tried. Without photons My renders range
from 4 to 15 minutes. With photons it gets pushed closer to 30 to 50
minutes.
I am sure I could still improve this but I like your results and my use your
code instead.
#macro PSURFACE2(PS,U,V)
#local W = 1 - U - V;
#local u2 = U * U;
#local u3 = u2 * U;
#local v2 = V * V;
#local v3 = v2 * V;
#local w2 = W * W;
#local w3 = w2 * W;
(w3*PS[0] + (3*U*w2)*PS[1] + (3*u2*W)*PS[2] + u3*PS[3] + (3*w2*V)*PS[4]
+ (6*W*U*V)*PS[5] + (3*u2*V)*PS[6] + (3*W*v2)*PS[7] + (3*v2*U)*PS[8] +
v3*PS[9])
#end
//light dome from image.
#macro
DOMELITE2(SP,YANGLE,MULT,CLIPV,THRES,LSAMPL,RAD,AREA,AS,LV,FNAME,FTYPE)
#switch(FTYPE )
#case(0)
#local PIMAGE = function {pigment{image_map {jpeg FNAME}}}//grab image
#break
#case(1)
#local PIMAGE = function {pigment{image_map {png FNAME}}}//grab image
#break
#case(2)
#version unofficial megapov 1.21;
#local PIMAGE = function {pigment{image_map {hdr FNAME}}}//grab image
#break
#end
// #local PS = array[10]
{<0,RAD,0>,<RAD*0.6,RAD,0>,<RAD,RAD*0.6,0>,<RAD,0,0>,<0,RAD,RAD*0.6>,<RAD*0.6,RAD*0.6,RAD*0.6>,<RAD,0,RAD*0.6>,<0,RAD*0
.6,RAD>,<RAD*0.6,0,RAD>,<0,0,RAD>};
#local PS = array[10]
{<0,0,RAD>,<0,RAD*0.6,RAD>,<0,RAD,RAD*0.6>,<0,RAD,0>,<RAD*0.6,0,RAD>,<RAD*0.6,RAD*0.6,RAD*0.6>,<RAD*0.6,RAD,0>,<RAD,0,R
AD*0.6>,<RAD,RAD*0.6,0>,<RAD,0,0>};
/* 1 2 3 4
5 6 7 8
9 10*/
#local Q = 0;
#while(Q < 4)
#local U = 0;
#while(U < 1-(1/SP))
#local V = 0;
#while(V < 1-U-(1/SP)/2)
#local LLOC = PSURFACE2(PS,V,U);
#local COL = PIMAGE(U/4+Q/4,V,0);///4+Q/4
light_source{LLOC color (COL*MULT)
#if(LV) looks_like{sphere{LLOC,RAD/SP pigment{color COL}
finish{ambient 1}}} #end
#if(AREA) area_light <AS, 0, 0> <0, 0, AS> 4, 4 adaptive 1
jitter circular orient #end
#if(COL.gray > 0.5) photons {refraction on reflection on} #end
rotate y*(Q*90)
}
#local V = V + 1/SP;
#end
#local U = U + 1/SP;
#end
#local Q = Q + 1;
#end
#end
Post a reply to this message
Attachments:
Download 'building_j.jpg' (26 KB)
Preview of image 'building_j.jpg'

|
 |