How to avoid banding on povray?

How to avoid banding on povray?

Post by Dana M. Hag » Wed, 26 May 1999 04:00:00



     Can anybody help me with this?  How can I avoid bands of discreet
color in what should be a smooth color transition?  For example:

camera {
sky             < -0.275735, 0.194332, 0.941385 >
up              < 0,0,1 >
right           < -1.381951, 0, 0 >
angle           27
perspective
location        < 19.466221, -13.842025, 7.480624 >
look_at         < 0.688714, 0.347871, -0.948613 >

Quote:}

light_source {<200, -50, 200> color White shadowless}

// eye light
light_source {< 194.66221, -138.42025, 74.80624 >
                color White shadowless}    

sky_sphere {
         pigment {
         gradient z
         color_map  
         {
         [0 color rgb <.4,.4,.6>]
         [1 color rgb <0,0,.1>]
         }
         scale 2
         translate -1
         }}

This gives me abruptly changing bands of color on the sky sphere.  I'm
using the default 24 bit color and it happens at any resolution (from
640x480 up to 1600x1200)

Any advice appreciated.

-Dana
--
If replying by email, please remove the exclamation points (!) from my address.
-------------------------------------------------------------------------------
Friends come and go, but enemies accumulate in a pile outside.

 
 
 

How to avoid banding on povray?

Post by Harold Baiz » Wed, 26 May 1999 04:00:00


Dana,
There is no problem with POV-Ray. Your computer video is
not set to 24 bit color depth. I just ran this on my machine and
there was no banding. This is a very common question to the
group. Just try increasing the color depth of your computer.

Harold

Quote:>      Can anybody help me with this?  How can I avoid bands of discreet
> color in what should be a smooth color transition?  For example:

> This gives me abruptly changing bands of color on the sky sphere.  I'm
> using the default 24 bit color and it happens at any resolution (from
> 640x480 up to 1600x1200)


 
 
 

How to avoid banding on povray?

Post by Margus Rams » Thu, 27 May 1999 04:00:00


The color difference between the top and bottom of the image is very small;
even 24 bits precision has its limitations. The banding cannot be completely
eliminated, it might be reduced a bit by dithering your image afterwards in
some paint program.
BTW, are you sure your display is set to truecolor?

Margus


>     Can anybody help me with this?  How can I avoid bands of discreet
>color in what should be a smooth color transition?  For example:

>camera {
>sky < -0.275735, 0.194332, 0.941385 >
>up < 0,0,1 >
>right < -1.381951, 0, 0 >
>angle 27
>perspective
>location < 19.466221, -13.842025, 7.480624 >
>look_at < 0.688714, 0.347871, -0.948613 >
>}

>light_source {<200, -50, 200> color White shadowless}

>// eye light
>light_source {< 194.66221, -138.42025, 74.80624 >
> color White shadowless}

>sky_sphere {
>         pigment
>         gradient z
>         color_map
>         {
>         [0 color rgb <.4,.4,.6>]
>         [1 color rgb <0,0,.1>]
>         }
>         scale 2
>         translate -1
>         }}

>This gives me abruptly changing bands of color on the sky sphere.  I'm
>using the default 24 bit color and it happens at any resolution (from
>640x480 up to 1600x1200)

>Any advice appreciated.

>-Dana
>--
>If replying by email, please remove the exclamation points (!) from my
address.
>---------------------------------------------------------------------------
----
>Friends come and go, but enemies accumulate in a pile outside.

 
 
 

How to avoid banding on povray?

Post by Amalthea » Thu, 27 May 1999 04:00:00


Just to add my 2 cents, I rendered the scene and I can actually see some
banding, but it is very subtle, not abrupt as you describe.  Someone would need
to have a pretty good monitor to see it all.

Our eyes are very sensitive to blue, and since you have isolated a very small
range of tones there, that is probably why you can see it.  One way to get rid
of it is to render to a 48-bit PNG file and then dither down to 24 in a paint
program.  

-Mike

 
 
 

How to avoid banding on povray?

Post by Gail Sha » Thu, 27 May 1999 04:00:00



>     Can anybody help me with this?  How can I avoid bands of discreet
>color in what should be a smooth color transition?  For example:

<snip code>  maybe

Quote:

>This gives me abruptly changing bands of color on the sky sphere.  I'm
>using the default 24 bit color and it happens at any resolution (from
>640x480 up to 1600x1200)

Is that color depth the depth of the picture or the depth of your monitor?
If you're rendering the pic in 24bit color and viewing it in 16 bit color
you will
see banding.

If that's not the problem, I have no idea. The pigment on the skysphere
should be smooth.

Gail
*******************************************************************

* http://www.rucus.ru.ac.za/~gail/ * Insert cup and press any key *
*******************************************************************
   My Software never has bugs, It just develops random features
*******************************************************************

 
 
 

How to avoid banding on povray?

Post by Mark Tranchan » Thu, 27 May 1999 04:00:00


I've just tried it here in truecolour. The scene is an almost uniform
blue, but with three just-discernible bands. This is indeed a limitation
of 24-bit colour - there are only 256 shades of pure blue available. The
dithering suggestion is a good one, as the sharp delineation makes the
transition more obvious to the eye than it really is (look up Mach
banding). Dithering will "smudge" the change, making the transition
speckled and less accurate, but also less visible.

Mark.


> The color difference between the top and bottom of the image is very small;
> even 24 bits precision has its limitations. The banding cannot be completely
> eliminated, it might be reduced a bit by dithering your image afterwards in
> some paint program.
> BTW, are you sure your display is set to truecolor?

> Margus


> >     Can anybody help me with this?  How can I avoid bands of discreet
> >color in what should be a smooth color transition?  For example:

> >camera {
> >sky < -0.275735, 0.194332, 0.941385 >
> >up < 0,0,1 >
> >right < -1.381951, 0, 0 >
> >angle 27
> >perspective
> >location < 19.466221, -13.842025, 7.480624 >
> >look_at < 0.688714, 0.347871, -0.948613 >
> >}

> >light_source {<200, -50, 200> color White shadowless}

> >// eye light
> >light_source {< 194.66221, -138.42025, 74.80624 >
> > color White shadowless}

> >sky_sphere {
> >         pigment

> >         gradient z
> >         color_map
> >         {
> >         [0 color rgb <.4,.4,.6>]
> >         [1 color rgb <0,0,.1>]
> >         }
> >         scale 2
> >         translate -1
> >         }}

> >This gives me abruptly changing bands of color on the sky sphere.  I'm
> >using the default 24 bit color and it happens at any resolution (from
> >640x480 up to 1600x1200)

> >Any advice appreciated.

> >-Dana
> >--
> >If replying by email, please remove the exclamation points (!) from my
> address.
> >---------------------------------------------------------------------------
> ----
> >Friends come and go, but enemies accumulate in a pile outside.

 
 
 

How to avoid banding on povray?

Post by Holger Betta » Thu, 27 May 1999 04:00:00



> I've just tried it here in truecolour. The scene is an almost uniform
> blue, but with three just-discernible bands. This is indeed a limitation
> of 24-bit colour - there are only 256 shades of pure blue available. The
> dithering suggestion is a good one, as the sharp delineation makes the
> transition more obvious to the eye than it really is (look up Mach
> banding). Dithering will "smudge" the change, making the transition
> speckled and less accurate, but also less visible.

You can do at least one form of "dithering" from within PoV-Ray itself. Add
a very little randomness to the pigment using the "crand" keyword. I don't
know offhand what "crand" number corresponds to 1/256 (it might depend on
the color and on lighting), but that would be the ideal amount to get rid
of banding without introducing too much noise.

  Holger

 
 
 

How to avoid banding on povray?

Post by Stephan Ahone » Thu, 27 May 1999 04:00:00


Quote:>Our eyes are very sensitive to blue, and since you have isolated a very
small
>range of tones there, that is probably why you can see it.  One way to get
rid
>of it is to render to a 48-bit PNG file and then dither down to 24 in a
paint
>program.

I thought it was green?

Or are our eyes sensitive to blue as well, but not as much as green?

Sig for a Day
Stephan Ahonen, ICQ 491101
Don't mind me, I'm just insane.
Come back tomorrow for a different sig!
Backspace a single "s" from my addy to reply by email.

 
 
 

How to avoid banding on povray?

Post by Forkaz » Thu, 27 May 1999 04:00:00


Quote:>I thought it was green?

>Or are our eyes sensitive to blue as well, but not as much as green?

Yes, you are correct, we are most sensitive to green.  In some color spaces,
there are more greens that reds or blues, like 565 RGB with its extra bit of
green.
 
 
 

How to avoid banding on povray?

Post by Dana M. Hag » Thu, 27 May 1999 04:00:00




Quote:>     Can anybody help me.....

        Thanks to all who replied.  I changed from 65K colors to 16M
and the banding went away.  For my main work (CAD) resolution is more
important than color depth, but at least I understand the problem now.

                                        -Dana
--
If replying by email, please remove the exclamation points (!) from my address.
-------------------------------------------------------------------------------
When only cops have guns, it's called a police state.

 
 
 

How to avoid banding on povray?

Post by Coridon Hensh » Thu, 27 May 1999 04:00:00



 >> The color difference between the top and bottom of the image is very
 >> small; even 24 bits precision has its limitations. The banding cannot be
 >> completely eliminated, it might be reduced a bit by dithering your image
 >> afterwards in some paint program.

Post-render dithering will not eliminate truecolor banding without some help
from Povray.  Dithering 24-bit images to a 24-bit screen will not remove
banding artifacts as there is not enough data in the source image for any
dithering algorithm to know which color transitions are real and which are
artifacts.

One must render at a greater color depth (e.g. 48 bits) and dither down to
24 for dithering to have any effect.  Unfortunately, precious few paint
packages can understand 48 bit PNG files (or 48 bit anything, for that
matter).

-- ------------------------------------------------------------------------|
| This message does not reflect the views of Green Circle Communciations.  |
| OS/2 Warp - SCSI - free speech.  Do I pick losing causes or what?        |
|------------------------------------http://www.myna.com/~gcircle/csbh.html-

 
 
 

How to avoid banding on povray?

Post by Amalthea » Fri, 28 May 1999 04:00:00


Quote:>I thought it was green?

>Or are our eyes sensitive to blue as well, but not as much as green?

It's actually yellow-green in bright light and shifts toward blue-green as
light intensity falls.  We may be more attuned to gradiations of blue though,
since we are accustomed to seeing this in a blue sky. :)

Sensitivity to Red is the lowest, which is why red tulips appear black at dawn
or dusk.

-Mike

 
 
 

How to avoid banding on povray?

Post by Mark Tranchan » Fri, 28 May 1999 04:00:00


Sigh. So you weren't using a 24-bit colour *display* to start with,
then...

Still, we got some interesting answers, and demonstrated that the
banding is still just about visible, even on 24-bit colour displays.

Glad you got it sorted.

Mark.




> >     Can anybody help me.....

>         Thanks to all who replied.  I changed from 65K colors to 16M
> and the banding went away.  For my main work (CAD) resolution is more
> important than color depth, but at least I understand the problem now.

>                                         -Dana
> --
> If replying by email, please remove the exclamation points (!) from my address.
> -------------------------------------------------------------------------------
> When only cops have guns, it's called a police state.

 
 
 

How to avoid banding on povray?

Post by Stephan Ahone » Fri, 28 May 1999 04:00:00


Quote:>Yes, you are correct, we are most sensitive to green.  In some color
spaces,
>there are more greens that reds or blues, like 565 RGB with its extra bit
of
>green.

I knew that much, just wondering why you were talking about the eye's
sensitivity to blue.

Sig for a Day
Stephan Ahonen, ICQ 491101
Don't mind me, I'm just insane.
Come back tomorrow for a different sig!
Backspace a single "s" from my addy to reply by email.

 
 
 

How to avoid banding on povray?

Post by Andreas Dilg » Sat, 29 May 1999 04:00:00




>One must render at a greater color depth (e.g. 48 bits) and dither down to
>24 for dithering to have any effect.  Unfortunately, precious few paint
>packages can understand 48 bit PNG files (or 48 bit anything, for that
>matter).

Actually, the unix POV-Ray display code does a pretty good job of dithering
with 16-bit color, and I'm sure this could easily be extended to the 24-bit
display (the code didn't do it for speed reasons and the assumption that
24-bit color is good enough).  However, since POV-Ray stores the colors
internally as a float, it shouldn't be too hard to add dithering to even
24-bit output...  That's not to say that I'm going to do it, just a suggestion
from someone who knows it can be done easily.

Cheers, Andreas
--
Andreas Dilger   University of Calgary  \"If a man ate a pound of pasta and
                 Micronet Research Group \ a pound of antipasto, would they
Dept of Electrical & Computer Engineering \   cancel out, leaving him still
http://www-mddsp.enel.ucalgary.ca/People/adilger/       hungry?" -- Dogbert

 
 
 

1. Free Tip: Gradient-Avoid Banding

Hello All,

This is a free tip to all photoshop novices like myself.  I had been
having a lot of trouble with gradient banding.  My image is a web image
with a gradiated background (from orangish to yellowish).  I read that
gradients save better in jpg format where as text and other stuff
created in photoshop save better in gif format.  Actually, images with
blending colors save better as jpg, and images with solid blocks of
color save better as gif.  I then decided to save my gradiated
background as a jpg and the forgound text as a gif with an invisible
background.  I would then overlay the gif over the background jpg.  This
all sounded like it would work great, but I still had some problems.
The images looked perfect in 32-bit color.  When I changed my screen
settings to 16-bit color, it looked abolutely horrible.  My computer did
not have colors in the 16-bit pallette to match the blending colors.
Instead of matching the closest colors, these horrible bands of colors
showed up.  It made sense to me, but I had no idea how to fix it.  I
tried everything.  I tried variations of colors...still banding.  I
tried variations of the gradient(wider and narrower)...still banding.  I
tried saving the background gradient in different formats and
resolutions...still banding.  I played with the image for two days.  I
then read somewhere to avoid banding try adding some noise to your
image.

  I use photoshop 5.0, Filter->Noise->Add Noise(amount 2-3,distribution
uniform).  IT WORKED!  The image does not look perfect in 32-bit, but it
looks almost perfect depending on your display settings.  In 16-bit mode
it looks identical to the 32-bit mode.  I think to add noise in PSP,
Image->Noise->Add (4%-6%).

I couldn't believe this worked, I had to tell someone, and none of my
friends or family know anything about this stuff.  Anyways dejanews.com
(free plug for deja news) sends me a copy of the post as an email.

I hope this posting helps someone out there.
Marc

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

2. Where Hoffman's MAX plugin ?

3. Advice needed--How to avoid banding w/gradients?

4. SetDIBits

5. Newsserver povray: new.povray.org

6. about making commercial product using d3d format !

7. Povray 2 --> Povray 3

8. ftp.povray.org & www.povray.org

9. Povray LINUX vs Povray DOS

10. POVRay PPC and POVRay Dos comparism

11. Avoiding Jpeg compression when scanning with twain ???