POV-Ray : Newsgroups : povray.general : color problem Server Time
2 Nov 2024 17:21:28 EDT (-0400)
  color problem (Message 1 to 6 of 6)  
From: Tom Melly
Subject: color problem
Date: 16 Dec 2003 11:51:25
Message: <3fdf380d$1@news.povray.org>
According to the docs (6.1.5.5), the following should be okay, but I get an
error...

#declare PigTest = pigment{color <1,1,0> + blue 1}

Any ideas?

Assuming I've done something stupid, will the correct syntax allow me to add a
filter component to a pigment map?

e.g.

#declare MyPig =
pigment{
    bozo
    pigment_map{
        [0 rgb<1,1,0>]
        [1 rgb<1,0,1>]
    }
}

#declare MyPig2=pigment{MyPig filter 0.5}

-- 
#macro A(V,B,C,R)#while(B-256)#if(V-128/B>=0)sphere{0,.5translate<C-4R-1,9>
pigment{rgb<1-C/8R/2C/8>}}#local V=V-128/B;#end#local B=B*2;#local C=C+1;#
end#end A(234,1,0,2)A(85,1,0,1)A(81,1,0,0)light_source{-5 1}//Tom Melly


Post a reply to this message

From: Mike Williams
Subject: Re: color problem
Date: 16 Dec 2003 15:00:43
Message: <8o9H2CApQ23$EwYB@econym.demon.co.uk>
Wasn't it Tom Melly who wrote:
>According to the docs (6.1.5.5), the following should be okay, but I get an
>error...
>
>#declare PigTest = pigment{color <1,1,0> + blue 1}
>
>Any ideas?

But you can do things like

#declare Blue = <0,0,1>;
#declare PigTest = pigment{color <1,1,0> + Blue}


>Assuming I've done something stupid, will the correct syntax allow me to add a
>filter component to a pigment map?
>
>e.g.
>
>#declare MyPig =
>pigment{
>    bozo
>    pigment_map{
>        [0 rgb<1,1,0>]
>        [1 rgb<1,0,1>]
>    }
>}
>
>#declare MyPig2=pigment{MyPig filter 0.5}

You can add a colour to a colour, like 

#declare HalfFilter = <0,0,0,0.5>;
#declare PigTest = pigment{color <1,1,0> + HalfFilter}

But to add a colour to a more complicated pigment, I think you have to
use a more complicated syntax, like:

#declare Clear = rgbf 1;
#declare MyPig2=pigment{
  average pigment_map {
    [1.0 MyPig]
    [1.0 Clear]
}}

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Hughes, B 
Subject: Re: color problem
Date: 16 Dec 2003 15:41:05
Message: <3fdf6de1$1@news.povray.org>
"Tom Melly" <tom### [at] tomandlucouk> wrote in message
news:3fdf380d$1@news.povray.org...
> According to the docs (6.1.5.5), the following should be okay, but I get
an
> error...
>
> #declare PigTest = pigment{color <1,1,0> + blue 1}

Interesting... yes, I thought that would have been valid. Can still use z or
<0,0,1> in place of blue 1. Like + z*0.5 if you only wanted half blue.
Curious thing though that color keywords aren't able to be used and yet show
it to be valid in the Doc. Something to check into.

> Assuming I've done something stupid, will the correct syntax allow me to
add a
> filter component to a pigment map?

Seems like Mike Williams has a good solution anyway. I think once you are
dealing with a pattern it isn't going to accept color keywords directly.

Bob H.


Post a reply to this message

From: Tom Melly
Subject: Re: color problem
Date: 16 Dec 2003 16:10:19
Message: <3fdf74bb@news.povray.org>
"Mike Williams" <nos### [at] econymdemoncouk> wrote in message
news:8o9H2CApQ23$EwYB@econym.demon.co.uk...

<snip>

Thanks Mike.


Post a reply to this message

From: Tom Melly
Subject: Re: color problem
Date: 16 Dec 2003 16:11:32
Message: <3fdf7504$1@news.povray.org>
"Hughes, B." <omn### [at] charternet> wrote in message
news:3fdf6de1$1@news.povray.org...
>
> Interesting... yes, I thought that would have been valid.

> it to be valid in the Doc. Something to check into.
>

I'll post in general to ask whether it's a bug in docs or a bug in pov.


Post a reply to this message

From: Christopher James Huff
Subject: Re: color problem
Date: 17 Dec 2003 07:17:43
Message: <cjameshuff-A9C606.07174517122003@netplex.aussie.org>
In article <3fdf380d$1@news.povray.org>,
 "Tom Melly" <tom### [at] tomandlucouk> wrote:

> According to the docs (6.1.5.5), the following should be okay, but I get an
> error...
> 
> #declare PigTest = pigment{color <1,1,0> + blue 1}

"blue" isn't a value you can add to a color vector, it is a keyword 
specifying the blue color channel, in the same class as "rgb" or "rgbft".


> Assuming I've done something stupid, will the correct syntax allow me to add a
> filter component to a pigment map?

No. However, you can use the average pattern to combine the old pigment 
with a new, transparent one...just make sure you double the colors in 
both pigments first.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

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