|
![](/i/fill.gif) |
On 30.01.10 18:30, Kenneth wrote:
> Thorsten Froehlich<tho### [at] trf de> wrote:>
>
>>> [Thomas 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}}
>>>
>>
>> The question is: What does the macro return? A vector? - If so, that vector
>> is interpreted to be a 5-component vector (or extended accordingly). If a
>> vector is returned, the error message is correct
>> (http://www.povray.org/documentation/view/3.6.1/230/) because the transmit
>> would be a second color you are specifying, which is of course "unexpected".
>>
>
> I want to make sure I understand this myself. (I just re-read the "common color
> pitfalls" section of the docs, but don't quite know which part is applicable
> here.) Let's assume that Thomas's macro returns a simple 3-component vector.
> Would adding 'rgb' solve his problem?
>
> texture{ pigment {color rgb GammaColor(<0.83,0.83,0.83>,Gamma) transmit 0.17}}
Yes, I think so. But it may depend on what exactly the macro does. The color
parsing is a bit messy though because it allows so many variants to do the
same thing.
Thorsten
Post a reply to this message
|
![](/i/fill.gif) |