godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.16k stars 97 forks source link

Add discrete interpolation to curves #7222

Open QbieShay opened 1 year ago

QbieShay commented 1 year ago

Describe the project you are working on

VFX, and particle system rework

Describe the problem or limitation you are having in your project

Now that I'm exposing velocity curves to the particle systems, I am finding myself very often making curves with sharp cutoff (imagine square wave) to have fine control of the motion. It would help me in this endeavour if i could disable interpolation on curves in the same way as color.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

It's just very finnicky to put a point right below another and to have to move tangents around

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Add an option for interpolation to curves to have constant, linear, and bezier

If this enhancement will not be used often, can it be worked around with a few lines of script?

Yes, it can be worked around, but the ux is meh

Is there a reason why this should be core and not an add-on in the asset library?

see above

Calinou commented 1 year ago

Should the option be defined on the entire curve, or on a per-point basis? In Gradient, it's defined on the entire gradient. In Animation, it affects the entire track, even though each key can have its own easing (including 0.0 which provides a similar effect).

QbieShay commented 1 year ago

I think curve-wide is enough, pretty much because this would be used for a derivative (velocity) so it works very well.