POV-Ray : Newsgroups : povray.general : 16bits per color. why is my gold dithered & posterized at 4K resolution? Server Time
1 Jun 2024 23:12:17 EDT (-0400)
  16bits per color. why is my gold dithered & posterized at 4K resolution? (Message 1 to 3 of 3)  
From: jmichae3
Subject: 16bits per color. why is my gold dithered & posterized at 4K resolution?
Date: 4 Jan 2015 03:40:01
Message: <web.54a8fc5022a9a84e8694a3930@news.povray.org>
texture {
            pigment {
                color rgb <251.0/255*BRIGHTNESS, 230.0/255*BRIGHTNESS,
1.0/255*BRIGHTNESS>//nice bright gold color I picked using ps's color picker
                //color rgb <233.0/255, 157.0/255,211.0/255>
            }
            finish {
                phong 0.9
                phong_size 60
                //roughness 0.02
                brilliance BRILLIANCE
                specular .75
                roughness .1

                //roughness .001
                ambient 0.5
                diffuse 0.1 //.1

                //ambient 0.2
                //diffuse .3 //.1
                ////reflection {.3}

                reflection {
                    color rgb <251.0/255*BRIGHTNESS, 230.0/255*BRIGHTNESS,
1.0/255*BRIGHTNESS>//nice bright gold color I picked using ps's color picker
                    //rgb <233.0/255/3, 157.0/255/3, 211.0/255/3>, rgb
<233.0/255, 157.0/255, 211.0/255>//nice bright gold color I picked using ps's
color picker
                    fresnel on
                    metallic 1.0
                    //brilliance BRILLIANCE
                }
                reflection 1
                conserve_energy

                //metallic  1.0
                specular 0.9
            }

        }
        interior {
            ior 2.4
            fade_distance 0.5
            fade_power 1001
        }
        scale < 1.5/2.2, 1.5*2/2.2, .3/2.2 >
        translate < -1.6, 1.1, .4 >
        photons {
            target
            reflection on
            refraction on
        }


I am still experimenting to get what I want.
is the dithering because of:
- the viewer which is doing the dithering on my 32-bit display?
- the monitor, which is a low-end monitor and can't display 10-bit color?
- roughness .1? (beginning to suspect lack of high resolution in this area or
specificity of resolution for roughness should that be necessary - really it
should be derived from the image size). maybe I just need to think about this
more and drop roughness in favor of something that keeps the gold nice and
shiny. maybe roughness is just doing exactly what it's designed to do...)

is the posterization because of:
- the colored lights I am using (Like the gels I learned about in theater stage
lighting in high school), and this is a shadow (I think so)? maybe I should
soften the shadows! I was looking at area lights, but I don't understand the
direction of the vectors, the manual shows 2 of them them going in 2 directions
at once. there are vectors that do that sort of thing, but how would you write
that with the syntax given? this is not explained very well.
- the Bits_Per_Color=16 and Output_File_Type=N (but not sure if PNG can handle
more than 8bpc)? but the posterizing should not look like 2bpc like it does now
on the shadows. still suspect the previous item.

also, the manual section on bits per color does not explain the necessary detail
that there are some bit resolutions it doesn't support (OK, what DOES it
support? what are the boundaries?), and that it means bits per primary color, so
that if you choose 16, the total number of bits is RGB 3colors*16bitsPerColor=48
bits total.

 is there a workaround for having

what I really wanted was a special effect I was able to get from POV-RAY once a
long time ago where a certain configuration caused (oh what's that effect called
where you get the rainbow-diamonds lens effect that looks so cool in some
photos? I think it's diffraction grating (in cameras, a diffraction filter) that
does that. too bad I can't seem to find a keyword for that.


I don't like the way the colors look like brightness was cranked up too high. I
think I fixed this before using roughness 0.5. I could turn down the lights, but
the surrounding sphere (not listed here) would seem darker, maybe I need to
bring up the light levels in that area or something.

the shadows look terrible in that they are posterized. blech. where did the
color bits go?

this is a work in progress. haven't got the font positionings down correctly.


I took the roughness away and now it's really posterized.
what causes this posterization and dithering? I *really* want to get rid of it.
why is it at 4K resolution that roughness is visible? is it supposed to be
visible? I read in the manual I think that increasing roughness is supposed to
be useful for shiny metals to help make them look shinier (I could not see this
logic, some explanation needed).
can I fix that somehow?

apparently you can't follow the shadowless keyword with rgb. ouch.

I noticed in 3.7 the #declare AmbientLight seems to have no effect.


Post a reply to this message

From: clipka
Subject: Re: 16bits per color. why is my gold dithered & posterized at 4K resolution?
Date: 4 Jan 2015 14:30:59
Message: <54a994f3$1@news.povray.org>
Am 04.01.2015 um 09:39 schrieb jmichae3:

>                  color rgb <251.0/255*BRIGHTNESS, 230.0/255*BRIGHTNESS,
> 1.0/255*BRIGHTNESS>//nice bright gold color I picked using ps's color picker
>                  //color rgb <233.0/255, 157.0/255,211.0/255>

Use the "srgb" keyword whenever you pick some colour from a different 
application (unless you know exactly what you're doing).

> I am still experimenting to get what I want.
> is the dithering because of:
> - the viewer which is doing the dithering on my 32-bit display?

Maybe.

> - the monitor, which is a low-end monitor and can't display 10-bit color?

Maybe.

> - roughness .1? (beginning to suspect lack of high resolution in this area or
> specificity of resolution for roughness should that be necessary - really it
> should be derived from the image size).

Nope. Roughness doesn't introduce noise.

I don't see your image, so it's difficult to diagnose. It might also be 
due to the presence of noise in whatever the golden object reflects.


> is the posterization because of:
> - the colored lights I am using (Like the gels I learned about in theater stage
> lighting in high school), and this is a shadow (I think so)?

Maybe.

> maybe I should
> soften the shadows! I was looking at area lights, but I don't understand the
> direction of the vectors, the manual shows 2 of them them going in 2 directions
> at once. there are vectors that do that sort of thing, but how would you write
> that with the syntax given? this is not explained very well.

Normally you'll be fine with just choosing two vectors of equal length, 
each along one coordinate axis (e.g. "32*x, 32*y") and specifying the 
"circular orient" keywords.

> - the Bits_Per_Color=16 and Output_File_Type=N (but not sure if PNG can handle
> more than 8bpc)? but the posterizing should not look like 2bpc like it does now
> on the shadows. still suspect the previous item.

Nope. PNG is fine with Bits_Per_Colour=16, and should indeed not cause 
any colour banding.

> also, the manual section on bits per color does not explain the necessary detail
> that there are some bit resolutions it doesn't support (OK, what DOES it
> support? what are the boundaries?),

The limits depend on the file format chosen.

> and that it means bits per primary color, so
> that if you choose 16, the total number of bits is RGB 3colors*16bitsPerColor=48
> bits total.

This is implicit in the parameter's name: It's not Bits_Per_Pixel, but 
Bits_Per_Colour (meaning red, green and blue respectively).

Also, the colour banding might be due to the lack of something for the 
golden object to reflect. If you're too lazy to build a full-fledged 
scene around it, try a light probe.


> what I really wanted was a special effect I was able to get from POV-RAY once a
> long time ago where a certain configuration caused (oh what's that effect called
> where you get the rainbow-diamonds lens effect that looks so cool in some
> photos? I think it's diffraction grating (in cameras, a diffraction filter) that
> does that. too bad I can't seem to find a keyword for that.

Look for dispersion.

> I don't like the way the colors look like brightness was cranked up too high. I
> think I fixed this before using roughness 0.5. I could turn down the lights, but
> the surrounding sphere (not listed here) would seem darker, maybe I need to
> bring up the light levels in that area or something.

Might be due to using "rgb" instead of "srgb" to specify the colour.


> I read in the manual I think that increasing roughness is supposed to
> be useful for shiny metals to help make them look shinier (I could not see this
> logic, some explanation needed).

Other way round: Reduce roughness to make stuff look more shiny. 
Actually your current value of 0.5 is close to pathologic, and may 
contribute to the banding effect.


Post a reply to this message

From: Alain
Subject: Re: 16bits per color. why is my gold dithered & posterized at 4K resolution?
Date: 4 Jan 2015 16:45:46
Message: <54a9b48a$1@news.povray.org>

>
>          texture {
>              pigment {
>                  color rgb <251.0/255*BRIGHTNESS, 230.0/255*BRIGHTNESS,
> 1.0/255*BRIGHTNESS>//nice bright gold color I picked using ps's color picker
>                  //color rgb <233.0/255, 157.0/255,211.0/255>
>              }

Try using "srgb" instead of "rgb".

>              finish {
>                  phong 0.9
>                  phong_size 60
>                  //roughness 0.02
>                  brilliance BRILLIANCE
>                  specular .75
>                  roughness .1

HIGH value. Make the surface look dull. Reduce to make the surface looks 
more shiny.

>
>                  //roughness .001
>                  ambient 0.5

WAY to high for a metallic finish, especialy when there is something 
around to reflect. In my opinion, should be kept under 0.1, zero been 
optimum.

>                  diffuse 0.1 //.1
>
>                  //ambient 0.2
>                  //diffuse .3 //.1
>                  ////reflection {.3}
>
>                  reflection {
>                      color rgb <251.0/255*BRIGHTNESS, 230.0/255*BRIGHTNESS,
> 1.0/255*BRIGHTNESS>//nice bright gold color I picked using ps's color picker
>                      //rgb <233.0/255/3, 157.0/255/3, 211.0/255/3>, rgb
> <233.0/255, 157.0/255, 211.0/255>//nice bright gold color I picked using ps's
> color picker

Here also, use "srgb".
I suspect that setting reflection to a colour like that was originaly a 
hack from way back before the metallic keyword was introduced. This may 
date from the late version 1.x or early version 2.x...

>                      fresnel on

This need an interior block that define an ior to be effective.

>                      metallic 1.0
>                      //brilliance BRILLIANCE

Uncomment and set BRILLIANCE to something between 2 and 9.

>                  }
End of the reflection block, nullified by:

>                  reflection 1

Why a second reflection? It replace your carefully constructed 
reflection block.

>                  conserve_energy
>
>                  //metallic  1.0
>                  specular 0.9

Also, why a second specualr statement? This one replace the previous one.

>              }
>
>          }
>          interior {
>              ior 2.4
>              fade_distance 0.5
>              fade_power 1001
>          }
>          scale < 1.5/2.2, 1.5*2/2.2, .3/2.2 >
>          translate < -1.6, 1.1, .4 >
>          photons {
>              target
>              reflection on
>              refraction on
>          }
>
>
> I am still experimenting to get what I want.
> is the dithering because of:
> - the viewer which is doing the dithering on my 32-bit display?
> - the monitor, which is a low-end monitor and can't display 10-bit color?

10 bit per colour mean 30 bits per pixel, where each channels can take 
1024 different values. Not what I define as "low end"...

> - roughness .1? (beginning to suspect lack of high resolution in this area or
> specificity of resolution for roughness should that be necessary - really it
> should be derived from the image size). maybe I just need to think about this
> more and drop roughness in favor of something that keeps the gold nice and
> shiny. maybe roughness is just doing exactly what it's designed to do...)

Roughness need a LOW value to make the surface shiny and HIGH value for 
dull surfaces. 0.1 is a high value.
>
> is the posterization because of:
> - the colored lights I am using (Like the gels I learned about in theater stage
> lighting in high school), and this is a shadow (I think so)? maybe I should
> soften the shadows! I was looking at area lights, but I don't understand the
> direction of the vectors, the manual shows 2 of them them going in 2 directions
> at once. there are vectors that do that sort of thing, but how would you write
> that with the syntax given? this is not explained very well.

Maybe your area_light don't use enough sublights.

For the area_light, try using larger values for the number of sublights, 
like 17 by 17 and use adaptive 0 (for testing) and, if needed, adaptive 
1 or 2. Using 33 by 33, or even 65 by 65 array with adaptive don't realy 
slow down your render speed. I've even used up to 1025 by 1025 without 
much of a performance hit.
Good values when using adaptive are: 9, 17, 33, 65, 129,...
Less that 9 tend to cause banding, or noise when using jitter.

Also, use 2 equal and perpendicular vectors with circular orient. This 
makes your area_light act as if it was a spherical light.

> - the Bits_Per_Color=16 and Output_File_Type=N (but not sure if PNG can handle
> more than 8bpc)? but the posterizing should not look like 2bpc like it does now
> on the shadows. still suspect the previous item.

PNG can take 5 to 16 bits per channel for red, green, blue, and 
optionaly the alpha channel.

>
> also, the manual section on bits per color does not explain the necessary detail
> that there are some bit resolutions it doesn't support (OK, what DOES it
> support? what are the boundaries?), and that it means bits per primary color, so
> that if you choose 16, the total number of bits is RGB 3colors*16bitsPerColor=48
> bits total.

Yes. Total 64 bit per pixel when using the alpha channel.

>
>   is there a workaround for having
>
> what I really wanted was a special effect I was able to get from POV-RAY once a
> long time ago where a certain configuration caused (oh what's that effect called
> where you get the rainbow-diamonds lens effect that looks so cool in some
> photos? I think it's diffraction grating (in cameras, a diffraction filter) that
> does that. too bad I can't seem to find a keyword for that.

Use the dispertion keyword. dispertion_samples controll the finess of 
the dispertion. It default to 7.

>
>
> I don't like the way the colors look like brightness was cranked up too high. I
> think I fixed this before using roughness 0.5. I could turn down the lights, but
> the surrounding sphere (not listed here) would seem darker, maybe I need to
> bring up the light levels in that area or something.

roughness 0.5 is *very* high and result in an extremely dull finish.

>
> the shadows look terrible in that they are posterized. blech. where did the
> color bits go?

Not enough area_light samples?

>
> this is a work in progress. haven't got the font positionings down correctly.
>
>
> I took the roughness away and now it's really posterized.
> what causes this posterization and dithering? I *really* want to get rid of it.
> why is it at 4K resolution that roughness is visible? is it supposed to be
> visible? I read in the manual I think that increasing roughness is supposed to
> be useful for shiny metals to help make them look shinier (I could not see this
> logic, some explanation needed).
> can I fix that somehow?

Also, for metals, increasing the brilliance can have some good effect.

>
> apparently you can't follow the shadowless keyword with rgb. ouch.

No. shadowless is a boolean switch: The light cast shadows or it don't 
cast any. Also, a shadowless light never cause any specular or phong 
highlight and never emit any photons in a photons scene.

If you want coloured shadows, try adding "projected_through" and an 
object to a light_source. Have the normal light, then, add the 
projected_through light in the exact same location. If the base light is 
an area_light, the projected_through one must also be an area_light with 
the exact same parameters.
The object used should be a copy of the object casting the shadows.

>
> I noticed in 3.7 the #declare AmbientLight seems to have no effect.

This declare a /user/ variable. It never had any effect unless the scene 
is constructed to use that user variable.
Also, when using radiosity, the ambient part of the finishes is switched 
OFF. Use emission for the finishes that are intended to actualy glow and 
cast light on their surrounding.

>
>
>
>


Alain


Post a reply to this message

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