Smooth color changes

Blitz3D Forums/Blitz3D Beginners Area/Smooth color changes

Moraldi(Posted 2006) [#1]
I need to change the brush color of a mesh from (r1, g1, b1) to (r2, g2, b2) smoothly but I can't handle it because red range (r2 - r1) it could be different from green (g2 - g1) and blue. Any help?


Stevie G(Posted 2006) [#2]
Use simple interpolation ...

t# = 0

Repeat
  t# = t# + .01
  R = r1 + ( r2 - r1 ) * t
  G = g1 + ( g2 - g1 ) * t
  B = b1 + ( b2 - b1 ) * t
Until t# = 1.0



Stevie


Moraldi(Posted 2006) [#3]
Was it so simple? Thanks Stevie G!