POV-Ray : Newsgroups : povray.general : using assumed_gamma of 1.0 ... a discussion : Re: using assumed_gamma of 1.0 ... a discussion Server Time
1 Aug 2024 16:28:42 EDT (-0400)
  Re: using assumed_gamma of 1.0 ... a discussion  
From: Christian Walther
Date: 18 Dec 2005 04:54:57
Message: <43a531f1@news.povray.org>
Kenneth wrote:

>>...you may change the sphere's reflectivity properties using the
>>"brilliance" keyword. With "finish { ambient 0 diffuse 1 brilliance 2 }"
>>(and assumed_gamma 1), a similar image to Ard's lower one is achieved.
>>(I'm too lazy now to look up what brilliance does exactly, but it may be
>>that  "brilliance <display_gamma>" exactly reproduces that image.)
>>
> Hey, that's a  brilliant use of brilliance! ;-) But upon re-reading the POV
> docs explaining that keyword, no mention is made of your particular use of
> it.  Quite an important, basic use!  If brilliance was actually intended
> for correcting the lighting of an object, shouldn't that have been covered
> in a major way in the POV docs? Such an omission makes me wonder if
> "correcting" for lighting anomolies...when using assumed_gamma of 1.0...was
> ever even considered!

I don't know - reading 
<http://www.povray.org/documentation/view/3.6.1/346/> in my opinion 
describes quite well what brilliance does. Isn't what's described there 
exactly "correcting the lighting"? I don't see a fundamental difference 
between those two uses, I rather see them as one and the same and the 
only use of brilliance. The only thing that I'm missing there is a 
formula that says what it does *exactly*.

I guess you're just the first one to see physically correct rendering of 
an ideal diffuse reflector (which is just an approximation to real-world 
surfaces, admittedly, but not that bad for many types of materials, if 
combined with highlights) as an "anomaly".

> I came to POV from having used Photoshop for years.
> As a graphics toolset, PS allows me to pick color/brightness values either
> visually or by choosing rgb values. Numerically, it's own range is from 0
> to 255. But the important thing is that, if I choose 127,127,127...right in
> the middle...I do indeed get an on-screen gray that is "half as perceptully
> bright as white." (Which is what I thought POV's <.5,.5,.5> should give me
> as well.) Photoshop is, in effect, insulating me from the need to worry
> about gamma correction. A beautiful, intuitive way of working!!

Right, but I suspect this is more by accident than by design. 127 is 
converted by the display's response to approximately (127/255)^2.2 = 21% 
light intensity, which by the response of the human visual system is 
converted to approximately "half the perceptual brightness". It's not 
that Photoshop is doing any extra work to insulate you from the physical 
intensity values. And encoding brightness as integers from 0 to 255 is 
not a decision made by Photoshop's designers to insulate you from 
anything either, to the contrary it is just what is used internally in 
the video memory of computer displays and in most image file formats.

> From my own standpoint, of simply wanting to produce nice, realistic,
> perceptually-pleasing images on my own system...

Keep in mind that "realistic" and "perceptually pleasing" are sometimes 
conflicting goals. And in my opinion, the best way of getting 
"realistic" images is staying as close as possible to the physical 
reality. That may include use of features like "brilliance" in some 
cases where it improves the approximation to nature, but not as a 
general cure-all.

> ... then using assumed_gamma of 2.0 is just...easier and more
> intuitive...while 1.0 creates hurdles and difficulties that have to
> be constantly addressed: having to specify "non-linear" color
> values;

The way I work, that's not a big deal - I just tweak the numbers until 
it looks the way I want it, and I don't care whether in the end "that 
middle gray that I want" is encoded by 0.5 or by 0.2.

> ... having to add and tweak other POV values (like brilliance)
> because of lighting anomolies;

I don't think I've ever needed to use brilliance to get more realistic 
surfaces in any of my scenes - but then again most of my scenes have 
been technical rather than artistic so far.

> having to deal with image_map images (created in any typical graphics
> program) that don't render correctly unless they are in the .png
> format with an embedded gamma of 1.0.

I seem to remember that there's indeed something wrong in POV-Ray in 
that area, but since I don't exactly remember what it is I'll keep my 
mouth shut for the moment. (What you say certainly sounds odd, it would 
only be correct if the contents of the PNG are indeed encoded with a 
gamma of 1.0, which is rare (at least for images that don't come out of 
POV-Ray).)

> My wish, from an artist's standpoint:  WOULDN'T IT BE NICE IF...POV allowed
> an alternate way of working, one that allowed the use of "linear" color
> values (as in Photoshop, and as in my initial POV gray-band test scene),
> CHANGED those values internally to work in its own ideal color space of
> assumed_gamma 1.0,

You could do that yourself by defining a macro (but, frankly, I don't 
see much use in that, given what I said above about tweaking numbers):

#macro MyColor(r, g, b)
   rgb <pow(r, 2.0), pow(g, 2.0), pow(b, 2.0)>
#end

or even

#macro MyColor(r, g, b)
   rgb <pow(r/255, 2.0), pow(g/255, 2.0), pow(b/255, 2.0)>
#end

> and then re-massaged THOSE values before spitting them back to the
> monitor, so that they appeared perceptually correct in the user's
> chosen gamma environment?

POV-Ray already does that (if you use assumed_gamma 1).

> (Of course, my own use of assumed_gamma of 2.0 mimics that behavior!
> But as has been pointed out, that's not the correct way of working.
> A real conundrum.)

It mimics that behavior *and* causes the internal calculations to be 
done in a physically incorrect way. That's a price you (as an artist) 
may be willing to pay, but I (as a physicist) am not.

> I'm curious; would you yourself use the brilliance trick to visually
> correct the rendered image (as seen in the POV preview render),or
> would you leave it as-is because it's physically correct? I'd
> genuinely like to know, as it will help me to further understand how
> you (and others) use and interact with POV.

If I'm convinced that the surface I want to simulate is better 
approximated by a diffuse-reflector-with-brilliance than by an ideal 
diffuse reflector, I would use it, but otherwise I tend to accept what 
POV-Ray delivers as "realistic" even if it looks different than I had 
expected. Again, the fundamental belief behind that is that using a 
physical model that as closely as possible approximates nature will lead 
to the most realistic images. And getting a realistic image is usually 
my primary goal (over getting an artistically pleasing image).

  -Christian


Post a reply to this message

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