POV-Ray : Newsgroups : povray.general : Maximum radiosity count? Server Time
29 Nov 2024 23:26:16 EST (-0500)
  Maximum radiosity count? (Message 1 to 2 of 2)  
From: Tim Cook
Subject: Maximum radiosity count?
Date: 14 Mar 2005 00:13:26
Message: <42351d76$1@news.povray.org>
Is there any particular reason the maximum for this is 1600?
In a test render with all other variables being equal, with count 10 
memory use was 567 mb (compared to 550 mb prior to starting render) vs. 
569 mb at count 1000...so memory usage can't possibly be the reason for 
the limit.  Also, in another set of tests I ran, render time increased 
at a less than linear ratio to either count or error bound.  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.

-- 
Tim Cook
http://home.bellsouth.net/p/PWP-empyrean

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GFA dpu- s: a?-- C++(++++) U P? L E--- W++(+++)>$
N++ o? K- w(+) O? M-(--) V? PS+(+++) PE(--) Y(--)
PGP-(--) t* 5++>+++++ X+ R* tv+ b++(+++) DI
D++(---) G(++) e*>++ h+ !r--- !y--
------END GEEK CODE BLOCK------


Post a reply to this message

From: Thies Heidecke
Subject: Re: Maximum radiosity count?
Date: 14 Mar 2005 01:45:00
Message: <423532ec$2@news.povray.org>
"Tim Cook" <z99### [at] bellsouthnet> 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

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