POV-Ray : Newsgroups : povray.beta-test : Gamma of interpolated colors in color maps : Re: Gamma of interpolated colors in color maps Server Time
26 Jun 2024 12:51:10 EDT (-0400)
  Re: Gamma of interpolated colors in color maps  
From: Warp
Date: 20 Dec 2010 02:38:25
Message: <4d0f07f0@news.povray.org>
Ive <"ive### [at] lilysoftorg"> wrote:
> On 19.12.2010 21:09, Warp wrote:
> >    I don't remember if this has been discussed before, but the new gamma
> > handling might cause headaches when using color maps and other interpolated
> > maps.

> It has been stated numerous times that assumed_gamma should not be used 
> for artistic purpose.

  You write as if I didn't know that.

  The problem is: If you wanted the same vivid high-contrast renders as
you get with assumed_gamma 2.2, but without "abusing" it, how do you do
it in pov3.7? Adjusting individual colors is not going to do it because
it doesn't change gradients, shading and other such interpolated values.

> What you actually want is a non-linear gradient 
> and there are quite a lot possibilities for this e.g.

> pigment {
>    spherical
>    poly_wave 2
>    color_map {
>      [0 rgb 0]
>      [1 rgb 1]
>    }
> }

  That makes it look closer to the image with assumed_gamma 2.2, but it's
still brighter, for some reason. Compare:

http://warp.povusers.org/images/glassblob1.jpg
http://warp.povusers.org/images/glassblob3.jpg

  (Both rendered with pov3.7, the first one uses assumed_gamma 2.2, in the
second one the individual colors have been adjusted, and the poly_wave
function applied to the color map of the floor.)

  Of course without the poly_wave specifier, that second image looks like
this:

http://warp.povusers.org/images/glassblob2.jpg

  Now tell me, from glassblob2.jpg and glassblob3.jpg, which one of the
circular gradients looks more linear?

  Mind you, on my CRT "rgb 0.5", as rendered by pov3.7 without
"assumed_gamma 2.2" (or "gamma 2.2" specified in the color) *does* give
an almost perfect 50% gray, when compared to a test pattern (of
alternating horizontal black and white lines). However, the circular
pattern in the glassblob2.jpg still looks very non-linear, like most of
the circle was an almost even shade of gray, only very slowly darkening
towards the edges, and then abruptly fading to black.

  The same is true for the colored spheres: The visible area between
the highlight and the shadow looks almost uniformly colored, with only
a very slow darkening towards the far side of the sphere, and then there's
a quite abrupt transition from that color to the dark shade of the
shadowed part of the sphere. In glassblob1.jpg the darkening is much
more pronounced, giving an impression of higher contrast and saturation.

  "assumed_gamma 2.2" might not be intended for artistic purposes, but
can you give an alternative solution to get the same contrast and vivid
saturation of glassblob1.jpg with pov3.7?

  What I fear is that the new gamma handling will be mostly abhorred by
people, and everybody will simply turn it off in all of their scenes.
I know that I will most probably do so, the more I use it.

> And you did read the message that assumed_gamma is deprecated?

  Of course you could also specify "#version 3.6" to get the same effect,
but I'm not sure if it will affect something else as well.

> >    I fear that most people will simply learn to always write the magical
> > line "global_settings { assumed_gamma 2.2 }" at the beginning of every
> > scene (or whatever will end up being the proper way in the final version),
> > making the whole gamma correction thing rather moot.
> >

> And I'm well aware that a lot of POV-Ray users (among them some of the 
> most well known) did in past 3.6 times always write
> global_setting {assumed_gamma 1.0}
> into the scene file. No trouble for them.

  If people want some type of behavior from povray, shouldn't that behavior
be officially supported in some way, rather than people being forced to do
it via a deprecated method which is officially frowned upon?

-- 
                                                          - Warp


Post a reply to this message

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