POV-Ray : Newsgroups : povray.general : smooth gradient color_map : Re: smooth gradient color_map Server Time
2 May 2024 01:35:31 EDT (-0400)
  Re: smooth gradient color_map  
From: jr
Date: 22 Jul 2017 05:05:12
Message: <59731548$1@news.povray.org>
hi,

thank you for the quick replies, Omniverse & Clipka.


On 22/07/2017 06:16, omniverse wrote:
> And guess I should have asked why "254" instead of the usual 0 to 255.
> Won't matter really, you only need to change the numbers to what you
> want.

simple memory fault :-(  I thought I'd read 254 being the max # entries
but, checking, the doc does say "from 2 to 256 entries".


On 22/07/2017 08:31, clipka wrote:
> If you're unhappy with the above gradient and feel that its brightness
> appears non-linear, try the `blend_mode` parameter, and maybe also
> `blend_gamma`. For aesthetically pleasing results, `blend_mode 3` is
> currently the best choice; it interpolates chromaticity and brightness
> separately, using non-linear interpolation for the latter:
> 
>     global_settings { assumed_gamma 1.0 }
>     ...
> 
>     pigment {
>       gradient x
>       color_map {
>         blend_mode 3
>         blend_gamma 2.5 // default
>         [0, <0,0,1>]
>         [1, <1,0,0>]
>       }
>     }

I just tried this and get good-ish results (a little too homogeneous
perhaps (the color_map is used to visualise data in a DF3)), but there's
no mention of the blend_* constraints in the installed (v 3.7.1a)
documentation.  I'll have a look in the online docs later.


again, many thanks.
jr.


Post a reply to this message

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