POV-Ray : Newsgroups : povray.general : Can we eliminate colour banding? Server Time
28 Mar 2024 05:28:39 EDT (-0400)
  Can we eliminate colour banding? (Message 1 to 5 of 5)  
From: Kima
Subject: Can we eliminate colour banding?
Date: 18 Aug 2020 11:55:01
Message: <web.5f3bf8cf3da4de74ecc0fada0@news.povray.org>
I am struggling to find a way to visually eliminate colour banding. As I
understand, there are two methods, but both just reduce banding, and they are
still clearly visible.

Consider a simple scene of

camera {location <0,30,-12> look_at <0,0,0> angle 45  right 16/9*x up y}
light_source{<-5,5,-3> color rgb<1,1,1>*0.7  }
plane{<0,1,0>,0 pigment{color rgb<1,1,1>} }

1. bit-depth. Theoretically, the 16-bit colour should provide enough range to
eliminate colour banding. However, in my experience, this just makes the bands
smaller.

Command: povray +Iin.pov +MB +A -D +V +W4000 +H3000 Bits_Per_Color=16 +Oout.png
Output: https://ibb.co/BP72rbS


2. Dithering. Merges the band edges but, they are still visible. I tried some of
the Dithering methods, but not much difference.

Command: Command: povray +Iin.pov +MB +A -D +V +W4000 +H3000 +TH +Oout.png
Output: https://ibb.co/bscqT65

Using both methods did not improve any further. +TH has no visible effect on
16-bit output.

Do I miss something?


Post a reply to this message

From: jr
Subject: Re: Can we eliminate colour banding?
Date: 18 Aug 2020 12:55:00
Message: <web.5f3c0698e11cac054d00143e0@news.povray.org>
hi,

"Kima" <nomail@nomail> wrote:
> I am struggling to find a way to visually eliminate colour banding. As I
> understand, there are two methods, but both just reduce banding, and they are
> still clearly visible.
>
> Consider a simple scene of
>
> camera {location <0,30,-12> look_at <0,0,0> angle 45  right 16/9*x up y}
> light_source{<-5,5,-3> color rgb<1,1,1>*0.7  }
> plane{<0,1,0>,0 pigment{color rgb<1,1,1>} }
> ...
> Do I miss something?

you appear to have better eyes than me.  :-)  I took the above, added a version
(3.8) and 'global_settings {assumed_gamma 1}', and rendered with '+ikima.pov +a
+am2' (PNG is default output format here).  since I could not see any banding, I
imported the PNG into a DF3 file, and found it has a small number of different
(colour) values.  added a 'parallel' keyword to the light, then repeated the
process.  this time the file contained only a single value.  so I suggest adding
'parallel' and enabling antialias for the render.  hth.


regards, jr.


Post a reply to this message

From: Alain Martel
Subject: Re: Can we eliminate colour banding?
Date: 18 Aug 2020 13:29:14
Message: <5f3c0fea$1@news.povray.org>
Le 2020-08-18 à 11:51, Kima a écrit :
> 
> 
> I am struggling to find a way to visually eliminate colour banding. As I
> understand, there are two methods, but both just reduce banding, and they are
> still clearly visible.
> 
> Consider a simple scene of
> 
> camera {location <0,30,-12> look_at <0,0,0> angle 45  right 16/9*x up y}
> light_source{<-5,5,-3> color rgb<1,1,1>*0.7  }
> plane{<0,1,0>,0 pigment{color rgb<1,1,1>} }
> 
> 1. bit-depth. Theoretically, the 16-bit colour should provide enough range to
> eliminate colour banding. However, in my experience, this just makes the bands
> smaller.
> 
> Command: povray +Iin.pov +MB +A -D +V +W4000 +H3000 Bits_Per_Color=16 +Oout.png
> Output: https://ibb.co/BP72rbS
> 
> 
> 2. Dithering. Merges the band edges but, they are still visible. I tried some of
> the Dithering methods, but not much difference.
> 
> Command: Command: povray +Iin.pov +MB +A -D +V +W4000 +H3000 +TH +Oout.png
> Output: https://ibb.co/bscqT65

That image don't show any colour banding on my display. Just a smooth 
gradient.

> 
> Using both methods did not improve any further. +TH has no visible effect on
> 16-bit output.
> 
> Do I miss something?
> 
> 
> 

Simple. It is impossible to totally eliminate colour banding when using 
any numeric representation of the image. 8 bit per channel is the best 
that you can get. Your video card just can't do better than that.

The only way to actually eliminate it would be to use an analogue 
signal, and it's just not possible to have that with current technology.

Also, even if you save your image in a 64 bit per channel format, when 
displaying the image on your monitor, it get reduced to 8 bit per 
channel due to the limitation of the video hardware, both the video card 
and the monitor, as well as your video drivers. It can get even worst 
than that, low end/entry level/cheap displays could be limited to 6, or 
even 5 or 4, bit per channel. Bad, or badly configured, video drivers 
can also cause this.

The image that you see on your monitor can have much worst banding than 
your image effectively have.



Alain


Post a reply to this message

From: Thorsten
Subject: Re: Can we eliminate colour banding?
Date: 19 Aug 2020 02:05:39
Message: <5f3cc133$1@news.povray.org>
On 18.08.2020 17:51, Kima wrote:
> I am struggling to find a way to visually eliminate colour banding. As I
> understand, there are two methods, but both just reduce banding, and they are
> still clearly visible.

You do realise that your screen is a limiting factor, don't you? If you 
have a regular LCD screen, you will have 8 bit per color component, so 
even if you export in POV-Ray with 16 bit per color component, this will 
still be reduced to 8 bit on your screen.

Thorsten


Post a reply to this message

From: William F Pokorny
Subject: Re: Can we eliminate colour banding?
Date: 19 Aug 2020 07:45:39
Message: <5f3d10e3$1@news.povray.org>
On 8/18/20 11:51 AM, Kima wrote:
> 
...
> 
> Do I miss something?
> 

Perhaps. In an earlier post I mentioned using POV-Ray (v3.8 preferably) 
as a viewer for high depth (>8 bit per channel) images because it 
dithers the preview screen. Look in povray.unofficial.patches for a post 
about a pgm depth map patch. At the bottom of that post is code for a >8 
bit pgm POV-Ray viewer which could be modified for png or whatever.

I expect there are some image viewers that can internally dither >8 bit 
depths before display, but I've not run across one (I'm on linux/rasbian 
only).

Various external image manipulation tools can dither >8 bits too.

If you want to view images in typical web/display environments, I 
suspect you'll get better, non-banding results with 8 bit dithered 
output.

Bill P.


Post a reply to this message

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