gitmyhub

enrinanime

C++ ★ 14 updated 17d ago

A lightweight C++ character animation engine under 3 MB that covers skeleton keyframing, ten inverse kinematics solvers, blend trees, and ARKit-compatible facial animation for games and apps.

C++C++20VulkanDirectX 12OpenGLsetup: hardcomplexity 4/5

ENRINANIME is a C++ animation engine aimed at developers who need to add character animation to games or interactive applications without taking on the size and cost of a professional content creation tool. The whole compiled library weighs around 3 megabytes, which the README compares to the tens of gigabytes that tools like Maya require.

The engine handles several interconnected problems in character animation. For basic movement, it supports keyframe animation on skeletons of up to 256 bones, with six different ways to interpolate between keyframes: constant, linear, cubic, Bezier, Hermite, and step. Bone channels can carry position, rotation, scale, shape deformation weights, visibility, and custom numeric values.

For body posing, the engine includes ten inverse kinematics solvers. Inverse kinematics is the technique where you specify where a hand or foot should land and the solver works backward to figure out how the arm or leg joints need to rotate to get there. Different solvers are provided for different body parts: two-bone for arms and legs, spinal solvers, hand-specific, foot placement, and a full-body solver.

For blending between animations, it uses a blend tree system with twelve node types. This lets developers mix multiple animation clips together based on game parameters, such as blending a walk animation with a run animation proportionally to the character's speed.

For facial animation it implements 55 blend shapes compatible with Apple's ARKit face tracking format, covering eyes, brows, cheeks, jaw, and a full range of mouth shapes. A phoneme system handles automatic lip synchronization to speech.

The engine supports Vulkan, DirectX 12, and OpenGL rendering backends and runs on Windows, Linux, macOS, and Android. It is built with C++20 and uses a multithreaded job system for performance. The README is written as detailed technical documentation with code examples.

Where it fits