POV-Ray : Newsgroups : povray.general : Order of texture and pigment matter? : Re: Order of texture and pigment matter? Server Time
30 Jul 2024 22:26:01 EDT (-0400)
  Re: Order of texture and pigment matter?  
From: Tim Attwood
Date: 13 May 2008 18:00:48
Message: <482a0f90$1@news.povray.org>
> thank you.  This point has been confusing me for years about Povray, as I 
> only
> occasionally dabble in it.  So it seems as though in a #declare statement, 
> the
> "finish {ambient 0.7}" piece is somehow compiled (?) into a "finish
> identifier?"   What is the difference between an identifier and a 
> statement?
> Is this true:  "finish" is to "identifier" in Povray as "integer" is to
> "variable" in C?
> Aha! I think I get it:

Close, testtexture is a variable, the contents of testtexture is
a finish identifier. The statement after "#declare testtexture =" is
evaluated, found to be a finish, and stored in testtexture as a
finish identifier. An identifier is most like a pointer in C...

>
> If I were to say
> #declare testtexture texture { pigment {Red} finish {ambient 0.7} };

Right, but with the "="

> I then use it like this:
>
> triangle {
> v0,v1,v2
> texture {testtexture}
> }
>
> Thank you.  It's interesting and revealing.

Glad to help.


Post a reply to this message

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