POV-Ray : Newsgroups : povray.beta-test : Struggling with gamma... : Re: Struggling with gamma... Server Time
30 Jun 2024 13:13:10 EDT (-0400)
  Re: Struggling with gamma...  
From: clipka
Date: 26 Jun 2010 06:22:05
Message: <4c25d4cd$1@news.povray.org>
Am 26.06.2010 10:12, schrieb Gyscos:
> Hello there !
> I tried, I tried, I really tried to understand how gamma works...
> How could I switch it off ?... So this scene would give a perfectly mid-gray
> image :
>
> camera {
>    location -z
>    look_at 0
> }
>
> box {
>    -0.5
>    0.5
>    pigment { rgb 0.5 }
>    finish { ambient 1 }
> }

This scene actually /does/ give a perfectly mid-gray image... as long as 
we're talking about physical light intensity, rather than perceptual 
brightness ;-)

To really get the scene to look the way you want it to, use:

    pigment { rgb pow(0.5, 2.2) }

Future betas will also provide an extended color syntax for this purpose:

    pigment { rgb 0.5 gamma 2.2 }

> I tried File_Gamma=1 Display_Gamma=1, and it seemed to work fine in gimp and in
> the window image viewer, but then I try to see the image in firefox and it is
> way to bright - so firefox can't handle gamma data ?

Let me guess - you used PNG file output? In that case it is a sign that 
/Firefox/ is getting it right, while gimp and the image viewer are not. 
The File_Gamma setting does not affect PNG output very much (provided 
that your image processing software is handling gamma right), except for 
banding artifacts.


Post a reply to this message

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