POV-Ray : Newsgroups : povray.beta-test : Calling a macro in layered texture : Re: Calling a macro in layered texture Server Time
4 Jul 2024 12:52:04 EDT (-0400)
  Re: Calling a macro in layered texture  
From: Kenneth
Date: 29 Jan 2010 11:20:00
Message: <web.4b630a2ad2525f1a65f302820@news.povray.org>
"Thomas de Groot" <tDOTdegroot@interDOTnlANOTHERDOTnet> wrote:
>
> The following gives a parse error stating that it cannot find the closing
> pigment brace but finds a macro identifier instead:
>
> #declare MyTex =
> texture{ pigment{uv_mapping p_map16 }}
> texture{ pigment {color GammaColor(<0.83,0.83,0.83>,Gamma) transmit  0.17}}
>

Just a simplistic question before posting further--and it might be a nonsense
question ;-)  Does the following work, or does it also cause the error? I just
reversed the order of the textures...

#declare MyTex =
texture{ pigment {color GammaColor(<0.83,0.83,0.83>,Gamma) transmit  0.17}}
texture{ pigment{uv_mapping p_map16 }}

In any case, it might be easier to track down with just
#declare MyTex =
texture{ pigment {color GammaColor(<0.83,0.83,0.83>,Gamma) transmit  0.17}}

.....that is, eliminating as many extraneous things as possible. As I see it at
present, the addition of 'transmit' after the macro seems to be the cause
of the problem (for whatever reason); the code works OK without it.

I've come across what I believe to be similar situations as well--POV expecting
to see one 'thing' but seeing another...and I've usually tracked it down/solved
it by putting a semi-colon 'separator' in a particular place (or some other odd
workaround.) Don't know if that has any relation to your situation, though.

Ken


Post a reply to this message

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