POV-Ray : Newsgroups : povray.general : rgb color looks dark : Re: rgb color looks dark Server Time
30 Jul 2024 12:19:23 EDT (-0400)
  Re: rgb color looks dark  
From: scott
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

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