POV-Ray : Newsgroups : povray.beta-test : Difference in wrapped vs raw wood in normal{} : Re: Difference in wrapped vs raw wood in normal{} Server Time
30 Dec 2024 12:40:30 EST (-0500)
  Re: Difference in wrapped vs raw wood in normal{}  
From: Mr
Date: 29 Nov 2024 06:25:00
Message: <web.6749a39149345a6016086ed06830a892@news.povray.org>
William F Pokorny <ano### [at] anonymousorg> wrote:
> On 11/27/24 08:00, William F Pokorny wrote:
> > Real life keeping me busy over the next few days, but I plan to dig into
> > this when I get some time. My guess at the moment is it is some
> > numerical difference near values of 0 and/or 1, but we'll see.
>
> What is going on popped into my head 10 minutes ago. The following does
> produce the same result as normal{ wood rotatex*90 } :
>
>      #declare Fn = function {
>          pattern {  // This {} enables value modifiers
>              wood
>            //rotate x*90
>          }
>      }
>      normal {
>          Fn(x,y,z)
>          rotate x*90  // Moved the rotation here
>      }
>
> Where I had coded this:
>
>      #declare Fn = function {
>          pattern {  // This {} enables value modifiers
>              wood
>              rotate x*90
>          }
>      }
>      normal {
>          Fn(x,y,z)
>      }
>
> In the top the rotate happens in normal{} context. With the bottom
> encoding it happens in the pre-compiled function{ pattern{} } context.
>
> The normal{} value sampling - in being only a pyramid  of 4 samples - is
> asymmetric. It sees the wood pattern's value not-rotated in one case and
> rotated in the other and we get different perturbed normal results.
>
> Bill P.

So... Is there still no chance to create tangent space normal maps macros since
most recent fixes?


Post a reply to this message

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