POV-Ray : Newsgroups : povray.beta-test : Gamma in POV-Ray 3.6 vs. 3.7 : Re: Gamma in POV-Ray 3.6 vs. 3.7 Server Time
6 Jul 2024 04:29:23 EDT (-0400)
  Re: Gamma in POV-Ray 3.6 vs. 3.7  
From: clipka
Date: 12 Sep 2009 04:13:42
Message: <4aab5836$1@news.povray.org>
Christian Froeschlin schrieb:
> 
> color
> {
>   rgb      <0.5,0.5,0.5>
>   gamma    2.2
>   transmit 0.5
> }
> 
> However, when considering to add more color models
> that might even make sense.

That might indeed be a way to go. But maybe that's better left to a 
new-generation SDL.

>   color rgbt! <0.5,0.5,0.5,0.2>

That would be ambiguous in cases like

     #declare MyBoolVariable = false;
     color rgbt!MyBoolVariable

Having the gamma adjustment tied to the color keywords also has its 
drawbacks, because...:

> It looks slightly less cryptic to me and might better
> work with data which is not literal but from some vector
> variable or function.

I perfectly disagree on this one: If you take a color from anywhere 
outside linear color range, you should *immediately* gamma-adjust it to 
linear, before you store it anywhere. If you just want to store it, it 
doesn't make much of a difference, but in case you want to perform any 
math on it, it is more likely to give the correct results when you do 
those computations on linear values.

Besides from that, a dedicated operator would give us the freedom to to 
either, at the user's discretion: Gamma-adjust the very literal color 
value right away, gamma-adjust in the middle of some computations, or 
gamma-adjust when it comes to actually using it as a color.

>> If we'd go for such a syntax, it might also be prudent to merge the 
>> "file_gamma" and "color_gamma" into a single "gamma" statement.
> 
> Then "input_gamma" would probably be more distinct to avoid
> confusion with display gamma.

I'm not happy with that term, as to me it would apply only to files. 
 From the perspective of an SDL script, literal colors are not input, 
but part of the program. (You wouldn't consider constants in a C program 
to be input of that program, would you?)

As for "gamma" possibly being mistaken to indicate display gamma, I 
think if gamma handling is properly explained in the documentation, and 
made clear enough that SDL gamma settings will *not* affect the 
gamma-adjustment applied to the preview or output file, this should 
actually be a non-issue.


Post a reply to this message

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