POV-Ray : Newsgroups : povray.advanced-users : Converting pre-gamma scenes to assumed_gamma = 1? Server Time
31 Oct 2024 23:31:12 EDT (-0400)
  Converting pre-gamma scenes to assumed_gamma = 1? (Message 1 to 10 of 13)  
Goto Latest 10 Messages Next 3 Messages >>>
From: SharkD
Subject: Converting pre-gamma scenes to assumed_gamma = 1?
Date: 8 Jun 2010 23:57:28
Message: <4c0f1128@news.povray.org>
Any general guidelines on converting scenes created before assumed_gamma 
or 3.7 were in wide use to the new defaults?


-- 
http://isometricland.com


Post a reply to this message

From: clipka
Subject: Re: Converting pre-gamma scenes to assumed_gamma = 1?
Date: 9 Jun 2010 07:26:23
Message: <4c0f7a5f@news.povray.org>
Am 09.06.2010 05:57, schrieb SharkD:
> Any general guidelines on converting scenes created before assumed_gamma
> or 3.7 were in wide use to the new defaults?

That's a bit problematic: Before "assumed_gamma 1.0" or the most recent 
3.7 betas, the color math was simply /wrong/. So in order to get exactly 
the same result, you'd have to mimick that wrong color math - which 3.7 
refuses to, except for legacy scenes using "#version 3.6" (or anything 
smaller than 3.7) and "assumed_gamma 2.2".

If you do want to port the scene to the right math, here's what I expect 
to be the most important steps:

(0) In the ini-file, set the "Display_Gamma" to whatever fits your 
system; set "File_Gamma" to the same. (Ideally, your system should have 
a Display_Gamma of 2.2.)

(1) In the scene file, use "#version 3.7", and remove any 
"assumed_gamma" statement.

(2) Gamma-adjust all color literals, by raising the R,G,B components to 
the power of 2.2 (or wait for the next beta, and add "gamma 2.2" to the 
color literal). Check your scene for colour values that are computed 
from some other values - you may (or may not) want to gamma-adjust these 
as well.

(3) Check your scene for input image files, and whether they are handled 
properly regarding gamma. For images that are used as anything non-color 
(e.g. height field data, bump map, texture map or what-have-you), 
explicitly specify "file_gamma 1.0" after the filename (next beta will 
also support "gamma 1.0" here). For any images that do wind up being 
used as a colour, try the default first (i.e. no "file_gamma" 
statement); if the colours appear too washed-out or too strong, try 
explicitly specifying "file_gamma srgb".

(4) Toy around with overall brightness and/or brightness of individual 
light sources, until you feel comfortable with the illumination. You may 
also want to tweak some of the colours in your scene (both pigment and 
light sources). If you're using self-made input image files, you may 
also want to tweak their file_gamma setting, but try to avoid this with 
3rd party input images (you should usually find a way to make them work 
by tweaking the scene rather than the image).


Post a reply to this message

From: SharkD
Subject: Re: Converting pre-gamma scenes to assumed_gamma = 1?
Date: 9 Jun 2010 15:42:25
Message: <4c0feea1$1@news.povray.org>
On 6/9/2010 7:26 AM, clipka wrote:
> Am 09.06.2010 05:57, schrieb SharkD:
>> Any general guidelines on converting scenes created before assumed_gamma
>> or 3.7 were in wide use to the new defaults?
>
> That's a bit problematic: Before "assumed_gamma 1.0" or the most recent
> 3.7 betas, the color math was simply /wrong/. So in order to get exactly
> the same result, you'd have to mimick that wrong color math - which 3.7
> refuses to, except for legacy scenes using "#version 3.6" (or anything
> smaller than 3.7) and "assumed_gamma 2.2".
>
> If you do want to port the scene to the right math, here's what I expect
> to be the most important steps:
>
> (0) In the ini-file, set the "Display_Gamma" to whatever fits your
> system; set "File_Gamma" to the same. (Ideally, your system should have
> a Display_Gamma of 2.2.)
>
> (1) In the scene file, use "#version 3.7", and remove any
> "assumed_gamma" statement.
>
> (2) Gamma-adjust all color literals, by raising the R,G,B components to
> the power of 2.2 (or wait for the next beta, and add "gamma 2.2" to the
> color literal). Check your scene for colour values that are computed
> from some other values - you may (or may not) want to gamma-adjust these
> as well.
>
> (3) Check your scene for input image files, and whether they are handled
> properly regarding gamma. For images that are used as anything non-color
> (e.g. height field data, bump map, texture map or what-have-you),
> explicitly specify "file_gamma 1.0" after the filename (next beta will
> also support "gamma 1.0" here). For any images that do wind up being
> used as a colour, try the default first (i.e. no "file_gamma"
> statement); if the colours appear too washed-out or too strong, try
> explicitly specifying "file_gamma srgb".
>
> (4) Toy around with overall brightness and/or brightness of individual
> light sources, until you feel comfortable with the illumination. You may
> also want to tweak some of the colours in your scene (both pigment and
> light sources). If you're using self-made input image files, you may
> also want to tweak their file_gamma setting, but try to avoid this with
> 3rd party input images (you should usually find a way to make them work
> by tweaking the scene rather than the image).


Mind if I copy your post to the wiki?

-- 
http://isometricland.com


Post a reply to this message

From: SharkD
Subject: Re: Converting pre-gamma scenes to assumed_gamma = 1?
Date: 9 Jun 2010 15:57:18
Message: <4c0ff21e$1@news.povray.org>
On 6/9/2010 7:26 AM, clipka wrote:
>
> (2) Gamma-adjust all color literals, by raising the R,G,B components to
> the power of 2.2 (or wait for the next beta, and add "gamma 2.2" to the
> color literal). Check your scene for colour values that are computed
> from some other values - you may (or may not) want to gamma-adjust these
> as well.

Are you sure about raising to a power? Old scenes are generally brighter 
in 3.7 than they were originally, so wouldn't you want to lower them 
instead?

-- 
http://isometricland.com


Post a reply to this message

From: clipka
Subject: Re: Converting pre-gamma scenes to assumed_gamma = 1?
Date: 9 Jun 2010 17:04:18
Message: <4c1001d2$1@news.povray.org>
Am 09.06.2010 21:57, schrieb SharkD:
> On 6/9/2010 7:26 AM, clipka wrote:
>>
>> (2) Gamma-adjust all color literals, by raising the R,G,B components to
>> the power of 2.2 (or wait for the next beta, and add "gamma 2.2" to the
>> color literal). Check your scene for colour values that are computed
>> from some other values - you may (or may not) want to gamma-adjust these
>> as well.
>
> Are you sure about raising to a power? Old scenes are generally brighter
> in 3.7 than they were originally, so wouldn't you want to lower them
> instead?

Yes, I am sure; note that raising values between 0.0 and 1.0 to some 
power > 1 does actually give you smaller values (e.g. 0.50^2 = 0.25).


Post a reply to this message

From: clipka
Subject: Re: Converting pre-gamma scenes to assumed_gamma = 1?
Date: 9 Jun 2010 17:08:13
Message: <4c1002bd$1@news.povray.org>
Am 09.06.2010 21:42, schrieb SharkD:
> Mind if I copy your post to the wiki?

The idea already crossed my mind, too - so as I currently don't find the 
time myself, by all means go ahead.


Post a reply to this message

From: SharkD
Subject: Re: Converting pre-gamma scenes to assumed_gamma = 1?
Date: 9 Jun 2010 17:33:21
Message: <4c1008a1@news.povray.org>
On 6/9/2010 5:04 PM, clipka wrote:
> Am 09.06.2010 21:57, schrieb SharkD:
>> On 6/9/2010 7:26 AM, clipka wrote:
>>>
>>> (2) Gamma-adjust all color literals, by raising the R,G,B components to
>>> the power of 2.2 (or wait for the next beta, and add "gamma 2.2" to the
>>> color literal). Check your scene for colour values that are computed
>>> from some other values - you may (or may not) want to gamma-adjust these
>>> as well.
>>
>> Are you sure about raising to a power? Old scenes are generally brighter
>> in 3.7 than they were originally, so wouldn't you want to lower them
>> instead?
>
> Yes, I am sure; note that raising values between 0.0 and 1.0 to some
> power > 1 does actually give you smaller values (e.g. 0.50^2 = 0.25).

Oh, OK! Just tested it and everything looks good so far.

-- 
http://isometricland.com


Post a reply to this message

From: clipka
Subject: Re: Converting pre-gamma scenes to assumed_gamma = 1?
Date: 9 Jun 2010 19:54:09
Message: <4c1029a1$1@news.povray.org>
Am 09.06.2010 13:26, schrieb clipka:
> If you do want to port the scene to the right math, here's what I expect
> to be the most important steps:
...

I just recalled another thing:

You may want to check your adc_bailout setting; in darker scenes, the 
current defaults may still be too high and cause visible artifacts.

(I think the adc_bailout mechanism actually needs an overhaul to better 
suit proper gamma handling as well as HDR output; I don't think it will 
be too easy though.)


Post a reply to this message

From: SharkD
Subject: Re: Converting pre-gamma scenes to assumed_gamma = 1?
Date: 17 Aug 2010 19:35:17
Message: <4c6b1cb5@news.povray.org>
On 6/9/2010 7:26 AM, clipka wrote:
> (2) Gamma-adjust all color literals, by raising the R,G,B components to
> the power of 2.2 (or wait for the next beta, and add "gamma 2.2" to the
> color literal). Check your scene for colour values that are computed
> from some other values - you may (or may not) want to gamma-adjust these
> as well.

What about colors like <1,1,1> or <1,0,0>? Raising them to a power has 
no effect.


-- 
http://isometricland.com


Post a reply to this message

From: Alain
Subject: Re: Converting pre-gamma scenes to assumed_gamma = 1?
Date: 17 Aug 2010 19:59:41
Message: <4c6b226d$1@news.povray.org>
Le 2010-08-17 19:35, SharkD a écrit :
> On 6/9/2010 7:26 AM, clipka wrote:
>> (2) Gamma-adjust all color literals, by raising the R,G,B components to
>> the power of 2.2 (or wait for the next beta, and add "gamma 2.2" to the
>> color literal). Check your scene for colour values that are computed
>> from some other values - you may (or may not) want to gamma-adjust these
>> as well.
>
> What about colors like <1,1,1> or <1,0,0>? Raising them to a power has
> no effect.
>
>

And there are also cases where assumed_gamma was (ab)used instead of 
ajusting the lights intencity or the finish. Like: My scene is to 
dark/bright, don't bother looking at the lights/finishes/pigments, 
change assumed_gamma to compensate.

Often, you'll need to adjust the falues of the light_source as well as 
the pigments and textures.


Alain


Post a reply to this message

Goto Latest 10 Messages Next 3 Messages >>>

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