POV-Ray : Newsgroups : povray.programming : >1600 radiosity samples: right costheta distribution? Server Time
5 Oct 2024 01:17:09 EDT (-0400)
  >1600 radiosity samples: right costheta distribution? (Message 31 to 34 of 34)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Mark Weyer
Subject: Re: >1600 radiosity samples: right costheta distribution?
Date: 10 Jan 2003 04:55:09
Message: <3E1E9B1E.CCBF5699@frege.mathematik.uni-freiburg.de>
> First of all there is no 'correct' distribution, you can only try to
> measure the quality of your sample set and compare it to others.  One
> measurement of quality would be to measure the distance of each point to
> its nearest neighbor - if this is very similar for all samples the
> distribution is quite good (a non uniform distribution is more difficult
> of course).

I do not think that would be a good measurement. In the following
example, the distance to the nearest neighbour is EQUAL for all points
(it is always 1 because the points are paired), while I expect you to
agree
that this is not a good distribution. (The example fills a rectangle,
not a
hemisphere, but that is irrelevant.)

   +----------------------------------------+
   |      *                                 |
   |  **  * *                               |
   |        *  **                           |
   | **                                     |
   |     *   **                             |
   |     *                                  |
   | **     **                              |
   |    **                                  |
   |  *    **                               |
   |  *                                     |
   |                                        |
   |                                        |
   |                                        |
   |                                        |
   |                                        |
   |                                        |
   |                                        |
   |                                        |
   |                                        |
   |                                        |
   +----------------------------------------+

Even if you ,,disallow'' the unevenness depicted here, you are bound
to get grid artefacts, which can be a real killer, if the sample grid
interacts with some object grid in the scene in a moir'e way.

Proposal for quality measurement: Density. Given a subset A of the
space you want to fill, the density is the quotient of the number of
samples inside A and the size (here: area) of A. The density should
not differ much for different A. As we intend a discrete distribution,
we have to restrict the quality measurement to A of a suitable minimum
size.

  Mark


Post a reply to this message

From: Christoph Hormann
Subject: Re: >1600 radiosity samples: right costheta distribution?
Date: 10 Jan 2003 05:30:38
Message: <3E1EA0CD.ACEF6B4D@gmx.de>
Mark Weyer wrote:
> 
> > First of all there is no 'correct' distribution, you can only try to
> > measure the quality of your sample set and compare it to others.  One
> > measurement of quality would be to measure the distance of each point to
> > its nearest neighbor - if this is very similar for all samples the
> > distribution is quite good (a non uniform distribution is more difficult
> > of course).
> 
> I do not think that would be a good measurement. In the following
> example, the distance to the nearest neighbour is EQUAL for all points
> (it is always 1 because the points are paired), while I expect you to
> agree
> that this is not a good distribution. (The example fills a rectangle,
> not a
> hemisphere, but that is irrelevant.)
> 
> [...]

You are right, this is not a very good measurement.  None the less with
some change it is suited for comparing distributions.  From all
distributions with N points the one with the largest minimum distance
between two points could be considered as the best.  

A different measurement would be calculating the sum of the inverse
distances of every point to all other points.  All this sums together
should be low for a good distribution.

> 
> Proposal for quality measurement: Density. Given a subset A of the
> space you want to fill, the density is the quotient of the number of
> samples inside A and the size (here: area) of A. The density should
> not differ much for different A. As we intend a discrete distribution,
> we have to restrict the quality measurement to A of a suitable minimum
> size.

The problem is that this would not detect anisotropy.  

One important point about radiosity sampling is that the mathematically
best distribution is not necessarily the best for high quality radiosity
results.  As you already mentioned regularity artefacts are a major
problem.  The halton distribution Mael implemented seems to work quite
well at high count values although it is surely not the best in terms of
mathematical quality measurements.  

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 31 Dec. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Mark Weyer
Subject: Re: >1600 radiosity samples: right costheta distribution?
Date: 10 Jan 2003 06:06:10
Message: <3E1EABC1.2C2E5C3@frege.mathematik.uni-freiburg.de>
> You are right, this is not a very good measurement.  None the less with
> some change it is suited for comparing distributions.  From all
> distributions with N points the one with the largest minimum distance
> between two points could be considered as the best.

Without having tried I would suspect this to favor grids.

> A different measurement would be calculating the sum of the inverse
> distances of every point to all other points.  All this sums together
> should be low for a good distribution.

Another aspect are boundary effects. Take, for simplicity, a
one-dimensional
example: 4 points in the unit interval. In the optimum one point will be
at 0
and another at one. Because of symmetry the other two will be at x and
1-x.
The function you want to minimze then is 4/x+4/(1-x)+2/(1-2x). The
optimum
due to common sense is x=1/3 while this does not minimize the function:
Its derivative at 1/3 is 9, while it would be 0 at the minimum.

This does not matter though, if the distribution is calculated on a
boundary-less space, such as a torus, and then mapped to the space we
are interested in.

> The problem is that this would not detect anisotropy.

What is anisotropy?

  Mark


Post a reply to this message

From: T J Viking
Subject: Re: >1600 radiosity samples: right costheta distribution?
Date: 6 Feb 2003 08:34:01
Message: <3e426449$1@news.povray.org>
> >> How about allowing only some fixed count numbers
> >   That sounds more like a kludge than a solution. :)
>
> but why :) ? I realy doubt if someone will see difference beetween
> 1043 and 1044 conut...

Ive done such tables in my renderer, storing normal coordinates in float format (not
the double).

Made tables from 4 (4x4) to 32 (32x32) [ as you can see Ive iterated through N
generating NxN samples) and it occupies much less
space

Tabulated ray directions were calculated by computer simulated annealing.
A few variants of distributions: uniform, pure cosine and a few variants of
degenerated BRDFs.
Each variant occupies something like 140KB for full series of samples 4x4, 5x5,...
32x32.

Samples were distributed perfectly, leaving some place to add some noise ("perfect"
Poisson discs).

There is really no need for having tables for 4,5,6,7,8.....4096 samples, just because
from Monte Carlo theorem of reconstruction  2-times increase in samples lowers the
noise sqrt(2).


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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