Separate Curve Editor, detached from Animation Editor

I would like the Curve Editor plugin to be have a separate version from the one in the Animation Editor.
This would allow developers to use animation curves for a variety of different purposes.
The most useful cases I can present are related to FloatCurves specifically. A UI Element for drawing curves that users could use in-game would also be useful.

A lot of components in unity use this tool. Here are some examples of alternative uses for Animation Curves:

12 Likes

YES! A MILLION TIMES YES would I want this in my Studio!

A CurveValue object would be the GREATEST thing ever! With a separate curve editor, maybe we could use them like this:

CurveValue:GetStep(stepInt)

CurveValue:Run(waitTime) -- which could shift the curve actively, changing the current step index

CurveValue:GetCurrentStep() -- returns current step index, which could be changed via the Run function

Although I’m pretty sure there would be a better implementation of this, it would be VERY useful while making custom tweens and more! The new Audio API could integrate this for custom fading instruments as you said above, and even the NumberSequence editor could be improved by polishing it with a curve editor + increasing the max amount of points!

6 Likes

Yeah, particles and audio could definitely benefit a lot from it, although in order to generate random-ness you would need to either introduce envelopes into curves, or randomize between two curves.

1 Like

Right-click to split curve? Would be awesome.

1 Like

I’m bumping this post because it is very nice addition.

okay coming back to this uh roblox already has a curve value gg

1 Like

Yep. Just cant edit it without using an animation editor or writing to it with a script. You can create them with:

local floatCurve = Instance.new("FloatCurve")

local rotationCurve = Instance.new("RotationCurve")

local vectorCurve = Instance.new("Vector3Curve")
vectorCurve:X() vectorCurve:Y() vectorCurve:Z()

local angleCurve = Instance.new("EulerRotationCurve")
angleCurve:X() angleCurve:Y() angleCurve:Z()

I’m not opposed to this idea; however, it would only be beneficial if it was a DataType instead of an Instance.

If you have ever benchmarked Vector3Curve/EulerRotationCurve and compared it to any optimized Lua implementation (like my Path module for example) you’ll find that Roblox’s solution is painfully slow; almost, practically unusable for real-time applications.

I’m assuming it’s slow due to the overhead of it being an Instance and not having any internal performance benefits that come with being a dedicated DataType.

If it’s a DataType though, it’ll most certainly be as fast or faster than the fastest Lua implementations for these type of Curve solvers at the moment.

I would of course expect the same feature set as my Path module implementation (since it covers all potential use-cases somebody would have for a built-in feature like this);

  • Getting a Value at set Time/Progress (two different concepts)
  • Getting the Distance traveled at set Time/Progress
  • Being able to get the values at a provided intersection value for any axis

EDIT: Something I obviously didn’t account for was that it obviously has to be a DataType if it’s going to be used in properties with an editor like ColorSequence or NumberSequence

Thought I’d delete and repost my message since I was in a rush writing it before and I wanted to give a more in-depth explanation as I’ve been asked by several people on Discord about whether I’m going ahead with making my own implementation. I’ll be uploading this and many more suggestions as separate posts soon—assuming the useless application system finally processes my application that’s been pending for months on end.

What Are Animation Curves and Why Are They Important?

Curves are pretty much everywhere in the natural world — nature, mathematics, physics, animations, tween styles, you name it. So it’s no surprise that digital content (games, movies, etc.) tries to avoid using the linear style of interpolation (e.g., TweenService) because it just feels janky and off. If you’re struggling to make something feel fluid, smooth, or if your game’s output numbers feel off, the fix is probably an animation curve away! At its core, an animation curve is a predefined curve, as shown below.

inspector

The uses are too numerous to list, but here are a few random examples:

  • Custom tween styles for anything you can imagine!! (welds, colors etc).
  • Additive base recoil, which is really the bread and butter of smooth custom implementations.
  • IK transition presets (my main use case at the moment, which is essential to my project).
  • UI transitions and health bars.
  • Custom audio fading.
  • Particle properties and dynamic particle effects!!
  • Simulating a suspension system that provides upward forces for a car (for PID-based implementations).
  • Realistic/arcade braking forces suited to your game’s needs and aesthetics.
  • Latency prediction for specific cases.

Seriously, Roblox?

It’s actually unacceptable that a game engine in 2024 lacks the basic functionality of animation curves—something so fundamental. As usual, you can trust Roblox to lack features that actually matter while focusing on more useless niche features. Most “serious” engines and even programs like After Effects include this functionality, and it’s used in most games you enjoy playing outside of Roblox.

Implementation: Why Not Use the Infamous Vector3Curves?

Some people browsing the engine docs may have come across Vector3Curve/EulerRotationCurve tucked away for using animation curves in animations. Although this could be used, @SoCalifornian kindly tested it along with myself testing it, and as expected, the instance-based implementation is “painfully slow.” This isn’t really Roblox’s fault—the overhead (memory and performance) of it being an instance, rather than built into the engine as a DataType, makes it much less viable as a long-term solution.

If this were a built-in DataType, it also allows it to be used as an attribute (giving a graph editor on screen), which would put the capabilities and workflow on par with Triple-A engines also giving non scripters the ability work on the curves in team projects.

In terms of using the curves Unity has a perfect implementation for curves and roblox really does not need to be awkward doing their own.

For those who want to explore further:

4 Likes

Yes yes yes. A thousand times yes.
I have quite literally had so many cases where I thought to myself “this would be so muuch easier with an animation curve”.

1 Like