POV-Ray : Newsgroups : povray.newusers : pigment function as normal pattern Server Time
26 Nov 2024 14:56:24 EST (-0500)
  pigment function as normal pattern (Message 1 to 5 of 5)  
From: Ross Litscher
Subject: pigment function as normal pattern
Date: 29 Mar 2004 15:18:37
Message: <4068849d$1@news.povray.org>
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.


Post a reply to this message

From: Bill Hails
Subject: Re: pigment function as normal pattern
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

From: Ross Litscher
Subject: Re: pigment function as normal pattern
Date: 30 Mar 2004 12:50:32
Message: <4069b368$1@news.povray.org>
"Bill Hails" <bil### [at] europeyahoo-inccom> wrote in message
news: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

And that should work with any custom pigment function I make, no matter how
complex, right?

thanks for the clarification. I tried several variations, but apparently
never the correct one :)

ross.


Post a reply to this message

From: Christopher James Huff
Subject: Re: pigment function as normal pattern
Date: 30 Mar 2004 21:12:12
Message: <cjameshuff-750829.21124030032004@news.povray.org>
In article <4069b368$1@news.povray.org>,
 "Ross Litscher" <rli### [at] everestkcnet> wrote:

> And that should work with any custom pigment function I make, no matter how
> complex, right?

Just about. It won't work wit patterns that rely on the surface, like 
the slope pattern or facets.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

From: Ross Litscher
Subject: Re: pigment function as normal pattern
Date: 31 Mar 2004 11:30:05
Message: <406af20d@news.povray.org>
"Christopher James Huff" <cja### [at] earthlinknet> wrote in message
news:cjameshuff-750829.21124030032004@news.povray.org...
> In article <4069b368$1@news.povray.org>,
>  "Ross Litscher" <rli### [at] everestkcnet> wrote:
>
> > And that should work with any custom pigment function I make, no matter
how
> > complex, right?
>
> Just about. It won't work wit patterns that rely on the surface, like
> the slope pattern or facets.
>
> -- 

Thank you much, both of you.

-ross


Post a reply to this message

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