POV-Ray : Newsgroups : povray.unofficial.patches : A pattern for each color component Server Time
2 Sep 2024 10:13:05 EDT (-0400)
  A pattern for each color component (Message 1 to 7 of 7)  
From: Nieminen Juha
Subject: A pattern for each color component
Date: 16 Mar 2000 04:20:56
Message: <38d0a778@news.povray.org>
How hard would it be to make a patch that allows to specify a pattern for
each color component of the pigment separately?
  I mean that the red component could have a bozo pattern, the green component
a marble pattern, the blue a granite pattern and the filter a wood pattern.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Chris Huff
Subject: Re: A pattern for each color component
Date: 16 Mar 2000 07:09:00
Message: <chrishuff_99-874AB7.07105716032000@news.povray.org>
In article <38d0a778@news.povray.org>, Nieminen Juha 
<war### [at] sarakerttunencstutfi> wrote:

>   How hard would it be to make a patch that allows to specify a pattern 
> for each color component of the pigment separately?
>   I mean that the red component could have a bozo pattern, the green 
> component a marble pattern, the blue a granite pattern and the filter 
> a wood pattern.

I think this is already possible by using 3 layered textures with 
transmit and a fourth with filter. That is pretty clunky, though.

How about a new pigment_map type, "additive", which holds multiple 
pigments and adds up their results, with a syntax similar to "average".
You could use one pigment for the red, another for the green, and a 
third for the blue, etc.

-- 
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/


Post a reply to this message

From: Peter Popov
Subject: Re: A pattern for each color component
Date: 16 Mar 2000 17:23:17
Message: <kl7ROA8DViqumXDDshn3p=K2ut20@4ax.com>
On Thu, 16 Mar 2000 07:10:57 -0500, Chris Huff
<chr### [at] yahoocom> wrote:

>How about a new pigment_map type, "additive", which holds multiple 
>pigments and adds up their results, with a syntax similar to "average".
>You could use one pigment for the red, another for the green, and a 
>third for the blue, etc.

You mean like using a function pigment?


Peter Popov
pet### [at] usanet
ICQ: 15002700


Post a reply to this message

From: Chris Huff
Subject: Re: A pattern for each color component
Date: 16 Mar 2000 17:40:02
Message: <chrishuff_99-E70073.17415916032000@news.povray.org>
In article <kl7ROA8DViqumXDDshn3p=K2ut20@4ax.com>, Peter Popov 
<pet### [at] usanet> wrote:

> On Thu, 16 Mar 2000 07:10:57 -0500, Chris Huff
> <chr### [at] yahoocom> wrote:
> 
> >How about a new pigment_map type, "additive", which holds multiple 
> >pigments and adds up their results, with a syntax similar to "average".
> >You could use one pigment for the red, another for the green, and a 
> >third for the blue, etc.
> 
> You mean like using a function pigment?

No, like using an average pigment.

4.7.7.2  Average

Technically average  is not a pattern type but it is listed here 
because the syntax is similar to other patterns. Typically a pattern 
type specifies how colors or normals are chosen from a pigment_map ? 
texture_map , density_map , or normal_map , however average  tells 
POV-Ray to average together all of the patterns you specify.  Average 
was originally designed to be used in a normal statement with a 
normal_map  as a method of specifying more than one normal pattern on 
the same surface. However average may be used in a pigment statement 
with a pigment_map  or in a texture statement with a texture_map  or 
media density with density_map  to average colors too.

...
For example
  pigment {
    average
    pigment_map {
      [1.0  Pigment_1]
      [2.0  Pigment_2]
      [0.5  Pigment_3]
    }
  }

An "additive" pattern would add the colors/densities/normals/whatever 
together instead of averaging them together. You could subtract a 
"channel" by using negative numbers for it. Maybe "multiplicative" would 
also be good.

It would also be nice to be able to specify the way they are combined by 
using an isosurface function, but I don't know how this would be 
specified with the current syntax or how difficult it would be to 
implement.

-- 
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/


Post a reply to this message

From: Peter Popov
Subject: Re: A pattern for each color component
Date: 17 Mar 2000 02:46:27
Message: <uuHROAdW7u43Bf5Adcmh+NsBeW1d@4ax.com>
On Thu, 16 Mar 2000 17:41:59 -0500, Chris Huff
<chr### [at] yahoocom> wrote:

>An "additive" pattern would add the colors/densities/normals/whatever 
>together instead of averaging them together. You could subtract a 
>"channel" by using negative numbers for it. Maybe "multiplicative" would 
>also be good.
>
>It would also be nice to be able to specify the way they are combined by 
>using an isosurface function, but I don't know how this would be 
>specified with the current syntax or how difficult it would be to 
>implement.

#declare R_Bozo=function{pigment{bozo{color_map{[0 Red][1 Black}}}
#declare B_Wood=function{pigment{wood{color_map{[0 Blue][1 Black}}}
#declare G_Agate=function{pigment{agate{color_map{[0 Green][1 Black}}}

sphere
{0,1 pigment{function{R_Bozo(x,y,z)+B_Wood(x,y,z)+G_Agata(x,y,z)}}}

Sorry_my_space_bar_died_gotta_fix_it


Peter Popov
pet### [at] usanet
ICQ: 15002700


Post a reply to this message

From: Bouf
Subject: Re: A pattern for each color component
Date: 17 Mar 2000 02:58:34
Message: <38D1E9DC.1E3BA88E@nanterre.marelli.fr>
Peter Popov wrote:
> 
> 
> #declare R_Bozo=function{pigment{bozo{color_map{[0 Red][1 Black}}}
> #declare B_Wood=function{pigment{wood{color_map{[0 Blue][1 Black}}}
> #declare G_Agate=function{pigment{agate{color_map{[0 Green][1 Black}}}
> 
> sphere
> {0,1 pigment{function{R_Bozo(x,y,z)+B_Wood(x,y,z)+G_Agata(x,y,z)}}}

I think that this doesn't work for the effect Warp is looking for...

Try something like this:

#declare R_Bozo=pigment{bozo{color_map{[0 Red*3][1 Black}}
#declare B_Wood=pigment{wood{color_map{[0 Blue*3][1 Black}}
#declare G_Agate=pigment{agate{color_map{[0 Green*3][1 Black}}

sphere
{0,1 pigment{
	average
	pigment_map {
		[1 R_Bozo]
		[1 B_Wood]
		[1 G_Agate]
	}
}

But there is no solution for the filter (or transmit) channel...

Bouf.


Post a reply to this message

From: J  Grimbert
Subject: Re: A pattern for each color component
Date: 17 Mar 2000 08:31:01
Message: <38D2339D.62E810AF@atos-group.com>
Chris Huff wrote:
> 
> 
> An "additive" pattern would add the colors/densities/normals/whatever
> together instead of averaging them together. You could subtract a
> "channel" by using negative numbers for it. Maybe "multiplicative" would
> also be good.

And a mininal as well as a maximal (component by component, 
so minimal of Red and Blue leave Black, and
maximal of Yellow and Blue leave White...)


Post a reply to this message

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