POV-Ray : Newsgroups : povray.advanced-users : Passing a pigment to a heightfield? : Re: Passing a pigment to a heightfield? Server Time
1 Jul 2024 04:54:42 EDT (-0400)
  Re: Passing a pigment to a heightfield?  
From: SharkD
Date: 28 Aug 2009 01:13:30
Message: <4a97677a$1@news.povray.org>
Anthony D. Baye wrote:
> Absolutely
> 
> You can turn your pigment into a function
> 
> #declare myPigFn =
> function {
>     pigment { my_pigment ]
>     }
> 
> and pass it directly to the height field as a function
> 
> height_field {
>     function HF_Res_X, HF_Res_Z { myPigFn(x,y,z).red * vScale }
>     water_level n.n
>     }
> 
> ".red" specifies that the height data follows the intensity of the red 
> channel.  Alternatively you may use the blue or green channels or any of 
> the direction vectors (x,y,z)
> 
> Numerical functions can also be used, but do not require the vector 
> component.
> 
> remember that height_fields occupy a unit cube from 0,0,0 to 1,1,1.
> 
> Regards,
> 
> A.D.B.

I get the error:

"Parse Error: Expected 'numeric expression', undeclared identifier 
'HF_Res_X' found instead"

-Mike


Post a reply to this message

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