|
![](/i/fill.gif) |
> 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.
>
>
Don't use a color_map, but a spline.
Have controll points for various temperatures and access it with the
desired temperatures you want to represent.
Use the returned value as a plain pigment.
If you use many temperature samples, a linear spline may be enough, but
a cubic_spline will give you a smooth regular curve.
This is a big advantage compared to an array. An array only allow you to
have discreete values, and may need to be vary large, while a spline
gives you a continously changing value and support non-integer indexes.
It's accessed in a way that is similar to an array.
Alain
Post a reply to this message
|
![](/i/fill.gif) |