Logo: Forge Pipeline Skinned Animations

Forge Pipeline Skinned Animations

Communautéit
Nebulavenus
forge-pipeline-skinned-animations

Füügt pipeline-baséiert Skelettanimatioun zu engem SDL GPU-Projet bäi, mat virveraarbechten .fskin/.fanim-Assets a ForgeSceneSkinnedModel.

Iwwersiicht

EditeurNebulavenus
Repositoryforge-gpu
Skill-Nummforge-pipeline-skinned-animations
Stären
46
Forks
7
Matgeliwwert Dateien
Nëmmen Instruktiounen
LizenzZlib
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    Nebulavenus huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Forge Pipeline Skinned Animations an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/Nebulavenus/forge-gpu/tree/main/.claude/skills/forge-pipeline-skinned-animations
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Nebulavenus/forge-gpu.git /tmp/forge-gpu
mkdir -p .claude/skills
cp -r /tmp/forge-gpu/.claude/skills/forge-pipeline-skinned-animations .claude/skills/forge-pipeline-skinned-animations
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Forge Pipeline Skinned Animations an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Forge Pipeline Skinned Animations automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Forge Pipeline Skinned Animations net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Add skeletal animation using pre-processed pipeline assets (.fmesh v3, .fskin, .fanim) and the ForgeSceneSkinnedModel API in forge_scene.h. Joint matrices are computed on the CPU each frame and uploaded to a GPU storage buffer for vertex-stage skinning. Use this skill when you need animated characters or creatures with the pipeline asset workflow, or when you need transform-only animation on non-skinned models.

See GPU Lesson 43 — Pipeline Skinned Animations for the full walkthrough. For glTF-based skinning (without the pipeline), see GPU Lesson 32 — Skinning Animations.

Key API calls

FunctionPurpose
forge_scene_load_skinned_model()Load skinned model from .fscene + .fmesh + .fmat + .fskin + .fanim
forge_scene_update_skinned_animation()Advance time, evaluate keyframes, upload joint matrices
forge_scene_draw_skinned_model()Draw skinned model in main pass (binds joint storage buffer)
forge_scene_draw_skinned_model_shadows()Draw skinned model into shadow map
forge_scene_free_skinned_model()Release all GPU + CPU resources
forge_pipeline_anim_apply()Evaluate animation channels at time t (for transform-only use)
forge_pipeline_scene_compute_world_transforms()Propagate hierarchy after animation
forge_pipeline_compute_joint_matrices()Compute joint_matrix[i] = inv(mesh_world) × joint_world × IBM[i]

Skinned vertex layout (72 bytes)

c
/* Pipeline skinned vertex — 72-byte stride */
/* offset  0: float3  position   (12 bytes) */
/* offset 12: float3  normal     (12 bytes) */
/* offset 24: float2  uv         ( 8 bytes) */
/* offset 32: float4  tangent    (16 bytes) */
/* offset 48: uint16×4 joints    ( 8 bytes) */
/* offset 56: float4  weights    (16 bytes) */

Vertex attributes (all TEXCOORD semantics):

  • Location 0: FLOAT3 at offset 0 (position)
  • Location 1: FLOAT3 at offset 12 (normal)
  • Location 2: FLOAT2 at offset 24 (uv)
  • Location 3: FLOAT4 at offset 32 (tangent)
  • Location 4: USHORT4 at offset 48 (joints)
  • Location 5: FLOAT4 at offset 56 (weights)

Loading a skinned model

c
#define FORGE_PIPELINE_IMPLEMENTATION
#include "pipeline/forge_pipeline.h"

#define FORGE_SCENE_MODEL_SUPPORT
#define FORGE_SCENE_IMPLEMENTATION
#include "scene/forge_scene.h"

ForgeSceneSkinnedModel model;
if (!forge_scene_load_skinned_model(&scene, &model,
        "assets/Model/Model.fscene",
        "assets/Model/Model.fmesh",
        "assets/Model/Model.fmat",
        "assets/Model/Model.fskin",
        "assets/Model/Model.fanim",
        "assets/Model")) {
    SDL_Log("Failed to load skinned model");
    return SDL_APP_FAILURE;
}

Per-frame animation update

c
/* Set animation parameters */
model.anim_speed = 1.0f;
model.looping = true;

/* Evaluate keyframes, propagate hierarchy, upload joint matrices */
forge_scene_update_skinned_animation(&scene, &model, dt);

Drawing

c
mat4 placement = mat4_multiply(
    mat4_translate(vec3_create(0, 0, 0)),
    mat4_scale_uniform(1.0f));

/* Shadow pass */
forge_scene_begin_shadow_pass(&scene);
forge_scene_draw_skinned_model_shadows(&scene, &model, placement);
forge_scene_end_shadow_pass(&scene);

/* Main pass */
forge_scene_begin_main_pass(&scene);
forge_scene_draw_skinned_model(&scene, &model, placement);
forge_scene_end_main_pass(&scene);

Shader pattern (vertex)

The skinned vertex shader reads joint matrices from a storage buffer (StructuredBuffer) rather than a uniform buffer, supporting up to 256 joints:

hlsl
StructuredBuffer<float4x4> joint_mats : register(t0, space0);

float4x4 skin_mat =
    input.weights.x * joint_mats[input.joints.x] +
    input.weights.y * joint_mats[input.joints.y] +
    input.weights.z * joint_mats[input.joints.z] +
    input.weights.w * joint_mats[input.joints.w];

float4 skinned_pos = mul(skin_mat, float4(input.position, 1.0));
float3 skinned_nrm = normalize(mul((float3x3)skin_mat, input.normal));
float3 skinned_tan = normalize(mul((float3x3)skin_mat, input.tangent.xyz));

Transform animation (non-skinned models)

For models with animation but no skin (e.g., a rotating cube), load the animation separately and apply it manually:

c
ForgeSceneModel model;
ForgePipelineAnimFile anim;
float anim_time = 0.0f;

if (!forge_scene_load_model(&scene, &model, fscene, fmesh, fmat, base_dir)) {
    SDL_Log("Failed to load model");
    return SDL_APP_FAILURE;
}
if (!forge_pipeline_load_animation(fanim_path, &anim)) {
    SDL_Log("Failed to load animation");
    forge_scene_free_model(&scene, &model);
    return SDL_APP_FAILURE;
}

/* Each frame */
anim_time += dt;
if (anim.clip_count > 0) {
    forge_pipeline_anim_apply(&anim.clips[0],
        model.scene_data.nodes, model.scene_data.node_count,
        anim_time, true);
}
forge_pipeline_scene_compute_world_transforms(
    model.scene_data.nodes, model.scene_data.node_count,
    model.scene_data.roots, model.scene_data.root_count,
    model.scene_data.children, model.scene_data.child_count);

/* Draw with a model-level placement — node animation is applied
 * internally via the scene_data.nodes[*].world_transform values
 * that forge_pipeline_anim_apply() + compute_world_transforms() wrote. */
mat4 placement = mat4_identity();  /* or any model-level transform */
forge_scene_draw_model(&scene, &model, placement);

Pipeline files

FileContent
.fmesh v3Skinned vertices (72-byte stride, FORGE_PIPELINE_FLAG_SKINNED)
.fskinJoint hierarchy, inverse bind matrices, skin-to-node mapping
.fanimKeyframe clips with per-channel TRS data
.fsceneScene node hierarchy (parents, transforms)
.fmatMaterial definitions (colors, texture references)

Generate these from glTF source using:

bash
forge_mesh_tool model.gltf model.fmesh --verbose
forge_scene_tool model.gltf model.fscene --skins --verbose
forge_anim_tool model.gltf model.fanim --verbose

Common mistakes

  • Missing --skins flag — forge_scene_tool must be run with --skins to generate the .fskin file. Without it, joint hierarchy data is missing.
  • Pipeline quaternion order — Pipeline stores quaternions as [x, y, z, w], matching glTF. The forge math library uses quat(w, x, y, z) with w first. The pipeline evaluation functions handle this conversion internally.
  • Forgetting shadow skinning — Use forge_scene_draw_skinned_model_shadows() for the shadow pass. Using the non-skinned shadow draw produces a static bind-pose shadow.
  • Non-skinned model with animation — Do not use ForgeSceneSkinnedModel for models without a skin. Instead, load as ForgeSceneModel and apply animation with forge_pipeline_anim_apply() manually.

Heefeg gestallte Froen

Wat mécht de KI-Skill Forge Pipeline Skinned Animations?

Füügt pipeline-baséiert Skelettanimatioun zu engem SDL GPU-Projet bäi, mat virveraarbechten .fskin/.fanim-Assets a ForgeSceneSkinnedModel.

Firwat Forge Pipeline Skinned Animations op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Forge Pipeline Skinned Animations besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Forge Pipeline Skinned Animations an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/Nebulavenus/forge-gpu/tree/main/.claude/skills/forge-pipeline-skinned-animations an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Forge Pipeline Skinned Animations benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Forge Pipeline Skinned Animations benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Forge Pipeline Skinned Animations domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Forge Pipeline Skinned Animations gratis?

Jo. Nebulavenus huet de Skill ënner der Lizenz Zlib op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇