POV-Ray : Newsgroups : povray.newusers : pigment function as normal pattern : Re: pigment function as normal pattern Server Time
30 Jul 2024 12:19:21 EDT (-0400)
  Re: pigment function as normal pattern  
From: Bill Hails
Date: 29 Mar 2004 15:48:48
Message: <40688bb0@news.povray.org>
Ross Litscher wrote:

> is it possible to use a pigment function i've made,
> 
> #local pigf = function {pigment {... }}
> 
> as a normal pattern for an object? I understand I could make an isusurface
> using that function, but that's not what I'm aiming for.
> 
> something like:
> 
> #local norm1 = normal{
>     pigf(x,y,z).gray
> }
> 
> ?
> 
> thanks,
> ross.

pretty much exactly that. This works:

#declare pigf = function { pigment { bozo } }
sphere {
    0, 5
    texture {
        pigment { White }
        normal { function { pigf(x, y, z).gray } }
    }
}
-- 
Bill Hails


Post a reply to this message

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