![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"SharkD" <mik### [at] gmail com> schreef in bericht
news:4b0eec8a$1@news.povray.org...
> That's a very interesting idea. I might try and create such a tool.
>
and then in sRGB space?
Thomas
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
El 26/11/09 22:01, SharkD escribió:
> That's a very interesting idea. I might try and create such a tool.
>
I just found an online tool that could be used as inspiration:
http://javascript.about.com/library/blpaint4.htm
Regards,
--
Jaime Vives Piqueres
http://www.ignorancia.org
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Thanks for the reactions
@Jaime: that makes it a lot easier, indeed, hadn't thought that was possible.
I'm going to experiment with that.
@Michael: I'll be waiting in anticipation... ;-)
Grtz, Joost
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
joost_1972 wrote:
> Hi,
>
> I was wondering if anybody could help me to a color mixing tool? I've found
> enough color pickers with all kind of options, but non with the same options you
> have in real life. When I have a certain color I often just want to add a hint
> of an other color, as I do with painting, but can find it quite hard to get the
> right touch with the numbers.
>
> Thanks, Joost
Sometimes when I need a real-life color, I will open a photo with
IrfanView and click on the color I want, to read the RGB values. I take
those values and convert them in POV like so:
rgb <128,96,250>/256
If you want to mix colors this way, just use Gimp or another paint
program and use the eyedropper tool to the get RGB values, and divide
that color vector by 256.
Sam
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
stbenge wrote:
> If you want to mix colors this way, just use Gimp or another paint
> program and use the eyedropper tool to the get RGB values, and divide
> that color vector by 256.
Actually, divide by 255 since there are 256 colors, but they are in the
range 0-255. #FFFFFF; = <255,255,255>/255 = <1,1,1>
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
CShake <cshake+pov### [at] gmail com> wrote:
> stbenge wrote:
> > If you want to mix colors this way, just use Gimp or another paint
> > program and use the eyedropper tool to the get RGB values, and divide
> > that color vector by 256.
>
> Actually, divide by 255 since there are 256 colors, but they are in the
> range 0-255. #FFFFFF; = <255,255,255>/255 = <1,1,1>
Yes! This is a very common mistake that I've seen in lots of code (in various
languages) over the years.
Here are a couple of colour mixing formulas that I find useful. In these
formulas, C, C0 & C1 are colour vectors, and A is a float, 0 <= A <= 1.
//A weighted mean between colours C0 and C1
C0 * A + C1 * (1-A)
//A muted version of colour C
rgb A + C * (1 - A)
In POV-Ray, it's possible to use negative colours, eg rgb<-1, 0, 0> is identical
to rgb <0, 1, 1>. It's also possible to use colours with components greater than
1, but such colours will get clipped in strong light, so it's probably a good
idea to avoid using this "feature".
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Thanks, I already used an external tool to get my rgb values (and divided by
255, pfewww), but being able to weigh colors and use them in formula's is new to
me, and having experimented with that, its really giving me extra possibilities,
very glad with that (I think I'll leave the negative and > 1 colors for what
they are, I'm happy using the classic range)
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> Sometimes when I need a real-life color, I will open a photo with
> IrfanView and click on the color I want, to read the RGB values. I take
> those values and convert them in POV like so:
>
> rgb <128,96,250>/256
You do realise that photos are usually in sRGB colour space and POV expects
linear colour values? By simply pasting the numbers into POV the colours in
the resulting image are going to be washed out and probably of the incorrect
hue...
Better to do a simple inverse gamma correction inside POV (the 2.2 here
roughly approximates the sRGB -> linear conversion):
rgb <pow(128/255,2.2),pow(96/255,2.2),pow(250/255,2.2)>
That way the colours in your POV output image should match much better what
you picked in the first place.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"scott" <sco### [at] scott com> schreef in bericht
news:4b13a82f$1@news.povray.org...
> You do realise that photos are usually in sRGB colour space and POV
> expects linear colour values? By simply pasting the numbers into POV the
> colours in the resulting image are going to be washed out and probably of
> the incorrect hue...
>
> Better to do a simple inverse gamma correction inside POV (the 2.2 here
> roughly approximates the sRGB -> linear conversion):
>
> rgb <pow(128/255,2.2),pow(96/255,2.2),pow(250/255,2.2)>
>
> That way the colours in your POV output image should match much better
> what you picked in the first place.
>
This may even be true (in my experience) with any color picker external to
POV-Ray. Bearing that in mind, I wrote a little macro using your line of
code:
#macro ColorCorrect(ColorIn)
rgb <pow(ColorIn.red/255, 2.2), pow(ColorIn.green/255, 2.2),
pow(ColorIn.blue/255, 2.2)>
#end
Which you can use then whenever you pick an external color, e.g.:
#declare ColorIn = <0.0, 128, 128>; //the color picked externally
sphere {
0.0, 1
texture {
pigment {ColorCorrect(ColorIn) }
finish{
specular 0.2
roughness 0.001
}
}
}
Thomas
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> This may even be true (in my experience) with any color picker external to
> POV-Ray.
Yes mine too, actually I first came across this (a long time ago) when
trying to put a POV generated file into a power point presentation. The
colour of the main object in the POV file was meant to exactly match some
corporate colour already used in the PPT (as RGB of course).
> Bearing that in mind, I wrote a little macro using your line of code:
>
> #macro ColorCorrect(ColorIn)
> rgb <pow(ColorIn.red/255, 2.2), pow(ColorIn.green/255, 2.2),
> pow(ColorIn.blue/255, 2.2)>
> #end
That's a neat idea. I think there was a discussion a while back about
having another SDL keyword to specify that literal colours and image maps
are to be interpreted as sRGB rather than linear values.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |