POV-Ray : Newsgroups : povray.binaries.images : Spectral Rendering to avoid primary color bias Server Time
1 Nov 2024 02:18:39 EDT (-0400)
  Spectral Rendering to avoid primary color bias (Message 1 to 3 of 3)  
From: Cousin Ricky
Subject: Spectral Rendering to avoid primary color bias
Date: 12 Jun 2014 23:55:01
Message: <web.539a74af2cd0134a192ae5f10@news.povray.org>
When trying to model water with media absorption a few years ago, I noticed that
deep water always trended toward the exact hue of the blue phosphor.  I
suspected very strongly that this was not just a coincidence.

Further testing with both media absorption and fade_color confirmed my
suspicion.  With tricolor rendering, transparent objects with colored interiors
show a bias towards the most prominent primary color.  For example, yellow
materials with even a slightly orange fade_color tend strongly towards red, and
materials with a chartreuse or aqua fade_color tend strongly toward phosphor
green.

I finally got around to testing how spectral rendering would mitigate this
problem.  I used Ive's SpectralRender package, available at lilysoft.org.  The
glass objects on the left side of each render are wedge shaped, 2 POV units deep
at the base and zero thickness at the apex.  They use variations on the
following material:
  __________________________________________________________

  pigment { rgbf 1 }
  finish
  { reflection { 0 1 fresnel } conserve_energy
    specular albedo 0.05 roughness 0.00001
  }
  interior
  { IOR_Spectral (IOR_Glass_BK7)
    fade_power 1001
    fade_distance 0.4
    fade_color C_Spectral (D_CC_F2)
  }
  photons { target collect off reflection on refraction on }
  __________________________________________________________

The sphere on the right side of each render is pigmented with the same color as
the fade_color of the glass, using finish { diffuse 1 }.

The scene is illuminated with a D65 lamp.  The assumed_gamma is set to 1.

The upper left image uses preview mode, which just reverts to regular RGB
rendering.  The auburn hue of the glass is noticeably redder than the yellowish
orange of the sphere.  The bias is nearly eliminated in the spectrally rendered
image at the upper left.

The bias in the upper left image isn't nearly as strong as in the tests I did
years ago, but more recent testing revealed that the bias is less strong for
fade_colors at less than full strength (that is, fade_colors whose value is less
than 1.0 when converted to HSV).  As with most (all?) natural surfaces, there is
no wavelength which is reflected 100% by swatch D_CC_F2.  In the bottom row
images, the color was boosted until the maximum channel value was 1.0.  For the
lower left preview, the color was scaled such that the HSV value was 1.0.
Essentially, the material is 100% transparent to red (aside from Fresnel effects
at the surface).  For the lower right spectral render, wavelength array was
scaled such that the highest array element was 1.0.

The red bias in the lower left image is much stronger.


Post a reply to this message


Attachments:
Download 'primary_unbias-montage.jpg' (104 KB)

Preview of image 'primary_unbias-montage.jpg'
primary_unbias-montage.jpg


 

From: Cousin Ricky
Subject: Re: Spectral Rendering to avoid primary color bias
Date: 13 Jun 2014 00:15:00
Message: <web.539a79f4f6bfddd0192ae5f10@news.povray.org>
"Cousin Ricky" <rickysttATyahooDOTcom> wrote:
> Further testing with both media absorption and fade_color confirmed my
> suspicion.  With tricolor rendering, transparent objects with colored interiors
> show a bias towards the most prominent primary color.
>
> [snip]
>
> The bias in the upper left image isn't nearly as strong as in the tests I did
> years ago, but more recent testing revealed that the bias is less strong for
> fade_colors at less than full strength (that is, fade_colors whose value is less
> than 1.0 when converted to HSV).

The attached image shows one of my fade_color tests.  The circled number is the
nominal hue (with assumed_gamma set to 1) of the entire suite.  The other
numbers along the left edge show the depth, in POV units, of the samples in each
row.  The top and bottom swatches of each column show the fade_color that was
used for that column.

The material for each sample is:
  ____________________

  pigment { rgbt 1 }
  interior
  { fade_distance 1
    fade_power 1001
    fade_color <color>
  }
  ____________________


Post a reply to this message


Attachments:
Download 'fade_grade30.png' (36 KB)

Preview of image 'fade_grade30.png'
fade_grade30.png


 

From: clipka
Subject: Re: Spectral Rendering to avoid primary color bias
Date: 13 Jun 2014 00:32:02
Message: <539a7ec2$1@news.povray.org>
Am 13.06.2014 05:49, schrieb Cousin Ricky:
> When trying to model water with media absorption a few years ago, I noticed that
> deep water always trended toward the exact hue of the blue phosphor.  I
> suspected very strongly that this was not just a coincidence.
>
> Further testing with both media absorption and fade_color confirmed my
> suspicion.  With tricolor rendering, transparent objects with colored interiors
> show a bias towards the most prominent primary color.  For example, yellow
> materials with even a slightly orange fade_color tend strongly towards red, and
> materials with a chartreuse or aqua fade_color tend strongly toward phosphor
> green.

Yup. That's exactly why I want a patched version of POV-Ray with 
spectral rendering. Still a way to go though - my plan is to refactor 
the hell out of POV-Ray until spectral rendering is just a matter of 
plugging in a different data type for colour handling.


Post a reply to this message

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