POV-Ray : Newsgroups : povray.general : assumed_gamma Server Time
4 Aug 2024 14:26:53 EDT (-0400)
  assumed_gamma (Message 11 to 13 of 13)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Christopher James Huff
Subject: Re: assumed_gamma
Date: 5 Jun 2003 14:57:14
Message: <cjameshuff-9284A1.13483305062003@netplex.aussie.org>
In article <3edf63f2$1@news.povray.org>,
 "Slashdolt" <jer### [at] questsoftwarecom> wrote:

> Thanks for the information, and thanks to everyone else for providing input.
> 
> Howerver, if you look at <povray>\scenes\incdemo\woods\woods2.pov, they set
> the "assumed_gamma" to 2.2.  If you use assumed_gamma 1.0 for any of the
> T_Wood textures, they are way too bright, and many look purplish.  For that
> reason, I generally don't use any of them, and create my own wood textures
> instead.

Those textures probably predate versions of POV-Ray with gamma 
correction. They were designed to look good on a screen with a gamma of 
2.2, so they are already "corrected" for that gamma, and applying the 
gamma correction just screws them up. This is why you can use other 
values for assumed_gamma: support of older scenes designed without gamma 
correction. The include file should probably be corrected or at least 
give a warning.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Patrick Elliott
Subject: Re: assumed_gamma
Date: 5 Jun 2003 16:26:39
Message: <MPG.19495507c511c9d8989819@news.povray.org>
In article <cja### [at] netplexaussieorg>, 
cja### [at] earthlinknet says...
> In article <3edf63f2$1@news.povray.org>,
>  "Slashdolt" <jer### [at] questsoftwarecom> wrote:
> 
> > Thanks for the information, and thanks to everyone else for providing input.
> > 
> > Howerver, if you look at <povray>\scenes\incdemo\woods\woods2.pov, they set
> > the "assumed_gamma" to 2.2.  If you use assumed_gamma 1.0 for any of the
> > T_Wood textures, they are way too bright, and many look purplish.  For that
> > reason, I generally don't use any of them, and create my own wood textures
> > instead.
> 
> Those textures probably predate versions of POV-Ray with gamma 
> correction. They were designed to look good on a screen with a gamma of 
> 2.2, so they are already "corrected" for that gamma, and applying the 
> gamma correction just screws them up. This is why you can use other 
> values for assumed_gamma: support of older scenes designed without gamma 
> correction. The include file should probably be corrected or at least 
> give a warning.
> 
> 

It should be noted as well that some things like 'Brown' when used in 
them seem to pre-date even decent VGA monitors (where the color was also 
squeezed into 8-bit color spaces), so the resulting color has about as 
much to do with real Brown as a modern cell phone does with a rotary 
dial. Unfortunately many of those colors propagate through programs 
because they are also part of the 665 standards in Linux, part of the 128 
or so in HTML, part of the list supplied with wxPython, etc. Twenty years 
ago the 'may' have looked right on whatever freaky display that they 
where used with, now they don't even accurately describe the original 
color they tried to produce. Most of those textures use those old 
standards and thus also look absolutely nothing like what they may have 
back then.

-- 
void main () {

    call functional_code()
  else
    call crash_windows();
}


Post a reply to this message

From: Slashdolt
Subject: Re: assumed_gamma
Date: 6 Jun 2003 13:23:47
Message: <3ee0ce23$1@news.povray.org>
Very interesting suggestion!  Thanks!

-- 
Slash
"Ive" <ive### [at] lilysoftcom> wrote in message news:3edf8beb@news.povray.org...
>
> Just to make it clear, I was talkin' all the time about the display_gamma
> setting that should be in the povray ini-file. The assumed gamma in the
> global settings statement of your scene file should be 1.0 as noted in the
> docs to make sure PoV does lighting (and also radiosity) calculation
within
> a linear color space (thats the way it is in the "real world").
>
>
> > Howerver, if you look at <povray>\scenes\incdemo\woods\woods2.pov, they
set
> > the "assumed_gamma" to 2.2.  If you use assumed_gamma 1.0 for any of the
> > T_Wood textures, they are way too bright, and many look purplish.  For
that
> > reason, I generally don't use any of them, and create my own wood
textures
> > instead.
>
> Yes, because they are quite *old*. I guess some of them go back to the
time of
> DKBtrace the predecessor of PoV-Ray.
>
>
> > So...  I guess that brings me back to my original question.
> >
>
> I have done it this way:
>
> global_settings {
>   assumed_gamma 1.0
> }
>
> #declare OldGamma = 2.2;  // to compensate for old non-linear color
definitions
>
>
> // some helper macros for conversion
>
> #macro RGB(C)
>   rgb <pow(C.red, OldGamma), pow(C.green, OldGamma), pow(C.blue,
OldGamma)>
> #end
>
> #macro RGBF(C)
>   rgbf <pow(C.red, OldGamma), pow(C.green, OldGamma), pow(C.blue,
OldGamma), RGB.filter>
> #end
>
> #macro RGBT(C)
>   rgbt <pow(C.red, OldGamma), pow(C.green, OldGamma), pow(C.blue,
OldGamma), RGB.transmit>
> #end
>
>
> and then use search'n'replace to change e.g. the color statements from
woodmaps.inc like this
> this:
>
> #declare M_Wood1A =
> color_map {
>     [0.0, 0.1 color RGB(<0.88, 0.60, 0.40>)
>               color RGB(<0.88, 0.60, 0.40>)]
>     [0.1, 0.9 color RGB(<0.88, 0.60, 0.40>)
>               color RGB(<0.60, 0.30, 0.20>)]
>     [0.9, 1.0 color RGB(<0.60, 0.30, 0.20>)
>               color RGB(<0.60, 0.30, 0.20>)]
> }
>
> this is done within a few seconds and you they still work for old scenes
in the old way by setting
>
> global_settings {
>   assumed_gamma 2.0   // or whatever
> }
>
> #declare OldGamma = 1;
>
> You can even use these macros if you are so used to think in colors in the
non-linear way but want to
> put assumed_gamma 1.0 into global_setting for some reason.
>
>
> hope this helps
> -Ive
>
>
>


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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