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:17:47 EDT (-0400)
  Re: Gamma tutorial for the 3.7 documentation?  
From: clipka
Date: 8 Sep 2009 16:07:13
Message: <4aa6b971$1@news.povray.org>
Warp schrieb:
>   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...
> }

One problem with this is POV-Ray's way of handling colors very much the 
same as vectors. So you may have 3rd-party macros expecting and/or 
returning vectors instead of colors, which will pretty much mess up the 
whole thing:

- You can't gamma-correct vectors.
- At the moment where the vectors are turned into colors, the 
information about which file they were defined will be long forgotten.
- Some vectors intended to become colors may be subject to math (e.g. to 
tune the brightness of a light) before being explicitly turned into 
colors, but gamma-correction will normally have to be applied before the 
math.

I agree that this would be beneficial, but with the current SDL 
structure it would open up a can of worms, and probably cause more 
confusion than ease of use. (One more reason why I do advocate a 
dedicated syntax for color literals in a POV 4 SDL)


Post a reply to this message

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