POV-Ray : Newsgroups : povray.general : rgb color looks dark Server Time
30 Jul 2024 10:24:47 EDT (-0400)
  rgb color looks dark (Message 11 to 13 of 13)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Warp
Subject: Re: rgb color looks dark
Date: 13 Jul 2009 10:13:29
Message: <4a5b4109@news.povray.org>
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

From: scott
Subject: Re: rgb color looks dark
Date: 14 Jul 2009 06:17:13
Message: <4a5c5b29$1@news.povray.org>
>> 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

From: clipka
Subject: Re: rgb color looks dark
Date: 14 Jul 2009 09:45:00
Message: <web.4a5c8b0bfb16eaf5fee4dc70@news.povray.org>
Warp <war### [at] tagpovrayorg> 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

<<< Previous 10 Messages Goto Initial 10 Messages

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