POV-Ray : Newsgroups : povray.beta-test : Gamma of interpolated colors in color maps : Re: Gamma of interpolated colors in color maps Server Time
29 Jun 2024 05:32:08 EDT (-0400)
  Re: Gamma of interpolated colors in color maps  
From: clipka
Date: 21 Dec 2010 07:26:16
Message: <4d109ce8$1@news.povray.org>
Am 21.12.2010 12:00, schrieb scott:

> Agreed, as I wrote already it might be a good idea for an additional
> keyword (to be used in colour maps) that specifies whether you want
> physical linear interpolation (which will "look" non-linear) or some
> other interpolation type suited to the human visual system. This would
> be totally separate to any gamma settings, as it has nothing to do with
> gamma.

Not sure whether I mentioned it here or not, but such a mechanism has 
already been on my agenda for a while (it will not make it into 3.7.0 
proper though); the syntax would be something along the lines of

   pigment {
     gradient y
     color_map {
       perceptual
       [0.0 rgb 0]
       [0.5 rgb 1]
       [1.0 rgb 0.5]
     }
   }

(The example also showcases the problem with the poly_wave workaround 
you mention, which only works for gradients running from [0.0 rgb 0] to 
[1.0 Some_Color].)

Pigment maps will need the same mechanism, btw. I also thought about 
whether it would make sense in texture maps, but I guess that's too 
complicated to implement, for too little gain.

>> As for whether eg. surface shading looks more realistic with the new
>> gamma handling or the old one, it would be interesting to see some
>> actual comparisons with photographs.
>
> The problem with that kind of test is that you are also testing the
> surface lighting equations used in POV (which are a simplification of
> real surfaces). I wasn't aware there was any doubt as to whether the new
> gamma was more accurate (you can simply test it with a black/white
> checkerboard next to 50% grey).

There's also the problem that photographs may be non-linear as well; 
digital cameras aren't typically calibrated, and photographic paper has 
non-linearities, too.

A typical reference image would be the Cornell Box (see 
http://www.graphics.cornell.edu/online/box/).


Post a reply to this message

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