POV-Ray : Newsgroups : povray.newusers : Surface normal in pigment user-function : Re: Surface normal in pigment user-function Server Time
29 Jul 2024 00:25:05 EDT (-0400)
  Re: Surface normal in pigment user-function  
From: Trevor G Quayle
Date: 13 Mar 2007 21:30:29
Message: <45f75e45$1@news.povray.org>
"avariant" <nomail@nomail> wrote in message 
news:web.45f74903fde32694bb706900@news.povray.org...
>I know you can create a pigment user function that accepts x,y,z,u,v as the
> geometric and texture coordinates of the point being evaluated.  My
> question is, are there constants that can be set to automatically accept 
> the
> normal of the point being evaluated?
>
> I know that I could use the trace method to retrieve it, and if there is 
> no
> other way, I'll do that, but it seems redundant.  Likely, when evaluating
> the function, trace or some method like it, has been called prior and
> calling trace would just duplicate the effort and take longer.
>
>
>

If you just want a pigment based on the surface normal, have a look at the 
'slope' pattern type.  For something more complicated, you can look at 
layering it perhaps.

-tgq


Post a reply to this message

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