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:44:44 EDT (-0400)
  Re: Gamma in POV-Ray 3.6 vs. 3.7  
From: Christian Froeschlin
Date: 11 Sep 2009 21:17:05
Message: <4aaaf691$1@news.povray.org>
So, if an image is loaded by explicitely specifying a file_gamma
for it of 1.0, a pixel value 128 would end up as color value 0.5?
Could be helpful for the non-obvious data containers ;)

>     color rgbt <0.5,0.5,0.5, 0.2> gamma 2.2

Or possibly

   color rgbtg <0.5,0.5,0.5,0.2,2.2>

Too bad green and gamma start with the same letter ;)

> Then again, maybe the best way to go would be to introduce a new syntax 
> for vectors/colors to be subject to some default gamma correction, as in:
> 
> default_settings {
>   color_gamma 2.2
> }

Or possibly #default color {gamma 2.2}, although that implies
that color supports a fully blown "block" syntax similar to

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.

> #declare MyPigment = pigment { color rgbt #<0.5,0.5,0.5,0.2> }

Or possibly

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

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

> Maybe we can even go so far as to allow HTML colors in SDL code? Those 
> would automatically be subject to gamma correction.

I could live without HTML colors. New syntax for the
same thing but with with extra limitations in range?

> 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.


Post a reply to this message

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