POV-Ray : Newsgroups : povray.text.scene-files : Colors exceeding the 0..1 range, wraparound Server Time
28 Mar 2024 07:34:54 EDT (-0400)
  Colors exceeding the 0..1 range, wraparound (Message 1 to 2 of 2)  
From: Mike Horvath
Subject: Colors exceeding the 0..1 range, wraparound
Date: 21 Mar 2017 22:02:43
Message: <58d1db43@news.povray.org>
On 3/19/2017 6:30 PM, clipka wrote:
 > Am 19.03.2017 um 23:04 schrieb Mike Horvath:
 >
 >> Did you use a function to color the shape, or did you color each
 >> triangle in a solid color? I am doing the latter at the moment using the
 >> xyz2RGB() macro that comes with Lightsys. It works okay, but you can see
 >> each and every triangle as a result. I don't like that.
 >>
 >> I also tried re-using the function I used to color the sRGB gamut, and
 >> the result is very wonky and random looking. Not good.
 >
 > I used an average of three function pattern pigments, each representing
 > the R, G or B component, respectively (multiplied by 3, so that the
 > average effectively implemented a sum), of the colour space in question
 > (CIE xyY in the particular case).
 >
 > The functions did not go via sRGB, but straight from xyY to XYZ and from
 > there to linear RGB (with sRGB primaries).
 >
 > As the entire shape is outside the linear RGB gamut, a straightforward
 > implementation of the functions would inevitably have exceeded the 0..1
 > range, and thus have caused undesired wraparound in the function
 > pattern; I therefore designed the functions to nominally return values
 > in the range from 0.5 to 0.6, and chose the colour map in a manner to
 > compensate (using e.g. `color_map{[0, red -5*3][1, red 5*3]}` for the
 > red component; note that the values of -5 and +5 compensate for the
 > uncommon nominal function range, while the factor of 3 is the one
 > required to effectively turn the average into a sum).
 >

I've used this technique a few times successfully. But it is failing on 
the attached scene. Most of the pigment is okay, but there's a huge red 
chunk on the left side. I was wondering if you could take a look and see 
what is broken.

Thanks!


Mike


Post a reply to this message


Attachments:
Download 'cie_basic_scene_settings.inc.txt' (4 KB) Download 'cie_color_conversion_formulas.inc.txt' (15 KB) Download 'cie_mesh_generation.inc.txt' (33 KB) Download 'cie_xyz_data.inc.txt' (456 KB) Download 'cie_visible_gamut_lab_space_d65_whitepoint_cube_mesh.pov.txt' (4 KB)

From: Mike Horvath
Subject: Re: Colors exceeding the 0..1 range, wraparound
Date: 21 Mar 2017 23:07:15
Message: <58d1ea63@news.povray.org>
I found some of the issues. Please examine these files instead of the 
ones in my last post. Thanks.


Mike


Post a reply to this message


Attachments:
Download 'cie_basic_scene_settings.inc.txt' (4 KB) Download 'cie_color_conversion_formulas.inc.txt' (16 KB) Download 'cie_mesh_generation.inc.txt' (32 KB) Download 'cie_xyz_data.inc.txt' (456 KB) Download 'cie_visible_gamut_lab_space_d65_whitepoint_cube_mesh.pov.txt' (4 KB)

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