POV-Ray : Newsgroups : povray.beta-test : Gamma tutorial for the 3.7 documentation? : Re: Gamma tutorial for the 3.7 documentation? Server Time
5 Oct 2024 00:40:16 EDT (-0400)
  Re: Gamma tutorial for the 3.7 documentation?  
From: Warp
Date: 8 Sep 2009 15:37:04
Message: <4aa6b25f@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Warp schrieb:
> >> Likewise, how to pre-gamma-correct color values from
> >> other programs (such as color pickers).
> > 
> >   About that... I wonder if POV-Ray should offer some kind of function to
> > do that, for convenience. In the same way as eg. degrees() and radians()
> > exist for convenience, even though they don't really save a whole lot of
> > work compared to if they didn't exist.

> I think that definitely yes, POV-Ray should have such a feature.

  One problem I see with a gamma-precorrection function is that it can be
tedious to use if tons of colors have to be specified. For example, imagine
specifying a large color_map with tens of colors, each one of which would
have to be enclosed with some function call.

  Another option I can think of is to have some #-command which turns on
gamma pre-correction for all colors from that point forward. It would be
local to the current file, so #included files wouldn't be affected. That
way you could do something like:

#assume_gamma 2.2

color_map
{ [0 rgb <whatever>]
  [.1 rgb <whatever>]
  etc...
}

-- 
                                                          - Warp


Post a reply to this message

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