POV-Ray : Newsgroups : povray.binaries.images : Moon rendering (prototype) : Re: Moon rendering (prototype) Server Time
28 Sep 2024 09:16:37 EDT (-0400)
  Re: Moon rendering (prototype)  
From: clipka
Date: 1 Oct 2015 04:08:34
Message: <560cea02$1@news.povray.org>
Am 01.10.2015 um 00:12 schrieb David Given:
> Here are some pictures of the moon.
...
> However, as you can see, I suck at media; the sky is dire. Last time I
> made it work by brute force and ignorance, just increasing the samples
> to about 30 and living with achingly long rendering times. I want to do
> better this time.
> 
> (The weird stripe is an artifact of the *sky*, not the terrain. I assume
> it's a sampling glitch of some kind. No idea what's going on there. To
> prove it, I enclose another picture with the sky turned off, and you can
> see the ocean is fine.)
...

Uh... wait - sky? ocean?

We are talking about the moon, as in, /our/ moon, right?


As for the media, for starters be advised that sampling method 2 is
generally considered the worst of all choices; depending on what you
want to achieve, you're typically better off with either method 1 or 3.
Also, when using method 3, make sure to use its adaptive sampling
feature, using "samples MIN,MAX" with low min and high max, and tweaking
aa_level and aa_threshold to your taste.

Now for the main course, the artifacts: The bad news is that whenever
your density function is non-linear, contrary to intuition you will
/always/ get banding artifacts as long as you aim for a smooth result.
You can crank up the number of samples like mad, but you will never get
rid of them entirely, and our perceptual system is very sensitive to
this type of artifacts.


The first step to solving the problem is to throw the goal of smoothness
overboard, and replace the banding artifacts with noise artifacts; even
if the total error between the ideal image and the actual output remains
the same, our eyes are much more forgiving if they can't find any
pattern in the artifacts.

Introducing noise to the sampling process can be achieved in a number of
ways; you probably only want one of them:

- Add a random element to the density function; for instance, multiply
with a function that gives a value between, say, 0.9 to 1.1, based on a
very small-scale granite pattern. Drawback: This does not play nicely
with adaptive sampling method 3.

- Use sampling method 1 with "intervals 1"; this always gives you an
entirely random distribution of media samples. Drawback: This is also
the slowest method.

- Use sampling method 3 with "intervals 1" and jitter (you may want to
be bold and try "jitter 1.0"); this will vary the distance between
sample points.


Now that you have converted your artifacts to noise, it is time to
reduce its amplitude by throwing more computing power at it; again, you
have several options:

- Possibly the easiest, grab a copy of UberPOV and use anti-aliasing
mode 3 ("+am3"); reduce the threshold parameter ("+a") if you think you
have too much noise overall; increase the confidence parameter ("+ac")
if you think you have too many stray speckles; increase the recursion
depth parameter ("+r", not actually recursion depth in mode 3, but still
governing maximum number of samples) if your results remain poor in some
regions, or reduce it if you think POV-Ray is spending an inacceptable
lot of time on some regions.

- Use standard POV-Ray with a little bit of focal blur; the effect is
about the same as UberPOV's anti-aliasing mode 3, with "variance" and
"confidence" settings taking the role of the +a and +ac parameters,
respectively. (UberPOV's "+am3" might be superior at avoiding stray
speckles though.)

- If you're using media sampling method 1, increasing the "samples"
parameter will throw more computing power directly at reducing the
noise, albeit in a less selective fashion.

- If you're using media sampling method 3, and using "jitter" to
generate the noise, possibly the most efficient way of throwing
computing power at the problem is to reduce "aa_threshold" and possibly
increase "aa_level".


Post a reply to this message

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