POV-Ray : Newsgroups : povray.programming : Re: Making Media look like Halo (was Re: Lake Two ...) Server Time
25 Dec 2024 22:35:58 EST (-0500)
  Re: Making Media look like Halo (was Re: Lake Two ...) (Message 1 to 6 of 6)  
From: Mike
Subject: Re: Making Media look like Halo (was Re: Lake Two ...)
Date: 20 Aug 1999 14:15:11
Message: <37BD9947.75818009@aol.com>
> Actually, the way it currently works ensures a reasonably fair distribution of
> samples whose average should converge toward the actual average of the interval.
> My way also gives a somewhat fair distribution, though it's biased toward the
> near end of the interval unless the number of samples is a power of two.
>

I agree that your method works well within the current sample splitting method.  It's
a
good way to go about having an even distribution while still allowing for the
confidence
and variance variable to do their work.

> Just using
>
>   d0=Interval->ds*Interval->samples / max_samples;
>
> (assuming you had access to max_samples) would heavily bias toward the near end
> of the interval, only sampling the far end when the near end has high variance.
> If your interval happens to fall across a sharp transition between two basically
> flat regions, and if min_samples/max_samples is small, you might never see the
> differing values at the far end of the interval.

That's why I said I would need to add supersampling.  Instead of stepping along the
ray
at even intervals that are based on max_samples, I would do it with min_samples and
sample between each one to do the supersampling - max_samples would be ignored.
Supersampling is going to require a lot more work and design modications beyond what
I've done so far, and I liked the suggestion of adding a sampling_method keyword for
this purpose.  Here's what I have so far:

Step_Size = Interval->ds / Least_Samples;

d0 = Interval->ds * Interval->samples / Least_Samples + (Step_Size * (FRAND() * 1));

I added Least_Samples to the function sample_media and pass IMedia->Min_Samples to it
prior to using the function (this is just a quick workaround).  FRAND() really should
be
multiplied by a user-defined variable but I put it there to illustrate how much this
looks like the current implimentation of media when the samples are fully randomized.

Now I haven't tried this yet, but my theory is that, if at the end of each time
through
sample_media we make:

Prev_Sample = Current_Sample

Than a supersample_media function could compare the two and if they vary by more than
a
certain value take additional samples (call itself recursively) between them until
either a max_level is reached or the extra samples don't vary enough.  All I'm doing
is
comparing how it was done with atmosphere, which we know yielded good results in a
relatively short span of time. :)

I haven't slept since I started doing this.  hee hee...think I'll go do that now.

-Mike


Post a reply to this message

From: Ron Parker
Subject: Re: Making Media look like Halo (was Re: Lake Two ...)
Date: 20 Aug 1999 14:28:09
Message: <37bd9e39@news.povray.org>
On Fri, 20 Aug 1999 13:07:03 -0500, Mike wrote:
>Now I haven't tried this yet, but my theory is that, if at the end of each time
through
>sample_media we make:
>
>Prev_Sample = Current_Sample
>
>Than a supersample_media function could compare the two and if they vary by more than
a
>certain value take additional samples (call itself recursively) between them until
>either a max_level is reached or the extra samples don't vary enough.  All I'm doing
is
>comparing how it was done with atmosphere, which we know yielded good results in a
>relatively short span of time. :)

I see.  That could work.  You'd have to eliminate the second loop in the 
function that calls sample_media, of course, and possibly add some stuff 
to the parser for samples so it could ignore the lack of a max value.  It 
certainly makes sense.  I wasn't getting what you were saying because I 
was still stuck on confidence and variance. :)

Next question: are you going to make the sampling method a media-by-media
setting, or will it be the same for an entire interior?  The former would
be more flexible, but the latter is easier to implement and allows for
greater flexibility in your sampling methods.


Post a reply to this message

From: Mike
Subject: Re: Making Media look like Halo (was Re: Lake Two ...)
Date: 21 Aug 1999 03:42:13
Message: <37BE566E.CA9DEDF4@aol.com>
> Next question: are you going to make the sampling method a media-by-media
> setting, or will it be the same for an entire interior?  The former would
> be more flexible, but the latter is easier to implement and allows for
> greater flexibility in your sampling methods.

Good point.  I think I'm going to need to add something to global settings for
changing the
method.  If the new method performs well, I don't think anyone will miss being able to
mix
and match.

I've been using the Lake Two scene file for testing.  It makes an excellent test scene
because of the large scale of the cloud objects and the large sphere representing the
atmosphere.  The latter renders the same with 2 samples as it does with 50 using the
evenly
distributed samples, plus there's absolutely no graininess.   The clouds require more
random
sampling though, but I'm hoping supersampling will reduce the number needed.

It took him 3 days to render the scene.  My hope is that I can produce something that
can
render it at the same size in under 3 hours and have it look the same only perfectly
smooth.  I'm going to have to take a break from this for a few days but I'll try to
get back
to it as soon as I can.

-Mike


Post a reply to this message

From: TonyB
Subject: Re: Making Media look like Halo (was Re: Lake Two ...)
Date: 21 Aug 1999 12:55:38
Message: <37BECB41.A98A0013@panama.phoenix.net>
Sorry to interrupt the continuum here, but I just wanted to take a moment to say how
much I
admire and appreciate the work you guys are doing with media. I'm glad you found a way
to
improve such a useful feature and finally bring it to a wider audience (the
MHz-impared).

--
Anthony L. Bennett
http://welcome.to/TonyB

Non nova, sed nove.


Post a reply to this message

From: Margus Ramst
Subject: Re: Making Media look like Halo (was Re: Lake Two ...)
Date: 21 Aug 1999 16:01:24
Message: <37BF058D.ED17C948@peak.edu.ee>
We are all MHz-impaired, and likely to stay so. Especially when it comes to
raytracing.

Margus

TonyB wrote:
> 
> Sorry to interrupt the continuum here, but I just wanted to take a moment to say how
much I
> admire and appreciate the work you guys are doing with media. I'm glad you found a
way to
> improve such a useful feature and finally bring it to a wider audience (the
MHz-impared).
> 
> --
> Anthony L. Bennett
> http://welcome.to/TonyB
> 
> Non nova, sed nove.


Post a reply to this message

From: TonyB
Subject: Re: Making Media look like Halo (was Re: Lake Two ...)
Date: 24 Aug 1999 00:13:22
Message: <37C20D09.5225D48F@panama.phoenix.net>
Please continue talking... the conversation was quite interesting... =)

--
Anthony L. Bennett
http://welcome.to/TonyB

Non nova, sed nove.


Post a reply to this message

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