POV-Ray : Newsgroups : povray.binaries.images : brightness adjustment Server Time
16 Nov 2024 20:14:46 EST (-0500)
  brightness adjustment (Message 1 to 7 of 7)  
From: Di Gama
Subject: brightness adjustment
Date: 11 Dec 2006 17:30:00
Message: <web.457ddbc7f15bc39baf9a4b290@news.povray.org>
I am working on a POV-Ray project which involves loading an external image
and re-displaying it with no color adjustment. I recently discovered that
"ambient 1" with no light_sources is not enough; the picture comes out
brighter than the original. I traced the problem to the picture below. The
top band is POV-Ray's rendering of a smooth gradient black to white at
ambient 1 with no light_sources. The bottom band is an unmodified gradient
black to white made by Fireworks. I hold in doubt neither gradient, and I
think the problem lies in how the object color is transformed into a final
pixel color. What is going on, and how can I disable or counter this
change?


Post a reply to this message


Attachments:
Download 'bob.png' (2 KB)

Preview of image 'bob.png'
bob.png


 

From: Tim Nikias
Subject: Re: brightness adjustment
Date: 11 Dec 2006 17:37:26
Message: <457ddda6$1@news.povray.org>
Di Gama wrote:
> I am working on a POV-Ray project which involves loading an external image
> and re-displaying it with no color adjustment. I recently discovered that
> "ambient 1" with no light_sources is not enough; the picture comes out
> brighter than the original. I traced the problem to the picture below. The
> top band is POV-Ray's rendering of a smooth gradient black to white at
> ambient 1 with no light_sources. The bottom band is an unmodified gradient
> black to white made by Fireworks. I hold in doubt neither gradient, and I
> think the problem lies in how the object color is transformed into a final
> pixel color. What is going on, and how can I disable or counter this
> change?

Try looking up "assumed gamma" and "display gamma".

Basically, POV-Ray "ships" with display gamma set to 2.2 (on Windows) 
and you should set assumed_gamma in global_settings to 2.2 as well to 
make no gamma-changes on loaded pictures. This kinda doesn't work with 
PNG, depending if the gamma is encoded within it or not...

All in all, it's a slightly complicated matter, but experiment and 
you'll learn. :-)

Regards,
Tim

-- 
aka "Tim Nikias"
Homepage: <http://www.nolights.de>


Post a reply to this message

From: Jaap
Subject: Re: brightness adjustment
Date: 11 Dec 2006 17:40:00
Message: <web.457dde257cc2e53aa8399d8d0@news.povray.org>
I'm not 100% sure, but I suspect the assumed_gamma setting of povray.

global_settings { assumed_gamma 1.0 }

does that change anything ?

http://www.povray.org/documentation/view/3.6.1/260/

jaap.


Post a reply to this message

From: Agustin Britait Molina
Subject: Re: brightness adjustment
Date: 12 Dec 2006 01:20:01
Message: <web.457e493c7cc2e53abcfbcae20@news.povray.org>
try with

global_settings {
  assumed_gamma 2.2
}

in the top of ur code

greeting for all is my first post in the list

"Di Gama" <di.### [at] gmailcom> wrote:
> I am working on a POV-Ray project which involves loading an external image
> and re-displaying it with no color adjustment. I recently discovered that
> "ambient 1" with no light_sources is not enough; the picture comes out
> brighter than the original. I traced the problem to the picture below. The
> top band is POV-Ray's rendering of a smooth gradient black to white at
> ambient 1 with no light_sources. The bottom band is an unmodified gradient
> black to white made by Fireworks. I hold in doubt neither gradient, and I
> think the problem lies in how the object color is transformed into a final
> pixel color. What is going on, and how can I disable or counter this
> change?


Post a reply to this message

From: EagleSun
Subject: Re: brightness adjustment
Date: 12 Dec 2006 09:47:13
Message: <457ec0f1$1@news.povray.org>
Here's what I did to import my photos...


global_settings {
// assumed_gamma 1.0
}

light_source {
 0*x
 color rgb <1,1,1>*1.5
 parallel
 point_at <0, 0, 1>
 translate <0, 0, -1>
}

I did nothing else with lighting... not even adjust the "diffuse".  I played 
with "assumed_gamma" but decided not to use it.  A few tests showed that the 
rendered image looked exactly like the photo.


----- Original Message ----- 
From: "Di Gama" <di.### [at] gmailcom>
Newsgroups: povray.binaries.images
Sent: Monday, December 11, 2006 4:29 PM
Subject: brightness adjustment


>I am working on a POV-Ray project which involves loading an external image
> and re-displaying it with no color adjustment. I recently discovered that
> "ambient 1" with no light_sources is not enough; the picture comes out
> brighter than the original. I traced the problem to the picture below. The
> top band is POV-Ray's rendering of a smooth gradient black to white at
> ambient 1 with no light_sources. The bottom band is an unmodified gradient
> black to white made by Fireworks. I hold in doubt neither gradient, and I
> think the problem lies in how the object color is transformed into a final
> pixel color. What is going on, and how can I disable or counter this
> change?
>


Post a reply to this message

From: Zeger Knaepen
Subject: Re: brightness adjustment
Date: 12 Dec 2006 11:26:08
Message: <457ed820$1@news.povray.org>
"Di Gama" <di.### [at] gmailcom> wrote in message 
news:web.457ddbc7f15bc39baf9a4b290@news.povray.org...
>I am working on a POV-Ray project which involves loading an external image
> and re-displaying it with no color adjustment. I recently discovered that
> "ambient 1" with no light_sources is not enough; the picture comes out
> brighter than the original. I traced the problem to the picture below. The
> top band is POV-Ray's rendering of a smooth gradient black to white at
> ambient 1 with no light_sources. The bottom band is an unmodified gradient
> black to white made by Fireworks. I hold in doubt neither gradient, and I
> think the problem lies in how the object color is transformed into a final
> pixel color. What is going on, and how can I disable or counter this
> change?

I suppose you're using PNG?  PNG contains gamma-correction, so if the 
gamma-settings in the PNG are different from what POV-Ray uses, POV-Ray 
"automatically" corrects it.
So you should make sure you're using the exact same settings, or that you don't 
use PNG

cu!
-- 
#macro G(b,e)b+(e-b)*C/50#end#macro _(b,e,k,l)#local C=0;#while(C<50)
sphere{G(b,e)+3*z.1pigment{rgb G(k,l)}finish{ambient 1}}#local C=C+1;
#end#end _(y-x,y,x,x+y)_(y,-x-y,x+y,y)_(-x-y,-y,y,y+z)_(-y,y,y+z,x+y)
_(0x+y.5+y/2x)_(0x-y.5+y/2x)            // ZK http://www.povplace.com


Post a reply to this message

From: Di Gama
Subject: Re: brightness adjustment
Date: 12 Dec 2006 15:50:00
Message: <web.457f14e47cc2e53aaf9a4b290@news.povray.org>
"Di Gama" <di.### [at] gmailcom> wrote:
> I am working on a POV-Ray project which involves loading an external image
> and re-displaying it with no color adjustment. I recently discovered that
> "ambient 1" with no light_sources is not enough; the picture comes out
> brighter than the original. I traced the problem to the picture below. The
> top band is POV-Ray's rendering of a smooth gradient black to white at
> ambient 1 with no light_sources. The bottom band is an unmodified gradient
> black to white made by Fireworks. I hold in doubt neither gradient, and I
> think the problem lies in how the object color is transformed into a final
> pixel color. What is going on, and how can I disable or counter this
> change?

I tried setting assumed_gamma to everything under the sun, but I see
absolutely no change in the image. The help text on gamma was very
confusing. I am not using any special gamma additions, and I am viewing the
original and re-rendered pictures on the same monitor, so display gamma is
irrelevant. I am rendering to a BMP on a Windows. Here is the source for
the gradient picture:

global_settings { assumed_gamma 1 }
camera {
  direction .5*z
  right x
  up y
}
box {
  <0,-1,1>,<1,1,2>
  pigment {gradient x}
  finish {ambient 1}
  scale 1+x
  translate -x
}

This source is not shortened at all.


Post a reply to this message

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