POV-Ray : Newsgroups : povray.binaries.images : Minus Values in Assumed_Gamma = Strange :) Server Time
19 Oct 2026 12:39:57 EDT (-0400)
  Minus Values in Assumed_Gamma = Strange :) (Message 1 to 19 of 19)  
From: Ken
Subject: Minus Values in Assumed_Gamma = Strange :)
Date: 12 Nov 2000 02:37:54
Message: <3A0E4914.9E48C88E@pacbell.net>
Got a wild hair tonight and tried a negative value in the
assumed_gamma global setting. Interesting effect. The first
image is how it would normaly appear using assumed gamma 2.2.
The second is assumed gamma -1.0. There must be an application
for this but at the moment I can't think of one....


-- 
Ken Tyler - 1400+ POV-Ray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message


Attachments:
Download 'plus-22.jpg' (8 KB) Download 'minus-1.jpg' (24 KB)

Preview of image 'plus-22.jpg'
plus-22.jpg

Preview of image 'minus-1.jpg'
minus-1.jpg


 

From: GrimDude
Subject: Re: Minus Values in Assumed_Gamma = Strange :)
Date: 12 Nov 2000 10:09:43
Message: <3a0eb2b7@news.povray.org>
Maybe, if you are going to print some blacklight images....

Grim


Post a reply to this message

From: Jan Walzer
Subject: Re: Minus Values in Assumed_Gamma = Strange :)
Date: 12 Nov 2000 11:14:14
Message: <3a0ec1d6@news.povray.org>
I assume it won't work with AA ...


--

 ,',    Jan Walzer      \V/  http://wa.lzer.net     ,',
',','   student of      >|<  mailto:jan### [at] lzernet ',','
  '   ComputerScience   /A\  +49-177-7403863         '

Ken <tyl### [at] pacbellnet> schrieb in im Newsbeitrag:
3A0E4914.9E48C88E@pacbell.net...
>
> Got a wild hair tonight and tried a negative value in the
> assumed_gamma global setting. Interesting effect. The first
> image is how it would normaly appear using assumed gamma 2.2.
> The second is assumed gamma -1.0. There must be an application
> for this but at the moment I can't think of one....
>
>
> --
> Ken Tyler - 1400+ POV-Ray, Graphics, 3D Rendering, and
Raytracing Links:
> http://home.pacbell.net/tylereng/index.html
http://www.povray.org/links/


-----------------------------------------------------------------
---------------






-----------------------------------------------------------------
---------------


Post a reply to this message

From: Chris Huff
Subject: Re: Minus Values in Assumed_Gamma = Strange :)
Date: 12 Nov 2000 12:00:56
Message: <chrishuff-EC1E14.12010512112000@news.povray.org>
In article <3a0ec1d6@news.povray.org>, "Jan Walzer" <jan### [at] lzernet> 
wrote:

> I assume it won't work with AA ...

Gamma correction has nothing to do with antialiasing...

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

From: Jan Walzer
Subject: Re: Minus Values in Assumed_Gamma = Strange :)
Date: 12 Nov 2000 12:21:49
Message: <3a0ed1ad@news.povray.org>
I don't know the source of POV, but

Looking at the picture I think the effect comes from some
clipping-effects of the different rgb-values or some
non-continueities (you know what I mean) of the Gamma-function
with negative values ... (How is gamma defined for negative
values ???)

I think, the question is: When is it applied? Before or after AA
??

--

 ,',    Jan Walzer      \V/  http://wa.lzer.net     ,',
',','   student of      >|<  mailto:jan### [at] lzernet ',','
  '   ComputerScience   /A\  +49-177-7403863         '

Chris Huff <chr### [at] maccom> schrieb in im Newsbeitrag:
chrishuff-EC1E14.12010512112000@news.povray.org...
> In article <3a0ec1d6@news.povray.org>, "Jan Walzer"
<jan### [at] lzernet>
> wrote:
>
> > I assume it won't work with AA ...
>
> Gamma correction has nothing to do with antialiasing...
>
> --
> Christopher James Huff
> Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
> TAG: chr### [at] tagpovrayorg, http://tag.povray.org/
>
> <><


Post a reply to this message

From: Chris Huff
Subject: Re: Minus Values in Assumed_Gamma = Strange :)
Date: 12 Nov 2000 13:26:08
Message: <chrishuff-7E9319.13261612112000@news.povray.org>
In article <3a0ed1ad@news.povray.org>, "Jan Walzer" <jan### [at] lzernet> 
wrote:

> Looking at the picture I think the effect comes from some
> clipping-effects of the different rgb-values or some
> non-continueities (you know what I mean) of the Gamma-function
> with negative values ...

I think the gamma correction uses a continuous, non periodic function, 
probably just a simple polynomial. The results you see are probably from 
the color values being clipped and otherwise messed up by the function.


> I think, the question is: When is it applied? Before or after AA??

Gamma correction would have to be applied to the final result of 
computing a pixel, correcting each sample wouldn't give the right 
result. Antialiasing has little effect on the image, it mostly makes a 
small difference in edges, so the change would be minor.

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

From: Jan Walzer
Subject: Re: Minus Values in Assumed_Gamma = Strange :)
Date: 12 Nov 2000 15:21:44
Message: <3a0efbd8@news.povray.org>
Chris Huff <chr### [at] maccom> schrieb in im Newsbeitrag:
chrishuff-7E9319.13261612112000@news.povray.org...
> In article <3a0ed1ad@news.povray.org>, "Jan Walzer"
<jan### [at] lzernet>
> wrote:
>
> > Looking at the picture I think the effect comes from some
> > clipping-effects of the different rgb-values or some
> > non-continueities (you know what I mean) of the
Gamma-function
> > with negative values ...
>
> I think the gamma correction uses a continuous, non periodic
function,
> probably just a simple polynomial. The results you see are
probably from
> the color values being clipped and otherwise messed up by the
function.
>
>
> > I think, the question is: When is it applied? Before or after
AA??
>
> Gamma correction would have to be applied to the final result
of
> computing a pixel, correcting each sample wouldn't give the
right
> result. Antialiasing has little effect on the image, it mostly
makes a
> small difference in edges, so the change would be minor.

So this is what I originaly ment ... If you use the
gamma-correction(with negativ values) on an antialiased image ,
you don't have any longer the effect of antialiasing. The GC
could produce again (unexpected) stairsteps.

But: AFAIK Gamma is only defined for values > 0 ...

So does it make sense to ask if the current model is correct ???
Of course, we often have other functions in POV, working with
unrealistic values (negative pigments or lights ...[New question:
what is with negative IOR ???]), but they are or could be quite
predictable, but what do you expect from a negative gamma value
??? How would define the result ???

BTW: has someone here have the code for the gamma function ???

--

 ,',    Jan Walzer      \V/  http://wa.lzer.net     ,',
',','   student of      >|<  mailto:jan### [at] lzernet ',','
  '   ComputerScience   /A\  +49-177-7403863         '


Post a reply to this message

From: Steve
Subject: Re: Minus Values in Assumed_Gamma = Strange :)
Date: 12 Nov 2000 16:37:00
Message: <slrn90u2bu.uk.steve@zero-pps.localdomain>
On Sat, 11 Nov 2000 23:39:00 -0800, Ken wrote:
>This is a multi-part message in MIME format.
>--------------B99E23FC96263D03210CBB0B
>Content-Type: text/plain; charset=us-ascii
>Content-Transfer-Encoding: 7bit
>
>
>Got a wild hair tonight and tried a negative value in the
>assumed_gamma global setting. Interesting effect. The first
>image is how it would normaly appear using assumed gamma 2.2.
>The second is assumed gamma -1.0. There must be an application
>for this but at the moment I can't think of one....

Just tried this on one of my own files, it's like all those 1970s 
pop videos have come back to get me. 

-- 
Cheers
Steve              email mailto:ste### [at] zeroppsuklinuxnet

%HAV-A-NICEDAY Error not enough coffee  0 pps. 

web http://www.zeropps.uklinux.net/

or  http://start.at/zero-pps

  6:40pm  up 32 days, 21:02,  2 users,  load average: 1.06, 1.10, 1.04


Post a reply to this message

From: Chris Huff
Subject: Re: Minus Values in Assumed_Gamma = Strange :)
Date: 12 Nov 2000 17:48:27
Message: <chrishuff-0B5574.17483712112000@news.povray.org>
In article <3a0efbd8@news.povray.org>, "Jan Walzer" <jan### [at] lzernet> 
wrote:

> So this is what I originaly ment ... If you use the
> gamma-correction(with negativ values) on an antialiased image ,
> you don't have any longer the effect of antialiasing. The GC
> could produce again (unexpected) stairsteps.

You would still have the effect of antialiasing, though there will be 
additional "jaggies" from the gamma function itself.


> Of course, we often have other functions in POV, working with
> unrealistic values (negative pigments or lights ...[New question:
> what is with negative IOR ???]), but they are or could be quite
> predictable, but what do you expect from a negative gamma value
> ??? How would define the result ???

Define it as whatever you get when you feed negative input to the gamma 
function. :-)

Negative ior may not be unrealistic. The ior of a bubble of air in water 
is lower than the ior of water, it just makes the light bend the other 
way. An ior of 1 usually means no effect, because POV sets the ior of 
"space" to 1. It is the change in ior that causes light to bend...


> BTW: has someone here have the code for the gamma function ???

I said it was probably simple. :-)
The variable opts.GammaFactor is set to assumed_gamma/DisplayGamma in 
parse.c.

render.c:
static void gamma_correct(COLOUR Colour)
{
  if (opts.Options & GAMMA_CORRECT)
  {
    Colour[RED]   = pow(Colour[RED],  opts.GammaFactor);
    Colour[GREEN] = pow(Colour[GREEN],opts.GammaFactor);
    Colour[BLUE]  = pow(Colour[BLUE], opts.GammaFactor);
  }
}

And as far as I can tell, Clip_Colour() is always called on the color 
before this, then the gamma function is called, then the result is added 
to the pixel before averaging of values. I'm not sure if the last part 
is correct, I noticed that focal blur was changed so individual samples 
weren't corrected.

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

From: Steve
Subject: Re: Minus Values in Assumed_Gamma = Strange :)
Date: 12 Nov 2000 19:43:41
Message: <slrn90u8im.1km.steve@zero-pps.localdomain>
On Sun, 12 Nov 2000 21:14:20 +0100, Jan Walzer wrote:

>So this is what I originaly ment ... If you use the
>gamma-correction(with negativ values) on an antialiased image ,
>you don't have any longer the effect of antialiasing. The GC
>could produce again (unexpected) stairsteps.
>
>But: AFAIK Gamma is only defined for values > 0 ...
>
>So does it make sense to ask if the current model is correct ???
>Of course, we often have other functions in POV, working with
>unrealistic values (negative pigments or lights ...[New question:
>what is with negative IOR ???]), but they are or could be quite
>predictable, but what do you expect from a negative gamma value
>??? How would define the result ???
>
>BTW: has someone here have the code for the gamma function ???

Don't think I understand most of your questions but this should
answer some.  The attached image was gamma corrected in a graphics
package, to -1.6, and I get exactly the same results as using
negative gamma in pov.


Post a reply to this message


Attachments:
Download 'neggam.jpg' (29 KB)

Preview of image 'neggam.jpg'
neggam.jpg


 

From: Simon Lemieux
Subject: Re: Minus Values in Assumed_Gamma = Strange :)
Date: 13 Nov 2000 00:39:03
Message: <3A0F8CB2.3C82D2B@yahoo.com>
> Negative ior may not be unrealistic. The ior of a bubble of air in water
> is lower than the ior of water, it just makes the light bend the other
> way. An ior of 1 usually means no effect, because POV sets the ior of
> "space" to 1. It is the change in ior that causes light to bend...

If I can just correct this... space is void and there is no matter, so there is
no IOR, but there is in the air.. the air's IOR is ~1 and so the light passing
from air to space will be refracted with an indice of 1, 0 means no refraction
(ie: passing from space to space), common glass is at 2.2 i think...  And again,
look at the glass on earth, it looks nice, look at it in space and it looks
different, because the IOR passes from 1 to 2.2 and in space from 0 to 2.2...

A negative IOR should simply result in the opposite effect, thus making a
magnifying-glass(?) into a fisheye-lens and making a fisheye-lens into a
magnifier...

Something pretty cool about IOR is when it's animated, ie relative to the clock,
that gives a very nice effect!

Just my two cents! ;) 

-- 
+-------------------------+----------------------------------+
| Simon Lemieux           | Website : http://www.666Mhz.net  |
| Email : Sin### [at] 666Mhznet | POV-Ray, OpenGL, C++ and more... |
+-------------------------+----------------------------------+


Post a reply to this message

From: Simon Lemieux
Subject: Re: Minus Values in Assumed_Gamma = Strange :)
Date: 13 Nov 2000 00:42:03
Message: <3A0F8D67.D6E8F50D@yahoo.com>
> Don't think I understand most of your questions but this should
> answer some.  The attached image was gamma corrected in a graphics
> package, to -1.6, and I get exactly the same results as using
> negative gamma in pov.

I don't think I understand the term of "gamma" but I guess this is much like a
inversion of the colors, the image look like a negative (negative? hehe)

Try to open the image with a normal gamma with a photo editor (gimp, photoshop)
and invert the colors and then compare with the negative gamma rendered one...

Simon

-- 
+-------------------------+----------------------------------+
| Simon Lemieux           | Website : http://www.666Mhz.net  |
| Email : Sin### [at] 666Mhznet | POV-Ray, OpenGL, C++ and more... |
+-------------------------+----------------------------------+


Post a reply to this message

From: Ken
Subject: Re: Minus Values in Assumed_Gamma = Strange :)
Date: 13 Nov 2000 01:15:49
Message: <3A0F8784.AF4A3BE0@pacbell.net>
Jan Walzer wrote:
> 
> I assume it won't work with AA ...

For the record this was rendered with an AA of .01 so I would
say your assumptions are correct.

-- 
Ken Tyler - 1400+ POV-Ray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: Kari Kivisalo
Subject: Re: Minus Values in Assumed_Gamma = Strange :)
Date: 13 Nov 2000 02:23:29
Message: <3A0F96FD.77AA764B@kivisalo.net>
Simon Lemieux wrote:
>
> If I can just correct this... space is void and there is no matter, so there is
> no IOR, but there is in the air.. the air's IOR is ~1 and so the light passing
> from air to space will be refracted with an indice of 1, 0 means no refraction
> (ie: passing from space to space), common glass is at 2.2 i think...  And again,
> look at the glass on earth, it looks nice, look at it in space and it looks
> different, because the IOR passes from 1 to 2.2 and in space from 0 to 2.2...

Back to shool for you! Vacuum ior=1.0.
http://www.glenbrook.k12.il.us/gbssci/phys/Class/refrn/u14l1d.html

______________________________________________________________________
Kari Kivisalo                                  http://www.kivisalo.net


Post a reply to this message

From: Mark Wagner
Subject: Re: Minus Values in Assumed_Gamma = Strange :)
Date: 13 Nov 2000 02:39:53
Message: <3a0f9ac9@news.povray.org>
Chris Huff wrote in message ...
>In article <3a0efbd8@news.povray.org>, "Jan Walzer" <jan### [at] lzernet>
>wrote:
>> [New question:
>> what is with negative IOR
>
>Negative ior may not be unrealistic. The ior of a bubble of air in water
>is lower than the ior of water, it just makes the light bend the other
>way. An ior of 1 usually means no effect, because POV sets the ior of
>"space" to 1. It is the change in ior that causes light to bend...


Wrong.  IOR is defined as the *ratio* of the speed of light in a given
material to a reference material (usually, the reference material is a hard
vacuum).  Consequently, the IOR of a bubble of air in water is a value less
than 1 but greater than 0, if water is given an IOR of 1.  If an object has
a negative IOR, it implies that light entering the object will have a
negative velocity -- it will enter the object, stop, turn around, and head
back the other direction!

--
Mark


Post a reply to this message

From: Chris Huff
Subject: Re: Minus Values in Assumed_Gamma = Strange :)
Date: 13 Nov 2000 17:04:53
Message: <chrishuff-864B14.17050413112000@news.povray.org>
In article <3a0f9ac9@news.povray.org>, "Mark Wagner" 
<mar### [at] gtenet> wrote:

> Wrong.  IOR is defined as the *ratio* of the speed of light in a 
> given material to a reference material (usually, the reference 
> material is a hard vacuum).

Ok, thanks for the info...I wasn't certain about there being a lower 
limit to ior. I dimly remember reading about the exact meaning of ior, 
but not reliably enough to claim only positive values are allowed.


> If an object has a negative IOR, it implies that light entering the 
> object will have a negative velocity -- it will enter the object, 
> stop, turn around, and head back the other direction!

Which would probably look like a reflection in most cases...possibly a 
useful effect.

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

From: Chris Huff
Subject: Re: Minus Values in Assumed_Gamma = Strange :)
Date: 13 Nov 2000 17:11:16
Message: <chrishuff-6CFC2F.17112713112000@news.povray.org>
In article <3A0### [at] yahoocom>, lem### [at] yahoocom wrote:

> If I can just correct this... space is void and there is no matter, 
> so there is no IOR, but there is in the air..

I wasn't talking about outer space(which actually has an ior of 1 as I 
recall), I was talking about the "environment" in POV-Ray, which is set 
to an ior of 1.

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

From: Simon Lemieux
Subject: Re: Minus Values in Assumed_Gamma = Strange :)
Date: 13 Nov 2000 21:15:04
Message: <3A10AE6F.FA4ACDEE@yahoo.com>
> Back to shool for you! Vacuum ior=1.0.
> http://www.glenbrook.k12.il.us/gbssci/phys/Class/refrn/u14l1d.html

Uh... true!  My mistake, I actually had in mind the difference between air and
vacuum which is  near 0 and so I assumed vacuum's ior was 0, sorry!  Also for
the crown glass at 1.54 ( i actually thought it was about 2.2...)...  But I
learned this 2 years ago in a general physic course...

Thanks for the tips!

-- 
+-------------------------+----------------------------------+
| Simon Lemieux           | Website : http://www.666Mhz.net  |
| Email : Sin### [at] 666Mhznet | POV-Ray, OpenGL, C++ and more... |
+-------------------------+----------------------------------+


Post a reply to this message

From: GrimDude
Subject: Re: Minus Values in Assumed_Gamma = Strange :)
Date: 14 Nov 2000 17:52:24
Message: <3a11c228@news.povray.org>
I saw something today that reminded me of your image here. X-Ray images of
distant galaxies.

Grim


Post a reply to this message

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