POV-Ray : Newsgroups : povray.unofficial.patches : Sampling in pov3.5 Server Time
5 Jul 2024 14:48:23 EDT (-0400)
  Sampling in pov3.5 (Message 11 to 20 of 32)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Christoph Hormann
Subject: Re: Sampling in pov3.5
Date: 3 Jan 2003 11:01:02
Message: <3E15B3BE.E57DB601@gmx.de>
Thorsten Froehlich wrote:
> 
> > Another thing i have been thinking of is if it would not be better to have
> > a uniform distribution but weight the sample rays according to cosine
> > theta.  At least it could be worth trying if that diminishes radiosity
> > artefacts in some situations.
> 
> Keep in mind that such a method will very likely require more samples to be
> taken.  Most pseudo-random functions simply don't give you too nice values
> for a small set of samples (like the 35 default).  My guess (or hope?) is
> that the current table has been tweaked accordingly for small sample sets.

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.

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: Apache
Subject: Re: Sampling in pov3.5
Date: 3 Jan 2003 12:01:46
Message: <3e15c1fa$1@news.povray.org>
The distribution of the focal blur samples is fine to me, but shouldn't the
total area be a circle instead of a rectangular area?
And about the radiosity samples, I think that the distribution is just fine.
We just need some MORE samples :-) I think I'm going to find a way to get
more samples this weekend. The more the better :-)


Post a reply to this message

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

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

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