POV-Ray : Newsgroups : povray.advanced-users : Stochastics expertise needed : Re: Stochastics expertise needed Server Time
17 May 2024 02:53:20 EDT (-0400)
  Re: Stochastics expertise needed  
From: clipka
Date: 2 Sep 2016 01:30:30
Message: <57c90e76$1@news.povray.org>
Am 02.09.2016 um 00:17 schrieb Bald Eagle:

> So, after skimming some of the literature, I have a much better idea of what
> you're specifically looking for - some form of Importance Sampling.

Yes, that's what the experts call it.

> If you can post a graph of the BRDF that you're trying to simulate for the
> purposes of your sampling algorithm, or a means of plotting it themselves, then
> that might give anyone following along a nudge forward.

I can't. That's the crux of the matter: The algorithm needs to cope with
varying BRDFs. It might be Lambertian with a Phong highlight, or
Oren-Nayar with a Blinn-Phong highlight, or (in the future) maybe
Cook-Torrance, He-Torrance, Ward, Schlick, Lafortune, or whatever smart
brains may still come up with and someone decides to implement in POV-Ray.

I therefore intend to use a very simple approximation to generate my
sampling distribution, and compensate for the difference to the BRDF
(which, by the way, may actually not even be a true BRDF, such as
anything involving POV-Ray's brilliance model) by multiplying the
computed colour of the sample with the BRDF (which will actually be
hidden away in the sample computation) and then dividing it by the
probability that my sampling direction generator spits out that
particular sampling direction.

What exact formula to use is something I leave up to whoever can provide
a viable solution.

To give you a rouhg idea at what I'm aiming for, you might try the Phong
model:

    f(L,V) = k (Lm . V) ^n

where Lm is L mirrored at the surface normal.


> Also,
> 
> My apologies, but I'm trying to figure out what you actually mean when you say
> "keep track of the probability..."

What I mean by that is that I want to know the probability density
function of the sample directions.

> Do you tallying up the actual results of the random sampling so that you can do
> a summation and then divide by the number of random samples?

Something along those lines, yes. But I need to weigh the individual
samples by the probability density function of the sample direction
generator (or, more precisely, by the reciprocal thereof).


Post a reply to this message

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