POV-Ray : Newsgroups : povray.general : Change color based on number and color_map : Re: Change color based on number and color_map Server Time
29 Jul 2024 08:15:59 EDT (-0400)
  Re: Change color based on number and color_map  
From: Anthony D  Baye
Date: 9 Mar 2012 16:20:01
Message: <web.4f5a72eca14f3928d7f39bd00@news.povray.org>
"worldbuilder" <nomail@nomail> wrote:
> I have a variable that can be set to a temperature and I am trying to get it to
> control the color. My current setup is to use a color_map to get the range of
> color needed, then map a pattern to that gradient. The only problem is that I
> can't use color_map with a solid color, and if I try first mapping some bozo to
> a gray value determined by STemperature and then to my color_map it maps the
> temp gradient directly to the noise, bypassing the effort to make it one solid
> color.

I've never found any way to convert from temperature to color, but something you
could try is creating an array of an arbitrary size, and then fill it with color
vectors taken from your gradient using eval_pigment.

once you have the array filled you can grab the color from your array by passing
it an index.

if your gradient is an image you can turn it into a pigment by using an image
map and scaling it appropriately.

Regards,

A.D.B.


Post a reply to this message

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