|
![](/i/fill.gif) |
"Tim Cook" <z99### [at] bellsouth net> schrieb im Newsbeitrag
news:42351d76$1@news.povray.org...
> Is there any particular reason the maximum for this is 1600?
I think the reason for this limit is, that at the moment the
sample-directions for radiosity calculations are hardcoded into
the sourcecode, therefore it's not possible to use a higher
count than 1600. Basically, if you set 'count N' then POV-Ray
will take the first N Samples from the internal sample-set to
scan the hemisphere.
> ... Therefore, I see no reason to prevent a user from setting
> radiosity count to as high a number as they feel is necessary and have
> patience and/or memory to accomodate.
MegaPOV 1.1 has the feature, that you can define a custom
sample-set. So you have perfect control over the sample-directions
and also the maximum number of samples isn't bounded anymore.
I've written some code to generate a fairly good distributed
sample-set with arbitrary count. It can be found at:
http://www.8ung.at/halcyon/povray/custom-radiosity.html
(in the case that the website isn't working, i've attached the
relevant code)
> Tim Cook
Thies Heidecke
usage:
SunflowerRadiosity(600, 0.0, seed(23))
'sunflower.inc':
-----------------------------------------------------------------
#version unofficial MegaPOV 1.10;
#include "rand.inc"
#macro SunflowerRadiosity(RadiositySamples, RadJitter, RandomStream)
samples {
RadiositySamples, // number of directions given
#declare gsa= 2*pi*((sqrt(5)-1)/2); // golden section angle
#declare N = RadiositySamples; // Number of Samples
#declare M = 1;
#declare phi= gsa;
#declare pr = sqrt(M/N);
#while(M<N)
//<pr*sin(phi),pr*cos(phi),sqrt(1-pr*pr)>,
#local pos = 2*x;
#while(vlength(pos)>=1)
#local pos = pr*<sin(phi),cos(phi),0> +
Rand_Gauss(0,RadJitter/3,RandomStream)*vrotate(y,360*rand(RandomStream)*z)/sqrt(N);
//#local pos = pr*<sin(phi),cos(phi),0> +
RadJitter*vrotate(y,360*rand(RandomStream)*z)/sqrt(N);
#end
<pos.x,pos.y,sqrt(1-(pow(pos.x,2)+pow(pos.y,2)))>,
#declare M=M+1;
#declare pr=sqrt(M/N);
#declare phi=phi+gsa;
#end
#if(RadiositySamples>1)
<0,1/sqrt(N),sqrt(1-1/N)>
#else
<0,0,1>
#end
}
count RadiositySamples
#end
Post a reply to this message
|
![](/i/fill.gif) |