POV-Ray : Newsgroups : povray.general : Media, Intervals, samples and getting results : Re: Media, Intervals, samples and getting results Server Time
2 Aug 2024 12:21:07 EDT (-0400)
  Re: Media, Intervals, samples and getting results  
From: Jellby
Date: 4 Jan 2005 09:27:45
Message: <41daa7e0@news.povray.org>
Among other things, Slime saw fit to write:

>> I've attached two images: "test1" has samples 10, "test2" has samples
>> 200.

(Sorry for attaching images to this non-binary group. I thought this was
p.b.i. and it was too late when I realized it wasn't)

> I would guess that what is happening is in test1, the first sample of a
> ray is well lit and the other 9 are poorly lit or dark (due to self
> shadowing). While in test2, the first sample is well lit and the other 199
> are poorly lit or dark. So the percentage of lit samples in the first is
> much greater, causing it to be significantly brighter. This is only
> happening because the media is so dense that it becomes dark at a very
> shallow level.
>
> I would assume that the greater number of samples is producing the more
> accurate result.

That was my impression and that could be the reason. There's little
difference between "samples 200" and "samples 2000"

> One thing to try: make two nested spheres, the inner one about 4/5 the
> diameter of the outer one. Give them the same media, but give the outer
> one much more samples. Then the edge of the media (in the outer sphere)
> will be well sampled - as it needs to be to avoid this problem, but the
> inside of the media (the inner sphere) will be poorly sampled, which is ok
> since it's all dark in there anyway. If this works, it may be the fastest
> way to get the effect with accuracy. (Be sure, of course, to avoid having
> the sphere's volume's overlap (use a difference on the outer sphere to do
> this), and to avoid coincident surfaces.)

Hmm... It didn't seem to be quicker in this case, the effect of the samples
was very similar and the inner surface was visible (in fact, the inner
media didn't have much influence).

I guess it's best to have as few samples as possible, as long as there are
enough to accurately sample the media (i.e. the appearance doesn't change
much with increasing samples)

> When the media has a constant density, the first case will take 10 samples
> and the latter case will take 160 samples. Only if the aa_threshold is set
> to 0 (or if the media has a very noisy density) will the two samplings be
> equivalent.

Unfortunately, povray doesn't like "aa_threshold 0". So, it seems the
adaptive sampling refers to the possible variation in the media density,
not to the effect on the image.

-- 
light_source{9+9*x,1}camera{orthographic look_at(1-y)/4angle 30location
9/4-z*4}light_source{-9*z,1}union{box{.9-z.1+x clipped_by{plane{2+y-4*x
0}}}box{z-y-.1.1+z}box{-.1.1+x}box{.1z-.1}pigment{rgb<.8.2,1>}}//Jellby


Post a reply to this message

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