Forge Pipeline Skinned Animationsのロゴ

Forge Pipeline Skinned Animations

コミュニティ
Nebulavenus
forge-pipeline-skinned-animations

前処理済みの.fskin/.fanimアセットとForgeSceneSkinnedModelを使用して、パイプラインベースのスケルタルアニメーションをSDL GPUプロジェクトに追加します。

概要

公開者Nebulavenus
リポジトリforge-gpu
スキル名forge-pipeline-skinned-animations
スター
46
フォーク
7
同梱ファイル
指示のみ
ライセンスZlib
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    NebulavenusがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Forge Pipeline Skinned Animations」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/Nebulavenus/forge-gpu/tree/main/.claude/skills/forge-pipeline-skinned-animations
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

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
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでForge Pipeline Skinned Animationsを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にForge Pipeline Skinned Animationsを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Forge Pipeline Skinned Animationsは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

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.

よくある質問

AIスキル「Forge Pipeline Skinned Animations」では何ができますか?

前処理済みの.fskin/.fanimアセットとForgeSceneSkinnedModelを使用して、パイプラインベースのスケルタルアニメーションをSDL GPUプロジェクトに追加します。

TypingMindでForge Pipeline Skinned Animationsを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Forge Pipeline Skinned Animationsはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにForge Pipeline Skinned Animationsをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/Nebulavenus/forge-gpu/tree/main/.claude/skills/forge-pipeline-skinned-animationsを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Forge Pipeline Skinned Animationsを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Forge Pipeline Skinned Animationsで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもForge Pipeline Skinned Animationsを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Forge Pipeline Skinned Animations」は無料ですか?

はい。NebulavenusがZlibライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇