|
![](/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) |