POV-Ray : Newsgroups : povray.general : Media, Intervals, samples and getting results : Re: Media, Intervals, samples and getting results Server Time
8 Sep 2024 10:50:37 EDT (-0400)
  Re: Media, Intervals, samples and getting results  
From: Jellby
Date: 3 Jan 2005 18:25:53
Message: <41d9d47f@news.povray.org>


> | But I see the opposite,
> | as if the influence of the samples was "averaged" (since most
> samples are
> | deep inside, the effect of the surface ones is weaker). I would have
> | thought that the sampling algorithm (and colour calculation) would be
> | smarter than that, but maybe that's not so easy...
> |
> Do you have a sample code that produces this effect?

Yep, try this (povray 3.6.1, custom compile):

---------------------------------------
camera { location <0, 0, -10> look_at 0 }

light_source { <-20, 20, -20>, rgb 1 }

sphere {
  0, 3
  hollow
  pigment { color transmit 1 }
  interior {
    media {
      scattering { 5, rgb 3 }
      method 3
      intervals 1
      samples 10 // try also with 200
    }
  }
}
---------------------------------------

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

> It takes some trial and error, but it should be possible to get the
> same effect with a much faster render. Of course, it all depends on
> whether you can afford to waste more time fiddling with the
> parameters or simply letting the computer render in the background
> while you're doing something else ;) To make accurate comparisons, 
> you also need to make sure that the maximum number of samples is the
> same in both cases (I'm not talking of the second parameter of the
> "samples" keyword here, but of the number of potential samples which
> is something in the order of min_samples * 2^aa_level). Then if you
> set aa_threshold to 0 the results should be the same (and take
> *forever* to render) so all you need to do is find a value that's low
> enough to get the effect you want while not being exactly 0.

In my experiments, I did not see any significant difference in the output by
fiddling with aa. According to your explanation, "samples 10 aa_level 8
aa_threshold 0.0001" should give similar results to "samples 160 aa_level 4
aa_threshold 0.0001", and I don't see that with the above example. Could
you give a more clear example?

> Note that this only applies to subsurface scattering simulations: eg
> in cases when you have a very dense nearly uniform media.

Yes, my experiments are confined to uniform media. I wonder if this adaptive
sampling and antialiasing is only valid for non-uniform media (opposite to
your sentence above), maybe uniform media makes adaptive sampling
unnecessary...

Or maybe I'm making some mistakes.

-- 
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


Attachments:
Download 'test1.jpg' (3 KB) Download 'test2.jpg' (3 KB)

Preview of image 'test1.jpg'
test1.jpg

Preview of image 'test2.jpg'
test2.jpg


 

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