POV-Ray : Newsgroups : povray.general : Order of texture and pigment matter? : Order of texture and pigment matter? Server Time: 29 Aug 2008 06:47:00 GMT
  Order of texture and pigment matter?  
From: wealthychef
Date: 12 May 2008 22:25:00
I don't understand something.  When I use the following code:

#declare testfinish = finish {ambient 0.7}

triangle {
    v0 v1 v2
    texture {
       pignment { color Red }
      testfinish
    }
}

 I get this error:
File: jaime.inc  Line: 94
File Context (5 lines):
    v0 v1 v2
    texture {
      pigment { color Red }
      testfinish
Parse Error: No matching } in 'texture', finish identifier found instead

But if I just switch the order of pigment and testfinish, as follows, the scene
renders as I expect:

triangle {
    v0 v1 v2
    texture {
      testfinish
      pigment { color Red }
        }
}

The same is true if I don't use the #declare, but just use the finish keyword
directly:

triangle {
    v0 v1 v2
    texture {
      pigment { color Red }
      finish {ambient 0.7}
        }
}


I've seen this kind of thing before and always "just make it work," but I'd love
to know what's actually happening here.


Post a reply to this message

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