POV-Ray : Newsgroups : povray.general : Problem with pigment_map : Re: Problem with pigment_map Server Time
31 Jul 2024 08:28:46 EDT (-0400)
  Re: Problem with pigment_map  
From: Penelope20k
Date: 23 Jul 2007 03:40:38
Message: <46a45b76$1@news.povray.org>
in a pigment_map ..don t use pigment statement ..just write your gradient
and color map ...
in a texture_map   don't use texture statement etc....








web.46a318d48aa1d48566bd28430@news.povray.org...
> High!
>
> I'm currently trying to build a gradient y texture to generate a 16 bit
> heightfield from an isosurface terrain. Here's the code:
>
> #declare HF16 =
> texture
> {
>   pigment
>   {
>     gradient y
>     pigment_map
>     {
>       #declare a=0;
>       #while (a<127)
>         [a/256
>           pigment  // here the error occurs
>           {
>             gradient y
>             color_map
>             {
>               [0 rgb <a/255, 0, 0>]
>               [1 rgb <a/255, 1, 0>]
>             }
>             scale 1/256
>           }
>         ]
>         [(a+1)/256
>           pigment
>           {
>             gradient y
>             color_map
>             {
>               [0 rgb <a/255, 0, 0>]
>               [1 rgb <a/255, 1, 0>]
>             }
>             scale 1/256
>           }
>         ]
>         #declare a=a+1;
>       #end
>     }
>   }
>   finish { ambient 1 diffuse 0 }
> }
>
> Everytime I try to start my small test scene, I get the error message
"Parse
> Error: expected "[", pigment found instead". Why?
>
> See you on www.khyberspace.de !
>
> Yadgar
>
>


Post a reply to this message

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