POV-Ray : Newsgroups : povray.general : Parse Warning: Suspicious expression after rgb Server Time
1 Nov 2024 19:14:34 EDT (-0400)
  Parse Warning: Suspicious expression after rgb (Message 1 to 6 of 6)  
From: Nekar Xenos
Subject: Parse Warning: Suspicious expression after rgb
Date: 15 May 2013 15:35:00
Message: <op.ww44olehufxv4h@xena>
How can I find out what this suspicious expression is?
The variable was obtained through eval_pigment()

-- 
-Nekar Xenos-


Post a reply to this message

From: Alain
Subject: Re: Parse Warning: Suspicious expression after rgb
Date: 15 May 2013 17:36:28
Message: <5193ffdc$1@news.povray.org>

> How can I find out what this suspicious expression is?
> The variable was obtained through eval_pigment()
>

This is generated when what follow the rgb keyword may not be a valid 
rgb triplet. It can appen in a number of ways, mostly when you apply 
some arithmetics to your colour.

Normaly, it's safe to just ignore that warning. It can be used as a hint 
when the colour you see is not what you intended or what it should be.



Alain


Post a reply to this message

From: Nekar Xenos
Subject: Re: Parse Warning: Suspicious expression after rgb
Date: 15 May 2013 23:38:54
Message: <op.ww5q24saufxv4h@xena>
On Wed, 15 May 2013 23:36:39 +0200, Alain <kua### [at] videotronca> wrote:



>> How can I find out what this suspicious expression is?
>> The variable was obtained through eval_pigment()
>>
>
> This is generated when what follow the rgb keyword may not be a valid 
 

> rgb triplet. It can appen in a number of ways, mostly when you apply  

> some arithmetics to your colour.
>
> Normaly, it's safe to just ignore that warning. It can be used as a hi
nt  

> when the colour you see is not what you intended or what it should be.

>
>
>
> Alain

Thanks Alain.

-- 

-Nekar Xenos-


Post a reply to this message

From: clipka
Subject: Re: Parse Warning: Suspicious expression after rgb
Date: 16 May 2013 09:46:40
Message: <5194e340@news.povray.org>
Am 15.05.2013 21:34, schrieb Nekar Xenos:
> How can I find out what this suspicious expression is?
> The variable was obtained through eval_pigment()

I suspect eval_pigment() gives you a 5-component colour (RGBFT), while 
rgb expects a 3-component vector. Try using "rgbft" instead of "rgb", or 
omitting the "rgb" keyword entirely.


Post a reply to this message

From: Kenneth
Subject: Re: Parse Warning: Suspicious expression after rgb
Date: 16 May 2013 12:00:01
Message: <web.519501b052d8056c2d977c20@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 15.05.2013 21:34, schrieb Nekar Xenos:
> > How can I find out what this suspicious expression is?
> > The variable was obtained through eval_pigment()
>
> I suspect eval_pigment() gives you a 5-component colour (RGBFT), while
> rgb expects a 3-component vector.

Actually, the eval_pigment function returns just three. (I've always been
curious why it wasn't designed to return all five.)

Another possible reason for Nekar's problem might be the unexpected behavior of
color 'dot operators' (if he's using them.) The "Common color pitfalls" section
in the documentation gives a good rundown of what to watch out for. (Although
I'm not sure if the eval_pigment result constitutes a true COLOR, in the sense
of an implicit "rgb" color; it's a *function* of a color. But I use the
documentation workarounds with it anyway, just to be safe.)


Post a reply to this message

From: Nekar Xenos
Subject: Re: Parse Warning: Suspicious expression after rgb
Date: 16 May 2013 12:49:18
Message: <op.ww6roduqufxv4h@xena>
On Thu, 16 May 2013 17:56:32 +0200, Kenneth <kdw### [at] gmailcom> wrote:

> clipka <ano### [at] anonymousorg> wrote:
>> Am 15.05.2013 21:34, schrieb Nekar Xenos:
>> > How can I find out what this suspicious expression is?
>> > The variable was obtained through eval_pigment()
>>
>> I suspect eval_pigment() gives you a 5-component colour (RGBFT), while
>> rgb expects a 3-component vector.
>
> Actually, the eval_pigment function returns just three. (I've always been
> curious why it wasn't designed to return all five.)
>
> Another possible reason for Nekar's problem might be the unexpected  
> behavior of
> color 'dot operators' (if he's using them.) The "Common color pitfalls"  
> section
> in the documentation gives a good rundown of what to watch out for.  
> (Although
> I'm not sure if the eval_pigment result constitutes a true COLOR, in the  
> sense
> of an implicit "rgb" color; it's a *function* of a color. But I use the
> documentation workarounds with it anyway, just to be safe.)
>
Thanks for the hint. It seems that you may be correct about the dot  
operators. Just add brackets... ;)

-- 
-Nekar Xenos-


Post a reply to this message

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