POV-Ray : Newsgroups : povray.beta-test : #macros doesn't work in layered textures : #macros doesn't work in layered textures Server Time
29 Jul 2024 14:12:06 EDT (-0400)
  #macros doesn't work in layered textures  
From: Fabien Mosen
Date: 25 Apr 2002 01:05:12
Message: <3CC78E37.2030206@skynet.be>
//--- This #macro creates a simple color_map :

#macro BiColorMap (Coul1,Coul2,Seuil)
  color_map {
   [0 Coul1]
   [Seuil Coul1]
   [Seuil Coul2]
   [1 Coul2]
  }
#end

//--- I want to use it in a layered texture. This works as expected :

#declare T1 =  texture {
                   pigment {gradient x
                            BiColorMap (Clear,Gray50,.95)
                            scale 90}
                            }
#declare T2 =  texture {
                   pigment {gradient z
                            BiColorMap (Clear,Gray50,.9)
                            scale 90}
                            }

#declare T_Paves1 =
  texture {pigment {Gray80}}
  texture {T1}
  texture {T2}

//--- However, this causes an error :

#declare T_Paves2 =
  texture {pigment {Gray80}}
  texture {pigment {gradient x BiColorMap (Clear,Gray50,.05) scale 90}}
  texture {pigment {gradient z BiColorMap (Clear,Gray50,.05) scale 90}}

// it tells me : "Parse Error: No matching } in 'pigment',
                   macro identifier found instead"

Fabien.


Post a reply to this message

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