Put Ayatsuri2D models in your engine.

One C header and a library. Load a model, set its parameters, update, draw. Unity, Godot, Unreal, Python, Node, the browser through WebAssembly, or an engine of your own.

ABI 1, Apache-2.0. Builds for Windows, macOS, Linux and WebAssembly.

main.cQuick start
#include "ayatsuri.h"

/* an .aom or a .moc3 */
ay2d_model *m = ay2d_load(bytes, len);
uint32_t yaw =
    (uint32_t)ay2d_parameter_index(m, "ParamAngleX");

/* every frame */
ay2d_set_parameters(m, &yaw, &head_yaw, 1);
ay2d_update(m, dt);
/* draw list[0..n) in order */
uint32_t n = ay2d_drawables(m, list, cap);

ay2d_free(m);

Set, update, draw

  1. ay2d_set_parameters

    Set

    Head angle, eye open, mouth open: the numbers your tracking or game logic gives you. From any thread.

  2. ay2d_update

    Update

    Motions, expressions and physics layer over your values, deformers bend the meshes. One call.

  3. ay2d_drawables

    Draw

    Every visible mesh, back to front: positions, uvs, indices, opacity, blend and masks, in arrays that stay put.

The order of one update: the host's values, then motions, expressions and physics over them, then deformers and meshes

What ABI 1 does

Loads
.aom files with their motions, expressions and physics inside, and Cubism .moc3 bundles with their JSON beside them (5.3 included).
Threads
Set parameters from any thread; a render thread reads the last finished frame while the next one is made. A second thread driving the model gets BUSY, never a race.
Draws
With whatever you draw with: OpenGL, Vulkan, Metal, Direct3D, WebGL or an engine's own meshes. Blend flags, clip masks and changed-this-frame bits tell you what to do and what to skip.
Moves
Motions with crossfades and events, expressions with Add, Multiply and Overwrite, pendulum physics with wind.
Fails safely
Every offset and index in a file is checked before it is used. Calls return a status and say why on this thread; nothing panics across the boundary.
Stays small
One static or shared library and one header. Link the static one with dead stripping and only the calls you use stay in your binary.

Coming from the Cubism SDK

The ABI already covers what a viewer or a VTuber app takes from the Cubism Core and much of the Framework: models, parameters, parts, drawables, masks, motions, expressions and physics. The checklist shows what is there and what comes next.

The checklist

Get it

Grab the header, or build the library from source with one command. Prebuilt libraries for each system come with the SDK's first release.