Forge Pipeline Assets logo

Forge Pipeline Assets

Community
Nebulavenus
forge-pipeline-assets

Load and render .fmesh binary meshes and pipeline-processed textures in SDL GPU applications

Overview

PublisherNebulavenus
Repositoryforge-gpu
Skill nameforge-pipeline-assets
Stars
46
Forks
7
Bundled files
Instructions only
LicenseZlib
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by Nebulavenus on GitHub. Read the source before you install it.

Installation

Install the Forge Pipeline Assets AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/Nebulavenus/forge-gpu/tree/main/.claude/skills/forge-pipeline-assets
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

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-assets .claude/skills/forge-pipeline-assets
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Forge Pipeline Assets in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Forge Pipeline Assets on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Forge Pipeline Assets is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Skill: Pipeline-Processed Assets

Load and render .fmesh binary meshes, .fmat material sidecars, and pipeline-processed textures in SDL GPU applications. This pattern replaces raw glTF loading with optimized binary assets produced by the forge-gpu asset pipeline.

When to use

  • Loading mesh assets processed by forge-mesh-tool (.fmesh v2 format)
  • Loading material data from .fmat sidecars (texture paths, PBR parameters)
  • Loading textures with .meta.json sidecar metadata
  • Setting up dual vertex formats (48-byte with tangents, 32-byte without)
  • Implementing LOD selection based on camera distance
  • Normal mapping with Gram-Schmidt TBN from pipeline tangent data

Key files

FilePurpose
common/pipeline/forge_pipeline.hRuntime loader for .fmesh + .fmat + textures
tools/mesh/main.cCLI tool that generates .fmesh + .fmat from OBJ/glTF
lessons/gpu/39-pipeline-processed-assets/main.cReference implementation

Key API calls

  • forge_pipeline_load_mesh(path, &mesh) — load .fmesh v2 binary into CPU struct
  • forge_pipeline_free_mesh(&mesh) — release CPU-side mesh data
  • forge_pipeline_has_tangents(&mesh) — check if mesh has 48-byte tangent vertices
  • forge_pipeline_lod_index_count(&mesh, lod) — get index count for a LOD level
  • forge_pipeline_lod_indices(&mesh, lod) — get index pointer for a LOD level
  • forge_pipeline_load_materials(path, &set) — load .fmat material sidecar
  • forge_pipeline_free_materials(&set) — release CPU-side material data
  • forge_pipeline_load_texture(path, &tex) — load texture via .meta.json sidecar
  • forge_pipeline_free_texture(&tex) — release CPU-side texture data

Pattern

1. Include the pipeline library

c
/* In exactly ONE .c file: */
#define FORGE_PIPELINE_IMPLEMENTATION
#include "pipeline/forge_pipeline.h"

2. Load a .fmesh mesh

c
ForgePipelineMesh mesh;
if (!forge_pipeline_load_mesh("model.fmesh", &mesh)) {
    /* handle error */
}

/* Check vertex format */
if (forge_pipeline_has_tangents(&mesh)) {
    /* 48-byte stride: position + normal + uv + tangent */
    ForgePipelineVertexTan *verts = (ForgePipelineVertexTan *)mesh.vertices;
} else {
    /* 32-byte stride: position + normal + uv */
    ForgePipelineVertex *verts = (ForgePipelineVertex *)mesh.vertices;
}

/* Upload to GPU */
SDL_GPUBuffer *vb = upload_gpu_buffer(device, SDL_GPU_BUFFERUSAGE_VERTEX,
    mesh.vertices, mesh.vertex_count * mesh.vertex_stride);

/* Access LOD levels */
for (uint32_t lod = 0; lod < mesh.lod_count; lod++) {
    uint32_t count = forge_pipeline_lod_index_count(&mesh, lod);
    const uint32_t *indices = forge_pipeline_lod_indices(&mesh, lod);
}

/* Cleanup */
forge_pipeline_free_mesh(&mesh);

3. Load materials from .fmat sidecar

c
ForgePipelineMaterialSet materials;
if (!forge_pipeline_load_materials("model.fmat", &materials)) {
    /* handle error */
}

/* Use material texture paths (not hardcoded filenames) */
for (uint32_t i = 0; i < materials.material_count; i++) {
    ForgePipelineMaterial *mat = &materials.materials[i];
    if (mat->base_color_texture[0]) {
        /* Extract filename, resolve in processed directory */
        const char *fname = filename_from_path(mat->base_color_texture);
        load_pipeline_texture(device, fname, /*srgb=*/true);
    }
    if (mat->normal_texture[0]) {
        const char *fname = filename_from_path(mat->normal_texture);
        load_pipeline_texture(device, fname, /*srgb=*/false);
    }
}

/* Cleanup */
forge_pipeline_free_materials(&materials);

4. Load a pipeline texture (via .meta.json sidecar)

c
ForgePipelineTexture tex;
if (!forge_pipeline_load_texture("diffuse.png", &tex)) {
    /* handle error — needs diffuse.meta.json sidecar */
}

/* Decode mip 0 (currently PNG bytes) */
SDL_IOStream *io = SDL_IOFromMem(tex.mips[0].data, tex.mips[0].size);
SDL_Surface *surface = SDL_LoadSurface_IO(io, false);
if (!surface) {
    /* decode failed — fall back to loading from disk */
    SDL_CloseIO(io);
    forge_pipeline_free_texture(&tex);
    surface = SDL_LoadSurface("diffuse.png");
} else {
    SDL_CloseIO(io);
    forge_pipeline_free_texture(&tex);
}

5. Generate .fmesh + .fmat files

bash
# From glTF with LOD levels and tangent generation
./build/tools/mesh/forge_mesh_tool \
    input.gltf output.fmesh \
    --lod-levels 1.0,0.5,0.25 --verbose

# Creates output.fmesh + output.fmat + output.meta.json

6. Create .meta.json sidecars for textures

json
{
  "width": 1024,
  "height": 1024,
  "format": "rgba8",
  "mips": [
    { "level": 0, "width": 1024, "height": 1024, "file": "texture.png" }
  ]
}

Vertex formats

FormatStrideFieldsUse case
No tangent32 bytespos(12) + normal(12) + uv(8)Basic Blinn-Phong
With tangent48 bytespos(12) + normal(12) + uv(8) + tangent(16)Normal mapping

LOD selection

c
uint32_t select_lod(float distance, uint32_t max_lods) {
    if (max_lods <= 1) return 0;
    if (distance < 3.0f) return 0;
    if (distance < 8.0f && max_lods > 1) return 1;
    if (max_lods > 2) return 2;
    return max_lods - 1;
}

Common mistakes

  • Forgetting FORGE_PIPELINE_IMPLEMENTATION — the header is header-only; exactly one .c file must define this macro before including it, or you get linker errors (undefined symbols for all forge_pipeline_* functions).
  • Using the wrong vertex stride for the pipeline — .fmesh files with tangents have 48-byte vertices; without tangents, 32 bytes. Check forge_pipeline_has_tangents() and create separate GPU pipelines for each stride. SDL GPU validates stride at pipeline creation time.
  • Not creating separate shadow pipelines per stride — shadow shaders only read position (attribute 0), but the vertex stride still must match. You need one shadow pipeline per vertex stride (48-byte and 32-byte).
  • Loading textures without the .meta.json sidecar — forge_pipeline_load_texture() reads <path>.meta.json alongside the texture file. If the sidecar is missing, the call fails.
  • Using SDL_LoadBMP_IO for PNG data — SDL_LoadBMP_IO only decodes BMP format. Use SDL_LoadSurface_IO (which auto-detects PNG and BMP) or fall back to loading the file directly from disk with SDL_LoadSurface().
  • Hardcoding texture filenames instead of loading .fmat — the .fmat sidecar maps each submesh to its material and lists texture paths. Use forge_pipeline_load_materials() and read base_color_texture, normal_texture, etc. from the material struct.
  • Forgetting to free pipeline data — forge_pipeline_load_mesh, forge_pipeline_load_materials, and forge_pipeline_load_texture allocate memory internally. Always call the matching _free function, even if you've already uploaded the data to the GPU.

Reference

Frequently asked questions

What does the Forge Pipeline Assets AI skill do?

Load and render .fmesh binary meshes and pipeline-processed textures in SDL GPU applications

Why use Forge Pipeline Assets on TypingMind?

Because you install it once and use it with any model. Forge Pipeline Assets is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Forge Pipeline Assets in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Nebulavenus/forge-gpu/tree/main/.claude/skills/forge-pipeline-assets. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Forge Pipeline Assets?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Forge Pipeline Assets?

As many as you like. As long as a model supports skills, you can use Forge Pipeline Assets with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Forge Pipeline Assets AI skill free?

Yes. It is published on GitHub by Nebulavenus under the Zlib license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇