POV-Ray : Newsgroups : povray.programming : Radiosity code question #3 : Re: Radiosity code question #3 Server Time
28 Jul 2024 14:31:47 EDT (-0400)
  Re: Radiosity code question #3  
From: Nathan Kopp
Date: 14 Jul 2003 21:47:37
Message: <3f135d39@news.povray.org>
"Jim McElhiney" <mun### [at] excitecom> wrote...
>
> The max *allowable* nearest count (MAX_NEAREST_COUNT in
> radiotit.h) should be much higher, say 50.  (very few resources, there is
only
> one
> structure which has an array of this size.  The code runs a linear scan
through
> these for each point reused, but with nearest_count=K, that's only <K/2
> floating point compares each, which isn't much.)
> The runtime max "nearest_count" default should be much higher than 5.
> I've been trying numbers around 19-25 lately, and about 20 works best for
> my current test scene.  (if points are on a hex grid, 19 would
> equate to one point and all its neighbours within distance 2).

Have you had a look at the POV 3.5 source code yet?  With MegaPOV I made a
number of modifications to your code (without knowing how it _really_
worked, unfortunately) which generally decreased the artifacts.

One important change was to change the nearest_count from a maximum to a
minimum.  I figured there was no good reason to limit the number of points
to re-use.  The code in ra_average_near already kept running sums for
Weights_Times_Illuminances and Weights for all points that it came across.
As long as a point is within the error_bound, it will be utilized.

> Another big problem is with discontinuities in the final trace.
> Because of the desire for lots of old samples to average, and the desire
> not to do any more samples (or very few) in the final trace pass, I
> recommend a low-to-moderate error bound, a moderate trace count, and
> a very low low_error_factor.  Try around 0.22  (roughly 1/sqrt(20)).
> But be sure to add the fix (hack) for the ot_ins parameter of at least 5
or so,
> since the tree gets traversed with the *final* error_bound on the last
pass,
> which will be 5 times bigger than during the earlier ones.
> If you're using recursion >1, increase it by 1.4 for each additional depth
too.

POV 3.5 includes a feature to disable new samples in the final pass.  This
definately decreases splotchiness.  I probably should have enabled it by
default.

Also, in MegaPOV and POV 3.5, I changed the call to ot_index_sphere so that
it always uses the "real" (final) error bound instead of the one that has
been multiplied by low_error_factor.

I made a number of other modifications here and there to the code.  If you
look at them and have questions, sned me an email.  I _might_ remember why I
made the change.  :-)

-Nathan


Post a reply to this message

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