POV-Ray : Newsgroups : povray.general : 16bits per color. why is my gold dithered & posterized at 4K resolution? : Re: 16bits per color. why is my gold dithered & posterized at 4K resolution? Server Time
5 Jul 2024 10:48:05 EDT (-0400)
  Re: 16bits per color. why is my gold dithered & posterized at 4K resolution?  
From: Alain
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.