playMaker

Author Topic: ColorRamp math help![SOLVED]  (Read 1384 times)

Splankton

  • Sr. Member
  • ****
  • Posts: 268
ColorRamp math help![SOLVED]
« on: August 04, 2015, 02:54:51 PM »
Hi,
I want to use a colorRamp, to go from 1 color to another, on the value of a float.

I have 2 floats, the (target) this is the value where I want the 2nd color to be at 100%
And (current)
So say, if the (target) is at 80 and the (current) is at 40, I want the 2nd color to be 50%
How can I do this?
« Last Edit: August 05, 2015, 02:44:02 PM by Splankton »

Splankton

  • Sr. Member
  • ****
  • Posts: 268
Re: ColorRamp math help!
« Reply #1 on: August 05, 2015, 02:43:50 PM »
Ok, I've done this by dividing the 2 floats and sampling the ramp with the result.  Now I want to add in another ramp when the result float is greater than the 1st ramps 2nd color.  So I can get something like a white flash.