شعار Forge Skinning Animations

Forge Skinning Animations

المجتمع
Nebulavenus
forge-skinning-animations

أضف رسومًا متحركة للجلد الهيكلي إلى مشروع SDL GPU، باستخدام التسلسلات الهرمية لمفاصل glTF، ومصفوفات الربط العكسية، وأوزان المزج لكل رأس.

نظرة عامة

الناشرNebulavenus
المستودعforge-gpu
اسم المهارةforge-skinning-animations
النجوم
46
التفريعات
7
الملفات المرفقة
تعليمات فقط
الترخيصZlib
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • مكتفية بذاتها

    كل ما يحتاجه النموذج موجود في التعليمات — لا ملفات إضافية لمزامنتها.

  • مفتوحة المصدر

    نشرها Nebulavenus على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Forge Skinning Animations في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/Nebulavenus/forge-gpu/tree/main/.claude/skills/forge-skinning-animations
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

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-skinning-animations .claude/skills/forge-skinning-animations
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Forge Skinning Animations في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Forge Skinning Animations تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Forge Skinning Animations بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

Add vertex skinning to an SDL3 GPU scene using skeletal animation data from glTF files. The technique evaluates keyframe channels for translation, rotation (slerp), and scale, rebuilds the joint hierarchy, computes joint matrices (inverse(meshWorld) × jointWorld × inverseBindMatrix), and blends up to 4 joint transforms per vertex in the shader. Use this skill when you need animated characters, creatures, or any mesh that deforms with a skeleton.

See GPU Lesson 32 — Skinning Animations for the full walkthrough.

Key API calls

FunctionPurpose
forge_gltf_load()Load glTF with skins, joints, and animation data
forge_gltf_anim_apply()Evaluate all animation channels at time t
forge_gltf_compute_world_transforms()Propagate local transforms through the node hierarchy
mat4_multiply(a, b)Compose joint matrix: inverse(meshWorld) * jointWorld * inverseBindMatrix
mat4_inverse(m)Compute inverse mesh world for joint matrix formula

Skinned vertex layout

c
typedef struct SkinVertex {
    vec3   position;    /* 12 bytes — FLOAT3   */
    vec3   normal;      /* 12 bytes — FLOAT3   */
    vec2   uv;          /*  8 bytes — FLOAT2   */
    Uint16 joints[4];   /*  8 bytes — USHORT4  */
    float  weights[4];  /* 16 bytes — FLOAT4   */
} SkinVertex;           /* 56 bytes total      */

Pipeline vertex attributes:

  • Location 0: FLOAT3 at offsetof(SkinVertex, position)
  • Location 1: FLOAT3 at offsetof(SkinVertex, normal)
  • Location 2: FLOAT2 at offsetof(SkinVertex, uv)
  • Location 3: USHORT4 at offsetof(SkinVertex, joints)
  • Location 4: FLOAT4 at offsetof(SkinVertex, weights)

Joint matrix computation (per frame)

c
/* Full glTF formula: inverse(meshWorld) * jointWorld * inverseBindMatrix.
 * The inverse mesh world accounts for parent nodes above the mesh
 * (e.g. Z_UP, Armature rotations in CesiumMan). */
mat4 inv_mesh_world = mat4_inverse(mesh_node->world_transform);
for (int i = 0; i < skin->joint_count; i++) {
    int node = skin->joints[i];
    joint_matrices[i] = mat4_multiply(
        inv_mesh_world,
        mat4_multiply(scene.nodes[node].world_transform,
                      skin->inverse_bind_matrices[i]));
}

Shader pattern (vertex)

The vertex shader receives two uniform buffer slots:

  • Slot 0: scene uniforms (MVP, model, light_vp)
  • Slot 1: joint matrices array
hlsl
cbuffer JointUniforms : register(b1, space1)
{
    column_major float4x4 joint_mats[MAX_JOINTS];
};

/* Compute skin matrix from 4 weighted joints */
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 world = mul(skin_mat, float4(input.pos, 1.0));

Animation evaluation

forge_gltf_load() parses all animation channels from the glTF file. At runtime, forge_gltf_anim_apply() handles channel evaluation, then forge_gltf_compute_world_transforms() propagates the hierarchy:

c
#include "gltf/forge_gltf.h"
#include "gltf/forge_gltf_anim.h"

/* Each frame: evaluate channels, rebuild hierarchy, compute joints */
anim_time += dt * ANIM_SPEED;
if (scene.animation_count > 0) {
    forge_gltf_anim_apply(&scene.animations[0],
                          scene.nodes, scene.node_count,
                          anim_time, true);
}

mat4 identity = mat4_identity();
for (int i = 0; i < scene.root_node_count; i++)
    forge_gltf_compute_world_transforms(&scene,
                                        scene.root_nodes[i], &identity);

/* Then compute joint matrices and push to GPU uniform slot 1 */

Pipeline setup

c
/* Skinned vertex shader needs 2 uniform buffers. */
SDL_GPUShaderCreateInfo info;
info.num_uniform_buffers = 2;  /* slot 0: scene, slot 1: joints */

/* Push both uniform slots per draw call. */
SDL_PushGPUVertexUniformData(cmd, 0, &scene_uniforms, sizeof(scene_uniforms));
SDL_PushGPUVertexUniformData(cmd, 1, &joint_uniforms, sizeof(joint_uniforms));

Shadow pass

Use a separate shadow_skin.vert.hlsl that applies the same skin matrix before projecting into light clip space. Both passes share the same joint uniform data — no extra CPU work for skinned shadows.

Common mistakes

  • glTF quaternion order — glTF stores quaternions as [x, y, z, w], but the forge math library uses quat_create(w, x, y, z) with w first. Swapping the order silently produces incorrect rotations.
  • Missing inverse mesh world — The simplified formula world * inverseBindMatrix only works when the mesh node sits at the scene root. The full glTF formula is inverse(meshWorld) * jointWorld * inverseBindMatrix. CesiumMan has Z_UP and Armature parent nodes, so skipping the inverse mesh world produces distorted results.
  • Forgetting shadow skinning — The shadow pass must apply the same skin matrix in its vertex shader. Without this, the shadow stays in the bind pose while the mesh animates.
  • Joint count mismatch — The MAX_JOINTS constant in the shader must match the C-side JointUniforms struct. A mismatch silently corrupts uniform data.
  • Weight normalization — glTF requires weights to sum to 1.0, but some exporters produce slightly denormalized weights. The linear blend still works acceptably, but be aware of this if you see subtle artifacts.

glTF skin data

The forge_gltf.h parser provides:

  • ForgeGltfSkin: joints array, inverse bind matrices, skeleton root
  • ForgeGltfPrimitive: joint_indices (USHORT4), weights (FLOAT4)
  • ForgeGltfNode: skin_index for nodes referencing a skin

Load with forge_gltf_load() — skins are parsed automatically.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Forge Skinning Animations؟

أضف رسومًا متحركة للجلد الهيكلي إلى مشروع SDL GPU، باستخدام التسلسلات الهرمية لمفاصل glTF، ومصفوفات الربط العكسية، وأوزان المزج لكل رأس.

لماذا تستخدم Forge Skinning Animations على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Forge Skinning Animations عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Forge Skinning Animations في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/Nebulavenus/forge-gpu/tree/main/.claude/skills/forge-skinning-animations. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Forge Skinning Animations؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Forge Skinning Animations؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Forge Skinning Animations معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Forge Skinning Animations مجانية؟

نعم. نشرها Nebulavenus على GitHub بموجب ترخيص Zlib. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇