Simulating Low Framerate for an anime style game?

My project is stylised and I’m looking for a way to sort of “fake” a low framerate look, similar to an anime at around 12 fps ish.

It currently makes rather heavy use of physics (hair, cloth, ragdolls etc), which rules out simply lowering all animations framerate unless there’s a way to “lower the framerate” of physics simulations.

It also requires quick inputs from the player, which means just locking the game’s framerate is not really an option.

Any ideas?

Hi there,

You need to make a movement accumulator for pretty much any movement you make. It’s like stop motion. There are some plugins NESteppedAnimation just for animation have specilized look. Which would possibly solve a lot of things that you want.

However for physics movement and kinematic you need to make custom accumulator to achieve that.

Like if you are moving and object on tick you can write accumulators like below.

void USomeComponent::TickComponent(float DeltaTime, ELevelTick TickType,
                                       FActorComponentTickFunction* ThisTickFunction)
{
	Super::TickComponent(DeltaTime, TickType, ThisTickFunction);

		if (ShouldMotionTick(DeltaTime))
		{
			ComponentMotionRoot(DeltaTime);
		}
}

Accumulator

bool USomeComponent::ShouldMotionTick(float DeltaTime)
{
	// Always tick if set to -1 
	if (TargetMotionFPS <= 0.f)
	{
		MotionSampleTime += DeltaTime;
		return true;
	}

	// Quantized mode
	const float FrameStep = 1.0f / TargetMotionFPS;
	MotionSampleAccumulator += DeltaTime;

	if (MotionSampleAccumulator >= FrameStep)
	{
		MotionSampleAccumulator -= FrameStep;
		MotionSampleTime += FrameStep; // step in fixed increments
		return true;
	}

	return false;
}
void USomeComponent::ComponentMotionRoot(float DeltaTime)
{
	FRotator TargetRot;
	FRotator FromRot = Root->GetRelativeRotation();
	if (FromRot != TargetRot)
	{
		WeaponRoot->SetRelativeRotation(FMath::RInterpTo(FromRot, TargetRot, DeltaTime, 8));
	}
}

tbh not sure but for physics simulation like ragdolls, didn’t dive those yet but I know that quantinizing the chaos sim is not a very good idea, instead motion and position execution maybe accumulated. you need to inherit and write a new class with accumulator that strictly uses this or modify engine code. However this hair, cloth , ragdoll all can be stepped on animation/ position execution side rather than physics side. Animations are easier to render as stop motion in that terms and would be probably looking nicer and stylistic.

If you really really need to accumulate physics for let’s say hair, you let run full speed sim but gate updates. Also in addition you can accumulate shader and vfx similar way QuantizedTime = floor(Time * TargetFPS) / TargetFPS

That plugin would solve a lot of artistic problems you want in you game.
You can write a simple script on niagara side to step with a frame rate/ accumulator.
Try use VFX or animation for hair / cloth it would be simpler and nicer.
Ragdolls if physics would be the hardest to nail down still can be done by just gating updated.

1 Like