POV-Ray : Newsgroups : povray.unofficial.patches : Sampling in pov3.5 Server Time
8 Jul 2024 17:33:39 EDT (-0400)
  Sampling in pov3.5 (Message 13 to 22 of 32)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Nicolas Calimet
Subject: Re: Sampling in pov3.5
Date: 3 Jan 2003 12:11:01
Message: <3E15C424.50601@free.fr>
> samples for focal blur

	As Apache, I'm surprised to see the distribution fills a square
and not a circle. Actually the first 20 samples clearly show that
the circle is the target, which is logical (I kinda remind that
the 3.1g source code tells it).
	Could you just explain how you obtain those pictures for
the focal blur distribution ?

	On another hand, assuming the distribution is really in a
circle, I guess it could be worth using a Halton sequence when more
than 50 samples (or 37 according to hexgrid4size in render.cpp) are
requested.

	- NC


Post a reply to this message

From: Mael
Subject: Re: Sampling in pov3.5
Date: 3 Jan 2003 12:40:55
Message: <3e15cb27@news.povray.org>
> I have made some tests with adapting the count dynamically before:
> http://www-public.tu-bs.de:8080/~y0013390/simpov/docu04.html

I see you have already explored all this a lot, I better stop looking at
radiosity I guess :)

M


Post a reply to this message

From: Christopher James Huff
Subject: Re: Sampling in pov3.5
Date: 3 Jan 2003 12:45:50
Message: <cjameshuff-9C5303.12414603012003@netplex.aussie.org>
In article <3e157f92$1@news.povray.org>,
 "Thorsten Froehlich" <tho### [at] trfde> wrote:

> Keep in mind that such a method will very likely require more samples to be
> taken. 

Probably...but it looks like many artifacts are due to low sample 
density in the "low" areas: a couple near-tangent samples hit a bright 
source, but no others do. At that point, you could already have enough 
near-perpendicular samples for a good approximation, but increasing 
samples mainly adds more there. It might be worth it to add some kind of 
switch. Maybe combine the two...the even distribution method would 
probably be slower, because it has to weight the samples. You could use 
some samples on the variable distribution, and use any left over on the 
even distribution to fill in any gaps, keeping some benefit from each.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Mael
Subject: Re: Sampling in pov3.5
Date: 3 Jan 2003 12:50:35
Message: <3e15cd6b@news.povray.org>
> As Apache, I'm surprised to see the distribution fills a square
> and not a circle. Actually the first 20 samples clearly show that
> the circle is the target, which is logical (I kinda remind that
> the 3.1g source code tells it).
> Could you just explain how you obtain those pictures for
> the focal blur distribution ?

I output the Sample_Grid array to a text file for a focal blur of 300
samples.
(and if you look into the mlpov documentation at bokeh_pigment you will see
an image that clearly shows that pov uses a uniform distribution in a
square)

M


Post a reply to this message

From: Nicolas Calimet
Subject: Re: Sampling in pov3.5
Date: 3 Jan 2003 13:42:46
Message: <3E15D9A5.3090206@free.fr>
> (and if you look into the mlpov documentation at bokeh_pigment you will see
> an image that clearly shows that pov uses a uniform distribution in a
> square)

	Yes-yes, I mostly read this part of the mlpov-0.81 docs a few
days ago when you put them online - it's in french but so am I  :o)

	I (tried to) study the focal blur method in POV about two
years ago an could not get a better result. In particular to avoid
the grainy effect that appears on solid color textures even with
high sample count and all samples taken, i.e. 'variance 0' AFAIR.
Nowadays I don't remember the details of the implementation, but
I was pretty sure the samples would be all contained in a disc
(without jittering), since a camera diaphragm/aperture is made of
lamels which approximate a circle. Now I'm maybe confusing with
the need to sample the whole pixel area...
	I suppose this is what you wanted to test, using an hexagon
pattern in mlpov. You're setting max. 4000 samples so it's impossible
to see the effect on grainyness on your images (could you setup some
test image which is easier to read, with focusing on a particular
sphere ?). On the demo page you presented on this thread, the original
POV method clearly shows "defects" near the diagonals at 300 samples.
I believe that the Halton distribution would help reducing this effect.
Is it already included in mlpov ?

	- NC


Post a reply to this message

From: Mael
Subject: Re: Sampling in pov3.5
Date: 3 Jan 2003 14:56:27
Message: <3e15eaeb@news.povray.org>
> I suppose this is what you wanted to test, using an hexagon
> pattern in mlpov. You're setting max. 4000 samples so it's impossible
> to see the effect on grainyness on your images (could you setup some
> test image which is easier to read, with focusing on a particular
> sphere ?). On the demo page you presented on this thread, the original
> POV method clearly shows "defects" near the diagonals at 300 samples.
> I believe that the Halton distribution would help reducing this effect.
> Is it already included in mlpov ?

no it's not, but it's not complicated to add if wanted. The sampling for the
bokeh patch is also really badly done I think, so if I have time I may try
to correct this too in a future version

M


Post a reply to this message

From: Nathan Kopp
Subject: Re: Sampling in pov3.5
Date: 4 Jan 2003 11:35:27
Message: <3e170d4f$1@news.povray.org>
"Christoph Hormann" <chr### [at] gmxde> wrote...
>
>
> Mael wrote:
> >
> > > http://www.schunter.etc.tu-bs.de/~chris/files/samples_simpov.png
> >
> > it looks good, does it take a long time to create this distribution ?
>
> I did not write down the time for that one but i later did some tests with
> 4000 points and it needed at least 1 hour to reach a usable state.

ouch.  that's a long time!  :-(
The sample points look great, though.
...although though it doesn't look like it is exactly the same distribution
as POV's original sample list.

-Nathan


Post a reply to this message

From: Nathan Kopp
Subject: Re: Sampling in pov3.5
Date: 4 Jan 2003 11:46:46
Message: <3e170ff6$1@news.povray.org>
"Christoph Hormann" <chr### [at] gmxde> wrote...
>
> Methods based on repulsion/minimizing potential energy should work equally
> well with both high and low number of samples.  But for using the same set
> for both low and high number of samples is important to have a good way of
> sorting them.  It has been mentioned before that the set of samples right
> now in POV-Ray is only quite uniform at certain numbers of samples.

True.  It seems POV's sample list has been optimized for specific numbers of
samples.  Does anybody know which sample counts produce the most evenly
distributed samples?

Also, this brings up a good point that if we can find a fast way to generate
a new set of samples for each render, we could theoretically come up with
better distributions for all sample counts.  The key here is to be able to
generate a good sample list quickly.  Another benefit to creating a custom
sample list for each render is that we could create sample lists for things
other than the standard lambertian cos-theta distribution.  This would
potentially allow us to produce more realistic results for a wider range of
surface materials.

Also note that such sample-generating code could be useful for photon
mapping.  The current photon mapping implementation creates a fake
distribution by shooting photons in a spiral and jittering the results.
While this generally produces good results, it can also lead to artefacts if
the jitter value is too small, and can also lead to uneven samples if the
jitter value is too large.

-Nathan


Post a reply to this message

From: Christoph Hormann
Subject: Re: Sampling in pov3.5
Date: 4 Jan 2003 12:17:20
Message: <3E171720.2AC78C5@gmx.de>
Nathan Kopp wrote:
> 
> Also, this brings up a good point that if we can find a fast way to generate
> a new set of samples for each render, we could theoretically come up with
> better distributions for all sample counts.  The key here is to be able to
> generate a good sample list quickly.

I doubt that such a 'fast and good' algorithm is possible.  Apart from
that you have the problem that it is not known in advance which samples
from the table are used (see the 'while(rayOk...' loop in radiosit.cpp).  

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: Christoph Hormann
Subject: Re: Sampling in pov3.5
Date: 5 Jan 2003 16:48:19
Message: <3E18A823.8D20ED82@gmx.de>
I have made some first actual renders with new distributions, here are
some results:

http://www.schunter.etc.tu-bs.de/~chris/files/rad_test.html

The sample sets i generated have 300 samples which are sorted afterwards
for best results at lower count values.  The scene uses a count of 50. 
Sorting is somewhat tricky with non uniform distributions so the 50
samples are probably quite different from a perfect cosine theta
distribution.

The first two images are the old and the new distribution.  It can be seen
that the differences are not that strong but i think that the second one
is somewhat better.  Testing with a distribution optimized for exactly 50
samples could be worth trying too.

The third image shows the result when using a completely uniform
distribution and weighting the samples according to cosine theta.  The
result seems worse although a final conclusion would require further
tests.  The interesting thing is that turning off the different weighting
strongly weakens the artefacts (fourth image).  

The final image shows the same settings with randomly rotated sample set
(based on an idea by Michael Andrews:

Subject: Fluorescent strip radiosity test scene  (22K + 24K)
Date: Thu, 28 Nov 2002 13:25:06 +0000
From: Michael Andrews <m.c### [at] readingacuk>
Newsgroups: povray.binaries.images

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

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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