|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <3a151e4a@news.povray.org>, "Wlodzimierz ABX Skiba"
<abx### [at] abxartpl> wrote:
> these values 1/3, 2/3 and 1 are in rgb space - each equal for red,
> green, blue, right ?
> but converted to grayscale they are not this values for gray, right ?
I'm not sure which conversion is used. A simple average would make the
most sense for this application, because it would leave gray colors
untouched, but it might use the same function used to convert color
images to grayscale(if it does, it should be changed to use the average,
in my opinion). I will check this out later...
> than there should be also in POV function grayscale( color ) with
> exactly the same algorithm
I have been planning this function as part of the color conversion
patch(I have convert_colors() done, I'm trying to work up some good demo
scenes), but there is one small problem: POV doesn't always use the same
conversion function.
--
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/
<><
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Rick Mabry wrote:
> ABCABCABCABC
> BCABCABCABCA
> CABCABCABCAB
> ABCABCABCABC
> BCABCABCABCA
Eww, this is striped! If ya want three colors I'd say go with hexagon.
--
David Fontaine <dav### [at] faricynet> ICQ 55354965
My raytracing gallery: http://davidf.faricy.net/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <chrishuff-9268FA.17205617112000@news.povray.org>, Chris
Huff <chr### [at] maccom> wrote:
> I'm not sure which conversion is used... I will check this out later...
The GREY_SCALE() macro is used, which uses the function:
Gray = 0.297*R + 0.589*G + 0.114*B
I have changed this to use (R+G+B)/3 in my version.
> I have been planning this function as part of the color conversion
> patch
And just finished doing it.
> POV doesn't always use the same conversion function.
I used the GREY_SCALE() macro mentioned above. You could also use the
convert_color() function with HSL or HSV to get a grayscale
representation...just extract the right channel.
BTW, I named the function "grayscale()", I suppose someone is going to
want "greyscale()" to be added too...
--
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/
<><
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <3A15BCBE.762D9840@faricy.net>, David Fontaine
<dav### [at] faricynet> wrote:
> Rick Mabry wrote:
>
> > ABCABCABCABC
> > BCABCABCABCA
> > CABCABCABCAB
> > ABCABCABCABC
> > BCABCABCABCA
>
> Eww, this is striped! If ya want three colors I'd say go with hexagon.
Umm, hexagon is, well, hexagonal. And both hexagon and the ordinary
checkers are "striped". It is very possible he *wants* a striped pattern
of squares with more than one color.
BTW, I have been thinking about some possible new patterns:
random_checkers, random_hexagons, etc...they would take a list of any
number of items and choose one of them for each tile. Also, replace the
old "tiles" pattern(which isn't used any more) with a new one that lets
you specify any number of items and the offset for each row.
What do you think?
--
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/
<><
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Chris Huff wrote:
> Umm, hexagon is, well, hexagonal. And both hexagon and the ordinary
> checkers are "striped". It is very possible he *wants* a striped pattern
> of squares with more than one color.
Yes it is. I was just saying eww IMHO. :)
Hexagon has no two cells of the same color touching, even just by a corner.
As for regular checker, it sort of has diagonal stripes, but those stripes
are not isolated so they don't stick out. :)
> BTW, I have been thinking about some possible new patterns:
> random_checkers, random_hexagons, etc...they would take a list of any
> number of items and choose one of them for each tile. Also, replace the
> old "tiles" pattern(which isn't used any more) with a new one that lets
> you specify any number of items and the offset for each row.
> What do you think?
Sure
--
David Fontaine <dav### [at] faricynet> ICQ 55354965
My raytracing gallery: http://davidf.faricy.net/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Chris Huff wrote in message ...
> > [ grayscale problem ]
> I have changed this to use (R+G+B)/3 in my version.
> > [ function request ]
> And just finished doing it.
> > [ discusion from p.u-p ]
> You could also use the convert_color()
thanks for your effort :-)
ABX
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Fri, 17 Nov 2000 18:40:42 -0500, Chris Huff wrote:
>In article <chrishuff-9268FA.17205617112000@news.povray.org>, Chris
>Huff <chr### [at] maccom> wrote:
>
>> I'm not sure which conversion is used... I will check this out later...
>
>The GREY_SCALE() macro is used, which uses the function:
>Gray = 0.297*R + 0.589*G + 0.114*B
>I have changed this to use (R+G+B)/3 in my version.
For pure grayscale values (R==G==B) the results are identical.
E.g.:
0.33*0.297 + 0.33*0.589 + 0.33*0.114 == 0.33
(0.33+0.33+0.33)/3 = 0.33
I suggest leaving GREY_SCALE() as it is.
hp
--
| | | hjp### [at] wsracat | -- Lutz Donnerhacke in dasr.
__/ | http://www.hjp.at/ |
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <slr### [at] tealhhjpat>,
hjp### [at] SiKituwsracat (Peter J. Holzer) wrote:
> For pure grayscale values (R==G==B) the results are identical.
> E.g.:
>
> 0.33*0.297 + 0.33*0.589 + 0.33*0.114 == 0.33
Correct, but I think people will expect rgb < 0.5, 0, 0> to have the
same effect as rgb < 0, 0.5, 0>...
However, I will change it back and just leave my code in there in case
someone wants to use it later.
> I suggest leaving GREY_SCALE() as it is.
GREY_SCALE() was not modified, only the pigment_pattern() function.
--
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/
<><
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Sun, 19 Nov 2000 18:00:20 -0500, Chris Huff wrote:
>In article <slr### [at] tealhhjpat>,
>hjp### [at] SiKituwsracat (Peter J. Holzer) wrote:
>
>> For pure grayscale values (R==G==B) the results are identical.
>> E.g.:
>>
>> 0.33*0.297 + 0.33*0.589 + 0.33*0.114 == 0.33
>
>Correct, but I think people will expect rgb < 0.5, 0, 0> to have the
>same effect as rgb < 0, 0.5, 0>...
I wouldn't. But maybe I have used a greyscale monitor too long.
hp
--
| | | hjp### [at] wsracat | -- Lutz Donnerhacke in dasr.
__/ | http://www.hjp.at/ |
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Peter J. Holzer <hjp### [at] sikituwsracat> wrote:
> On Fri, 17 Nov 2000 18:40:42 -0500, Chris Huff wrote:
>>In article <chrishuff-9268FA.17205617112000@news.povray.org>, Chris
>>Huff <chr### [at] maccom> wrote:
>>
>>> I'm not sure which conversion is used... I will check this out later...
>>
>>The GREY_SCALE() macro is used, which uses the function:
>>Gray = 0.297*R + 0.589*G + 0.114*B
>>I have changed this to use (R+G+B)/3 in my version.
> For pure grayscale values (R==G==B) the results are identical.
> E.g.:
> 0.33*0.297 + 0.33*0.589 + 0.33*0.114 == 0.33
> (0.33+0.33+0.33)/3 = 0.33
This is because the coefficients sum to 1. Any set of coefficients that sum
to 1 will work if you're using the same value for R, G, and B. It's when
they're not that you need something else. Consider colors <1,1,0> and
<1,0,1> By 1/3rds these are the same grey (.667), but by the GREY_SCALE()
macro, they're not. I prefer the latter, because Yellow (the first color)
and Magenta (the second) aren't quite the same in Grey (Yellow is brighter.
This is because of how our eyes perceive colors and light)
I'm assuming the values of the macro were chosen based on some real world
testing, but I could be wrong. In any case, they give good results.
Geoff
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|