Animation cubic easing direction reversed

Twenty days later here. Still not fixed. I understand if this is hard or something, but this is really ruining my animations!

3 Likes

At this point, someone should just make a plugin that automatically swaps cubic in and cubic out keyframes. On Roblox’s side, it is very frustrating that this still hasn’t been fixed for over a year, when to fix all this is to literally just rename the easing styles to their proper function.

3 Likes

Moon Animation Editor is also reversed but the output didn’t show it as the wrong way

I’d go for Blender because why not

2 Likes

this happened to me today. good lord

2 Likes

This is still an issue! It is very frustrating that I can’t preview my animations exactly as they’ll appear when played back in a real animation!

3 Likes

Hello, information on why this is happening:
Roblox’s animation editor relies on a EasingStyles module, whose source is:

local module = {}

--Ignore semicolons. Converted from C++

module.GetEasing = function(style, direction, percent)
	if style == "Bounce" then
		if direction == "Out" then
			return 1 - easeOut(percent, bounce)
		elseif direction == "In" then
			return 1 - bounce(percent)
		else
			return 1 - easeInOut(percent, bounce)
		end
	elseif style == "Elastic" then
		if direction == "Out" then
			local totalTime = 1
			local p = totalTime * 0.3;
			local t = 1 - percent;
			local s = p / 4;
			return (1 + 2 ^ (-10 * t) * math.sin((t * totalTime - s) * (math.pi * 2)/  p));
		elseif direction == "In" then
			local totalTime = 1
			local p = totalTime * 0.3;
			local t = percent;
			local s = p / 4;
			return 1 - (1 + 2 ^ (-10 * t) * math.sin((t * totalTime - s) * (math.pi * 2) / p));
		elseif direction == "InOut" then
			local t = percent *2;
			local p = (.3*1.5);
			local s = p/4;
			if t < 1 then
				t = t - 1;
				return 1 - (-0.5 * 2 ^ (10 * t) * math.sin((t - s) * (math.pi * 2) / p));
			else
				t = t - 1;
				return 1 - (1 + 0.5 * 2 ^ (-10 * t) * math.sin((t - s) * (math.pi * 2) / p));
			end
		end
	elseif style == "Cubic" then
		if direction == "Out" then
			return 1 - easeOut(percent, cubic)
		elseif direction == "In" then
			return 1 - cubic(percent)
		elseif direction == "InOut" then
			return 1 - easeInOut(percent, cubic)
		end
	elseif style == "Linear" then
		return 1 - percent
	elseif style == "Constant" then
		if style == "Out" then
			return 1
		elseif style == "In" then
			return 0
		elseif style == "InOut" then
			return 0.5
		end
	end
end

function easeIn(t,func)
	return func(t)
end

function easeOut(t,func)
	return 1 - func(1 - t)
end

function easeInOut(t,func)
	t = t * 2
	if t < 1 then
		return easeIn(t, func) * 0.5
	else
		return 0.5 + easeOut(t - 1, func) * 0.5
	end
end

function bounce(t)
	if t < 0.36363636 then
		return 7.5625 * t * t
	elseif t < 0.72727272 then
		t = t - 0.54545454
		return 7.5625 * t * t + 0.75
	elseif t < 0.90909090 then
		t = t - 0.81818181
		return 7.5625 * t * t + 0.9375
	else
		t = t - 0.95454545
		return 7.5625 * t * t + 0.984375
	end
end

function cubic(t)
	return t ^ 3
end

return module

If you use this module and run

local A1 = EasingStyles.GetEasing('Cubic', 'In', 0.5)
local A2 = TweenService:GetValue(0.5, Enum.EasingStyle.Cubic, Enum.EasingDirection.Out)
print(A1 == A2)

the result will print true.
This means that the problem here is the EasingStyles module they use has problems. I’ve also noticed how in general, the module is inconsistent with Roblox’s TweenService:GetValue almost always.

For example,

local A1 = EasingStyles.GetEasing('Elastic', 'In', 0.5)
local A2 = TweenService:GetValue(0.5, Enum.EasingStyle.Elastic, Enum.EasingDirection.In)
print(A1, A2)

the EasingStyles module will print -0.015625, whilst :GetValue will print -0.022097086533904. This in itself shows that there’s an issue in one of the modules, and I assume it’s EasingStyles.

An easy solution would be to just switch to TweenService:GetValue, which would not only fix these issues, but make the results consistent with TweenService and also give support for more tween styles.

The reason I even know about this is because I spent weeks ripping my hair out, figuring out why my module, which calculated the CFrames a limb would be in during a specific time, was inconsistent with the actual animation.

@Hippie_ofDoom please look into this!

15 Likes

Update… Still broken


This video shows the worst case scenario. (Pardon the lag, laptop doesn’t like recording while the game is running)

Project file: animationbug.rbxl (29.8 KB)

8 Likes

Same issue with my FPS model, but it seems like InOut is being exported as “In*” rather than, well, InOut.

Video:

(Just in case, let me know if I should post this somewhere else, please. Thanks.)

EDIT: The exported cubic InOut seems to be using the “old version(?)” rather than the new one shown in the Animation Editor.

4 Likes

Just realised that it’s been a whole year since the report and it hasn’t been fixed up yet. All of the directions for cubics are just reversed. In, Out and InOut

Ironically, using the old Animator Plugin that buildthomas published (The Legacy one) seems to display the animation position correctly.

Roblox’s animator plugin.

Legacy one.

7 Likes

It seems to be a personal frustration for me and many others that this bug is still yet to be resolved. Roblox needs to step up their game here: Many animators rely on the official Roblox Animation plugin to create their animations due to the presence of its simplicity and efficiency.

All of us here would be looking forward for any response on this specific issue. It is ridiculous that this has been prolonged for so long.

5 Likes

Can verify this has been an issue for a good while.

A simple, if not hacky fix, would just be having the animation editor invert the easing for cubic keyframes, at least until the root of the problem can be found.

3 Likes

It seems they updated the Animation Editor. Can you guess what they have not fixed and aren’t planning to fix over the span of 4 or more weeks?

3 Likes

I know what you’re talking about by finding out the hard way.

It’s by uploading a animation with cubic tweens and comparing the export and Animation Editor.

2 Likes

This is likely related to the choppiness of “Cubic” on InOut, too, which has been occurring the past year. It really makes easing styles completely useless, which is a shame because they made a big deal out of it when it first came out. If they could fix this along with adding a few more easing styles like the Moon Animator has, it would make animating a whole lot easier.

2 Likes

Update, it still is broken plus inverting the easing style does not actually fix anything. When i invert the easing style in the animation editor, the resulting animation that plays in the client is still not as smooth as it was in the animator before flipping the easing style. It’s not great to know that i cant rely at all on the roblox animation editor anymore and instead have to export from other applications.

2 Likes

export from other applications

Do you happen to know any way to import existing Roblox animations into these applications?

2 Likes

Just switched to Moon at this point. It’s worth it to learn the different shortcuts and button layouts at this point.

1 Like

no, although the roblox animation editor is very limited and i would recommend playing with blender’s

2 Likes

wait, is it possible to import blender animations into roblox? Can you link me a video or something?

1 Like

It is a fairly simple process. If you made your character in blender then it should require no extra work, just open up the animation editor and import the animation from FBX after exporting from blender with the Bake Animation option (One animation per FBX file only). Make sure to export them without animation first.

If you want to animate a roblox rig you will need to first get a character rig for r15/rthro/etc and then export from there. In all honestly, since this issue has persisted for such a long time, it is probably a better alternative to just use blender or other animation plugins/tools.
This post is fairly outdated since you can natively import FBX animations now, but you still need the Blender plugin to be able to get the character rig in Blender without making it yourself.

2 Likes