POV-Ray : Newsgroups : povray.binaries.images : Noise3d and Megapov 0.5 : Re: Noise3d and Megapov 0.5 Server Time
4 Nov 2024 15:00:48 EST (-0500)
  Re: Noise3d and Megapov 0.5  
From: Warp
Date: 21 Jun 2000 06:33:59
Message: <39509a16@news.povray.org>
Why does this happen so often? Someone makes a (good) proposition and
everyone says that it's good, that they like it, that it's marvelous, that it's
better than the original, and so on and so on, and I am the only one who
dares to disagree with everyone else.

  Your solution certainly looks better than those flat plateaus, but in my
opinion it's not the right solution.
  The original noise3d generates smooth curves, where the curvature of the
surface is never too high. The fixed version on mp0.5 just scales the amplitude
of the curve so that it doesn't exceed the limits.
  You solution, however, changes the shape of the curve. It's not the same
function anymore. The curvature of the surface is very high in some places
making the shape different from the regular noise3d.

  Think about a simple example:
  Let's suppose that we have a sine curve which amplitude is for some reason
higher than 1 (like 1.2 or so). This generates a problem when the curve is
needed in a place where the amplitude should not exceed 1. The default solution
in povray is to clamp the values that are too high or too low.
  Now a fix is made so that the sine curve amplitude is lowered to 1. Now the
amplitude is lower, resulting in a visibly different result, but there's no
need to clamp anymore, so we get a perfect sine wave.
  Your fix (as far as I can deduce from the images) would be to keep the
wrong amplitude of the sine curve, but when it approaches 1 it's multiplied
with a correcting factor that lowers the highest parts of the curve so that
it fits under the amplitude of 1. This results in an apparently smooth curve,
but it's wrong in one sense: It's not a sine wave anymore. It doesn't have
the properties of the sine wave and the curvature of the curve is artificially
modified so that it breaks the original curvature. This new curve can't be
used as a sine wave anymore.
  The consecuences of your fix may not be as drastical as I made it sound, but
in my opinion it changes the function so much that it's not the same noise3d
function anymore, but it's a completely different function.
  It might sound a bit offending, but the fix is more or less a kludge.
  The correct way of fixing a buggy feature is make it right and change the
scene to use it in the right way.
  For example if a scene uses buggy normal modifier scaling in the wrong way,
the right solution is to change the scene to use it as it should and not
use the buggy version anymore.

  Of course your function looks good, but if it's added in megapov, in my
opinion it should be added with just another name, not noise3d.

  (Darn, how do I manage every time to sound so aggressive, so attacking?
My intention is not to attack you nor to say that I do not appreciate
your work; I just try to express my opinion, although I often fail to do it
in a way that doesn't sound so aggressive...)

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

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