Color by Speed Help

Hi Bobo,
I am working with your ColorBySpeed operator u made inthe tutuorials for box3 in the kraka docs,
i like this one alot, but would like to have better “control” over the way how color behaves,
for this reason i have exposed all parameters, added the subtraction mechanism for all channels, and now its very hard for me to control what colors does what :slight_smile:

Levels just controls the RGB values equally for all, raising the bar for all values
rgb-fade: controles what value it is subtracted from,
and the rgb-var can be overlooked for now they just change the variance of the values
Gain is the multiplier for the values before being sent out

I would like to control how the speed affects the colors , but it seems to be a very very thin line when 2 colors meet (which is my goal), as usually it is just one dominating,
can you help me reduce this trial and error, and help me make the operator give as much control as possible without having to trial and error until something works out,
I think it would be possible to include the minus operation for each color, but maybe i am lacking the knowledge to fully understand the procedure

my last question would be: how can i convert this box3 setup into a KCM so i can use it (and the same control & settings) for partitioned particles later on?

A possible variation of this could once again just map the speed into a 0.0 to 1.0 space and write the value into a Mapping Channel, thus being able to grab a color from a texture map (e.g. a Gradient Ramp) like we demonstrated with KCMs and, say, FumeFX Temperature visualization.

So instead of trying to get the right color out of the velocity, you could just try to get the right value between 0.0 and 1.0 using any mathematical functions you want, then simply tweak the Gradient Ramp to deliver the color you want at any U coordinate between 0.0 and 1.0…