|
![](/i/fill.gif) |
clipka <nomail@nomail> wrote:
> This is a Gamma problem: Paint shows you the actual values stored in the image
> file, which are typically gamma-corrected for a display gamma of ~2.2, while
> POV-Ray works with linear color values.
> You need to gamma-"un-correct" the values from Paint before using them in
> POV-Ray; the following code should do the job:
> color rgb <pow(R/255,GAMMA),pow(G/255,GAMMA),pow(B/255,GAMMA)>
> Don't know by heart whether you need to use GAMMA=2.2 or GAMMA=1/2.2 though.
Isn't assumed_gamma used for this exact purpose? AFAIK it makes the
correction to all colors used in the SDL.
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
>> You need to gamma-"un-correct" the values from Paint before using them in
>> POV-Ray; the following code should do the job:
>
>> color rgb <pow(R/255,GAMMA),pow(G/255,GAMMA),pow(B/255,GAMMA)>
>
>> Don't know by heart whether you need to use GAMMA=2.2 or GAMMA=1/2.2
>> though.
>
> Isn't assumed_gamma used for this exact purpose?
No.
> AFAIK it makes the
> correction to all colors used in the SDL.
Yes, it does gamma correction on the *output* image, but it makes no attempt
to do the inverse of this on any input values you provide. It assumes the
values you type in are in linear colour space (ie <1,0.5,0> means the red
channel is twice as bright as the green channel). If you choose a value
from Paint/PowerPoint/whatever, it is definitely not in linear colour space,
so you need to do the correction clipka showed to get the colours in the
output to match the input - check the image in my other post comparing
PowerPoint colours to POV with and without the above correction, it's fairly
obvious.
Post a reply to this message
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
Warp <war### [at] tag povray org> wrote:
> Isn't assumed_gamma used for this exact purpose? AFAIK it makes the
> correction to all colors used in the SDL.
Some things to consider about assumed_gamma:
- It affects all colors, not just those you picked from Paint.
- In POV 3.6, it affects even output colors (except in the preview, which is
governed by Display_Gamma).
- In POV 3.7, its use is deprecated, to be superseded by File_Gamma.
Post a reply to this message
|
![](/i/fill.gif) |