|
![](/i/fill.gif) |
In article <3daaf81e@news.povray.org>, "Slime" <slm### [at] slimeland com>
wrote:
> Sweet. Since this will probably also elliminate the problems with 3D noise,
> maybe I'll implement it as a noise_generator option in my patch.
Just replace the SCurve() function in texture.cpp with this
implementation. There are some other optimizations that can be done to
offset the more expensive s-curve function. It will be duplicate work,
since the POV Team is aware of this and probably already has an
implementation, but I don't know of any patches that have been publicly
released.
However, this won't fix all the problems with Perlin noise. The function
still goes to 0 at regular intervals...since the POV version is
re-scaled to the [0, 1] range, it goes to 0.5. If you use a function
with something like "fabs(f_noise() - 0.5)" in it, you will see a grid
pattern. This occurs in POV's implementation (though it doesn't go to
0.5 exactly, probably because of the seed used), my own implementation,
and is visible in Ken Perlin's sample images (use the threshold filter
in some image processing program to see it). This is a result of the way
it is calculated, you can't really get away from it.
There are other noise algorithms, for example, Lewis sparse convolution
noise doesn't have any annoying artifacts that I can find. The drawback
is that it is slower, about half to 1/3 as fast in normal usage from my
experience. (this is normal usage, it has parameters that can make it
arbitrarily slow)
I've done a patch with Lewis noise, I can release it publicly if there
is interest (the POV Team already has it).
--
Christopher James Huff <cja### [at] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tag povray org
http://tag.povray.org/
Post a reply to this message
|
![](/i/fill.gif) |