POV-Ray : Newsgroups : povray.programming : Normal perturbation algorithm : Re: Normal perturbation algorithm Server Time
28 Jul 2024 14:18:27 EDT (-0400)
  Re: Normal perturbation algorithm  
From: Nathan Kopp
Date: 9 Jul 2000 00:43:41
Message: <396802fd@news.povray.org>
Chris Huff <chr### [at] maccom> wrote...
> In article <396741d4@news.povray.org>, Warp <war### [at] tagpovrayorg>
> wrote:
>
> >   Does this mean that MegaPov uses the slower algorithm for these
> >   patterns?
>
> It uses the method of choosing 4 points and evaluating the pattern at
> each of those points, if that is what you mean. I haven't noticed it
> being any slower...and I think the fact that it works with slope_maps
> and waveforms is enough of a plus to offset any minor speed losses.
>

Actually, this is incorrect.  For those special normal-only patterns (yes,
there are pigment versions of those patterns, but they internally use a
totally different algorithm when used as a pigment instead of a normal),
MegaPov still uses the already-computed gradient function.  However, MegaPov
fixes some things by applying transformations to the normal where they
should be applied (the official version ignores some of these
transformations and thus can produce incorrect results).  Applying these
transforms has the potential to slow things down a bit, though.  This does
mean that slope_map waveforms still do not work with these special patterns.

You can get slope_map to work with these patterns, though.  How?
1) make a pigment with the pattern that you want to use slope_map with.  Be
aware that this means POV is using a different algorithm to produce the
pattern.  As an example, I'm pretty sure that both bumps and dents use the
bozo pattern when used as pigments, so they will end up looking the same,
even though the normal-only versions of the two patterns look different.
2) use pigment_pattern with that pigment as a basis pattern for the normal
3) use a slope_map on your pigment_pattern

-Nathan


Post a reply to this message

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