POV-Ray : Newsgroups : povray.general : Layered texture question : Layered texture question Server Time
31 Jul 2024 08:24:30 EDT (-0400)
  Layered texture question  
From: Thomas de Groot
Date: 21 Jun 2007 10:23:49
Message: <467a89f5$1@news.povray.org>
I feel rather stupid  :-(
I am unable to discover what is wrong in the following piece of code (a 
variation of Rune's Grasstex macro use, adapted for a mesh2 object embedded 
in a macro using MyTexture):

//---start code---
   #declare MyTexture =
      texture {
         #declare gt_groundcolors =
         color_map {
            [0.0, color <0.70,0.55,0.40>]
            [0.5, color <0.50,0.40,0.30>]
            [1.0, color <0.30,0.25,0.20>]
         }
         gt_ground()
         normal {wrinkles 0.5 scale 1*gt_scale turbulence 1}
         finish {
           ambient 0            // ambient surface reflection color [0.1]
           diffuse 0.6          // amount [0.6]
           brilliance 1.0       // tightness of diffuse illumination [1.0]
           conserve_energy      // more realistic
         } // finish
         scale 1/ObjScale
      }
      texture {
         #declare gt_color   = <0.15,0.65,0.00>;
         #declare gt_offset  = -0.00;
         #declare gt_seed    = 0;
         gt_grass()
         normal {FurNormal scale gt_scale}
         finish {
           ambient 0            // ambient surface reflection color [0.1]
           diffuse 0.6          // amount [0.6]
           brilliance 1.0       // tightness of diffuse illumination [1.0]
           conserve_energy      // more realistic
         } // finish
         scale 1/ObjScale
      }

   object {Fur(MyTexture) scale ObjScale}
//---end code---

Individually, the textures work fine, but when I layer them, POV-Ray gives 
an error message at the second texture {  telling me "Parse error: No 
matching } in 'texture', # found instead". If I comment out the 
declarations, it is the macro call that is found instead...
As far as I can tell, all braces are accounted for (also earlier in the 
scene), so what is the problem?

Any bright idea is welcome!!!

Thomas


Post a reply to this message

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