POV-Ray : Newsgroups : povray.advanced-users : Pigment functions... Server Time
6 Oct 2024 13:35:42 EDT (-0400)
  Pigment functions... (Message 8 to 17 of 17)  
<<< Previous 7 Messages Goto Initial 10 Messages
From: Samuel Benge
Subject: Re: Pigment functions...
Date: 12 Sep 2006 18:58:12
Message: <45073b84@news.povray.org>
Kenneth wrote:
> Samuel Benge <stb### [at] hotmailcom> wrote:
>> It lightens/darkens an image. It helps to fix dark scenes, or washed-out
>> scenes (which are less likely with POV).
>>
> True...and very useful...but OOH you'll hear loud cries of dissent
> from many in the POV community about "abusing gamma."
> (I massage assumed_gamma all the time ;-) Just another
> artistic tool, IMHO.)
> 
> Ken W.

Sometimes the only way to get enough color-saturation in a scene is to 
bump up the assumed gamma and brighten the lights. Or you could put a 
rgbt<1,1,1,2> plane in front of everything....

~Sam


Post a reply to this message

From: Kenneth
Subject: Re: Pigment functions...
Date: 12 Sep 2006 23:00:01
Message: <web.45077215a29fb3bbdda07a910@news.povray.org>
Samuel Benge <stb### [at] hotmailcom> wrote:

>
> Does this help? It's approximated using the default assumed_gamma, and
> may not be perfect, but it's a start:
>

So THAT'S how it's done. Thanks, Samuel.  VERY useful.

The color_map entry [0 rgb 0] is kind of a mystery to me, though.
What does color_map{[0 rgb 0][1 rgb x*1.55]}, for example, actually tell
POV-Ray to do, in this case? (I do understand the x*1.55 part.)

Ken W.


Post a reply to this message

From: Samuel Benge
Subject: Re: Pigment functions...
Date: 12 Sep 2006 23:14:59
Message: <450777b3$1@news.povray.org>
Kenneth wrote:
> Samuel Benge <stb### [at] hotmailcom> wrote:
> 
>> Does this help? It's approximated using the default assumed_gamma, and
>> may not be perfect, but it's a start:
>>
> 
> So THAT'S how it's done. Thanks, Samuel.  VERY useful.

Your welcome!

> The color_map entry [0 rgb 0] is kind of a mystery to me, though.
> What does color_map{[0 rgb 0][1 rgb x*1.55]}, for example, actually tell
> POV-Ray to do, in this case? (I do understand the x*1.55 part.)

An image has three color channels which range between 0 & 255.  All the 
color_map is telling POV to do is to apply a color range from 0 to 1.55 
(255*1.5)for the red channel. All the channels are combined to make a 
complete rgb image.

~Sam


Post a reply to this message

From: Kenneth
Subject: Re: Pigment functions...
Date: 12 Sep 2006 23:20:00
Message: <web.45077826a29fb3bbdda07a910@news.povray.org>
Samuel Benge <stb### [at] hotmailcom> wrote:

>
> Sometimes the only way to get enough color-saturation in a scene is to
> bump up the assumed gamma and brighten the lights. Or you could put a
> rgbt<1,1,1,2> plane in front of everything....
>
> ~Sam

I like to think of it as a "contrast control" (although that's not what it
was meant for, of course.) Whites stay white and blacks stay black, but all
the intermediate color/grey values can be altered.

BTW, if you have image_maps in your scene...and you want them to stay
looking the same no matter what assumed_gamma you throw at
them...converting them to the png format is the way to go.  But there's a
hitch: You have to "embed" an assumed_gamma of 1 into them somehow. This is
kind of a little quirk (?) with POV-Ray, but a useful one. Photoshop 5 (my
current version) allows this embedding (some graphics apps do, some don't,
apparently.) In Photoshop, the place to look is FILE/COLOR SETTINGS/RGB
SETUP, where you can enter a gamma of 1.  And then turn "Display using
monitor compensation" OFF there, otherwise the image (in PS) will brighten
up and the colors will look washed out.  But the image will reproduce
beautifully in POV-Ray, ignoring assumed_gamma altogether.

Ken W.


Post a reply to this message

From: Kenneth
Subject: Re: Pigment functions...
Date: 13 Sep 2006 00:00:00
Message: <web.45078185a29fb3bbc55e8ebc0@news.povray.org>
"Kenneth" <kdw### [at] earthlinknet> wrote:
> ...  But the image will reproduce
> beautifully in POV-Ray, ignoring assumed_gamma altogether.
>

Hmm.  Well...uh...that's not *exactly* true, as I've just discovered from
doing a few tests. Putting some wild assumed_gamma settings into POV-Ray
(.5 up to 3) shows some subtle changes in the rendered image_map.
Especially at the .5 setting (which no one in his or her right mind would
use, of course.  I think.) Not even sure how to describe the odd effect IT
produces.  But IN GENERAL, a gamma-of-1 png image_map does stay looking
practically the same, throughout a good range of assumed_gamma values.

Ken


Post a reply to this message

From: How Camp
Subject: Re: Pigment functions...
Date: 13 Sep 2006 08:41:59
Message: <4507fc97$1@news.povray.org>
"Kenneth" <kdw### [at] earthlinknet> wrote in message 
news:web.45077826a29fb3bbdda07a910@news.povray.org...

> BTW, if you have image_maps in your scene...and you want them to stay
> looking the same no matter what assumed_gamma you throw at
> them...converting them to the png format is the way to go.  But there's a
> hitch: You have to "embed" an assumed_gamma of 1 into them somehow. This 
> is
> kind of a little quirk (?) with POV-Ray, but a useful one.

This is only tangentially related, but perhaps someone can explain the 
browser issues with PNGs and gAMA chunks:

http://pmt.sourceforge.net/gamma_test/
http://hsivonen.iki.fi/png-gamma-test-results/

Is it a browser issue, or is PNG the problem?  I have heard both arguments, 
but I don't understand exactly what's going on.

Anyone care to shed some light?

- How


Post a reply to this message

From: Warp
Subject: Re: Pigment functions...
Date: 13 Sep 2006 10:13:21
Message: <45081201@news.povray.org>
How Camp <hac### [at] gmailcom> wrote:
> Is it a browser issue, or is PNG the problem?

  The problem is not with the gamma value in a PNG. The problem is that
PNG *has* support for gamma value. Other formats don't have this problem
because they don't have gamma support at all.
  The problem is that some programs will write the gamma value to the
PNG while others, when reading the PNG, will ignore it. Another problem
is that when a PNG doesn't have gamma info, some programs (especially
some browsers) will "guess" a gamma value for it anyways, instead of
taking the pixels unmodified (as with all other image formats).

  So the problem is that a theoretically good idea has completely
backfired because of poor program support. Now the exact same PNG
*without* any gamma value might look different in different browsers,
simply because the makers of these browsers got confused and started
making some assumptions. Adding the gamma value to the PNG does not
help because it may still look different in different programs
because some programs will just ignore the gamma value.

  This gamma fiasco is one of the biggest reasons why the industry
(especially the WWW industry) as a whole hasn't switched to PNG from
other lossless formats.

-- 
                                                          - Warp


Post a reply to this message

From: How Camp
Subject: Re: Pigment functions...
Date: 13 Sep 2006 10:33:52
Message: <450816d0$1@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message 
news:45081201@news.povray.org...

>  The problem is not with the gamma value in a PNG. The problem is that
> PNG *has* support for gamma value. Other formats don't have this problem
> because they don't have gamma support at all.

Thanks, Warp.  Your explanation has helped me see much more clearly.

So, according to the docs, then, POV-Ray stores the gamma value as 
1.0/display_gamma.  It also says "PNG is the only one that has any gamma 
correction features and is therefore preferred for images that will be 
displayed on a wide variety of platforms."  Isn't this somewhat misleading? 
PNG is the preferred format (in part) because it has the capability of 
storing gamma values, but not because PNG can be displayed on a wide variety 
of platforms.  Most likely, PNGs will be displayed with many differences 
across platforms/programs compared to another image format that doesn't 
contain gamma information.  In order to have an image created in POV show up 
most consistently (as opposed to 'correctly') across platforms, PNG is not 
the best choice.

I'm not complaining, I'm just making sure I understand (from a user 
perspective).  If I want my image to display as I intended it, I should use 
PNG, and blame the program (browser, etc.) if it doesn't implement PNG gamma 
support properly.  On the other hand, if I want to be sure my image is 
displayed as consistently as possible, regardless of the program used to 
view it, I should opt for some other image format, and complain quietly to 
myself that I don't get to store the gamma info as I want.

- How


Post a reply to this message

From: Kenneth
Subject: Re: Pigment functions...
Date: 18 Sep 2006 05:55:00
Message: <web.450e6b0da29fb3bb725e2aee0@news.povray.org>
"How Camp" <hac### [at] gmailcom> wrote:

> So, according to the docs, then, POV-Ray stores the gamma value as
> 1.0/display_gamma.  It also says "PNG is the only one that has any gamma
> correction features and is therefore preferred for images that will be
> displayed on a wide variety of platforms."  Isn't this somewhat misleading?

Yes, I think you're right. I was likewise confused, for quite a while. My
own guess is, that part of the POV documentation was written when PNG was
"the next big thing" and had great promise as a cross-platform and
cross-browser image display standard. But as Warp explained, things just
didn't work out the way they should have. Too bad. But you're right--that
part of the documentation should be rewritten.
>
> I'm not complaining, I'm just making sure I understand (from a user
> perspective).  If I want my image to display as I intended it, I should use
> PNG, and blame the program (browser, etc.) if it doesn't implement PNG gamma
> support properly.  On the other hand, if I want to be sure my image is
> displayed as consistently as possible, regardless of the program used to
> view it, I should opt for some other image format, and complain quietly to
> myself that I don't get to store the gamma info as I want.

Yep!  It may not be a perfect solution, but a non-gamma-embedding file
format would probably be a better choice. I use plain 'ol JPEG, but
that's lossy, of course. BMP or PICT are good choices, but the file
sizes are large. Alas, no ideal solution!

You and Warp have explained the present PNG situation quite clearly.

BTW, since I have both a PC and a Mac  -- with their different display
gammas of 2.2 and 1.8 respectively -- and since I do my POV'ing on the PC,
I've elected to alter IT's display gamma to be "in the middle" (2.0) so
that my final POV renders will look *almost* the same when viewed on both
platforms. (I do this with a utility called Adobe Gamma.) Just a small
detail, but better than nothing!

Ken


Post a reply to this message

From: How Camp
Subject: Re: Pigment functions...
Date: 18 Sep 2006 13:03:32
Message: <450ed164@news.povray.org>
> BTW, since I have both a PC and a Mac  -- with their different display
> gammas of 2.2 and 1.8 respectively -- and since I do my POV'ing on the PC,
> I've elected to alter IT's display gamma to be "in the middle" (2.0) so
> that my final POV renders will look *almost* the same when viewed on both
> platforms. (I do this with a utility called Adobe Gamma.) Just a small
> detail, but better than nothing!

Thanks, this has been a very informative thread for me.  I also came across 
a link discussing the use of PNGCrush to remove the ancilliary gamma 
information, and a comparison of various browsers' behavior when it comes to 
PNGs:  http://user.fundy.net/morris/?photoshop03.shtml

- How


Post a reply to this message

<<< Previous 7 Messages Goto Initial 10 Messages

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