Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualJuliean

Posted 25 April 2013 - 07:05 AM

Hello,

 

I want to implement interpolation for some of my particle parameters, for example color. Say I have these two values:

 

Color start(1.0f, 0.4, 0.0f);
Color end(0.2f, 0.2, 0.2f);

I want to interpolate between those two. For the effect I'm trying to achieve a linear interpolation isn't good enough. I want to play around with different interpolation.

 

What are common practices of doing so? I don't want to hardcode this, basically I want to have something like in some of those edtiors - a field where you have a function line from (0, 0) to (1,1). You can then deform this line by dragging. The x value would be the time between spawn and death), the y value would be the interpolation value (0 = start, 0.5 = halfway through start and end, 1.0 = end).

 

Not talking about the editor thingy itself, how would one implement such a thing, without hardcoding it? Do you have some pseudo-code or papers describing such a technique?

 


#1Juliean

Posted 25 April 2013 - 05:21 AM

Hello,

 

I want to implement interpolation for some of my particle parameters, for example color. Say I have these two values:

 

Color start(1.0f, 0.4, 0.0f);
Color end(0.2f, 0.2, 0.2f);

I want to interpolate between those two. For the effect I'm trying to achieve a linear interpolation isn't good enough. I want to play around with different interpolation.

 

What are common practices of doing so? I don't want to hardcode this, basically I want to have something like in some of those edtiors - a field where you have a function line from (0, 0) to (1,1). You can then deform this line by dragging. The x value would be the time between spawn and death), the y value would be the interpolation value (0 = start, 0.5 = halfway through start and end, 1.0 = end).

 

Not talking about the editor thingy itself, how would one implement such a thing, without hardcoding it? Do you have some pseudo-code or papers describing such a technique?

 


PARTNERS