Forge Procedural Geometryのロゴ

Forge Procedural Geometry

コミュニティ
Nebulavenus
forge-procedural-geometry

Generate procedural 3D geometry using forge_shapes.h — parametric surfaces (sphere, icosphere, cylinder, cone, torus, plane, cube, capsule) with struct-of-arrays layout for GPU upload

概要

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

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

  • どのLLMでも利用可能

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

  • 指示だけで完結

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

  • オープンソース

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

インストール

AIスキル「Forge Procedural Geometry」を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-procedural-geometry
  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-procedural-geometry .claude/skills/forge-procedural-geometry
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

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

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

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

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

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

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

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

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

スキルの指示

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

Generate and render procedural geometry using the forge_shapes.h header-only library. Shapes are unit-scale, centred at origin, Y-up, CCW winding.

Include pattern

One .c file defines the implementation; all others get declarations only:

c
/* In exactly ONE .c file: */
#define FORGE_SHAPES_IMPLEMENTATION
#include "shapes/forge_shapes.h"

/* In all other files: */
#include "shapes/forge_shapes.h"

Generate and upload a shape

c
/* Generate a 32-slice, 16-stack UV sphere */
ForgeShape sphere = forge_shapes_sphere(32, 16);

/* Create GPU buffers for struct-of-arrays layout */
SDL_GPUBuffer *pos_buf = upload_gpu_buffer(device,
    sphere.positions, sphere.vertex_count * sizeof(vec3));
SDL_GPUBuffer *nor_buf = upload_gpu_buffer(device,
    sphere.normals,   sphere.vertex_count * sizeof(vec3));
SDL_GPUBuffer *idx_buf = upload_gpu_buffer_index(device,
    sphere.indices,   sphere.index_count * sizeof(uint32_t));

/* Free CPU-side data after upload */
int index_count = sphere.index_count;
forge_shapes_free(&sphere);

Bind and draw (struct-of-arrays)

c
/* Bind position buffer at vertex slot 0 */
SDL_GPUBufferBinding pos_bind = { .buffer = pos_buf, .offset = 0 };
SDL_BindGPUVertexBuffers(rpass, 0, &pos_bind, 1);

/* Bind normal buffer at vertex slot 1 */
SDL_GPUBufferBinding nor_bind = { .buffer = nor_buf, .offset = 0 };
SDL_BindGPUVertexBuffers(rpass, 1, &nor_bind, 1);

/* Bind index buffer */
SDL_GPUBufferBinding idx_bind = { .buffer = idx_buf, .offset = 0 };
SDL_BindGPUIndexBuffer(rpass, &idx_bind, SDL_GPU_INDEXELEMENTSIZE_32BIT);

/* Draw */
SDL_DrawGPUIndexedPrimitives(rpass, index_count, 1, 0, 0, 0);

Pipeline vertex attributes

Configure two vertex buffer slots matching the struct-of-arrays layout:

c
SDL_GPUVertexBufferDescription vbufs[] = {
    { .slot = 0, .pitch = sizeof(vec3), .input_rate = SDL_GPU_VERTEXINPUTRATE_VERTEX },
    { .slot = 1, .pitch = sizeof(vec3), .input_rate = SDL_GPU_VERTEXINPUTRATE_VERTEX },
};
SDL_GPUVertexAttribute attrs[] = {
    { .location = 0, .buffer_slot = 0, .format = SDL_GPU_VERTEXELEMENTFORMAT_FLOAT3, .offset = 0 },
    { .location = 1, .buffer_slot = 1, .format = SDL_GPU_VERTEXELEMENTFORMAT_FLOAT3, .offset = 0 },
};

Multiple shapes in one scene

c
/* Generate all shapes */
ForgeShape shapes[] = {
    forge_shapes_sphere(32, 16),
    forge_shapes_torus(24, 12, 1.0f, 0.4f),
    forge_shapes_plane(4, 4),
};
int shape_count = sizeof(shapes) / sizeof(shapes[0]);

/* Upload each to GPU, store buffers and counts */
for (int i = 0; i < shape_count; i++) {
    upload_shape_to_gpu(device, &shapes[i], &gpu_shapes[i]);
    forge_shapes_free(&shapes[i]);
}

/* In render loop: draw each with its own model matrix */
for (int i = 0; i < shape_count; i++) {
    set_push_uniforms(rpass, model_matrices[i]);
    bind_and_draw(rpass, &gpu_shapes[i]);
}

Available generators

FunctionDescriptionDefault params
forge_shapes_sphere(slices, stacks)UV sphere, radius 132, 16
forge_shapes_icosphere(subdivisions)Even triangle distribution2
forge_shapes_cylinder(slices, stacks)No caps, height 232, 1
forge_shapes_cone(slices, stacks)Apex at Y=+1, no base32, 1
forge_shapes_torus(slices, stacks, major, tube)Donut in XZ plane32, 16, 1.0, 0.4
forge_shapes_plane(slices, stacks)XZ plane, Y=04, 4
forge_shapes_cube(slices, stacks)6 faces, per-face normals1, 1
forge_shapes_capsule(slices, stacks, cap_stacks, half_h)Cylinder + hemisphere caps32, 4, 4, 1.0

Common mistakes

  1. Forgetting to free — always call forge_shapes_free() after GPU upload
  2. Wrong vertex slot — positions go to slot 0, normals to slot 1; swapping them produces garbled lighting
  3. Using interleaved vertex layout — ForgeShape uses struct-of-arrays; bind separate buffers per attribute, not one interleaved buffer
  4. Missing seam at U=0/U=1 — the sphere has (slices+1) columns to handle the texture seam; this is intentional, not a bug

References

よくある質問

AIスキル「Forge Procedural Geometry」では何ができますか?

Generate procedural 3D geometry using forge_shapes.h — parametric surfaces (sphere, icosphere, cylinder, cone, torus, plane, cube, capsule) with struct-of-arrays layout for GPU upload

TypingMindでForge Procedural Geometryを使うメリットは何ですか?

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

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

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

Forge Procedural Geometryを使えるAIモデルはどれですか?

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

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

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

AIスキル「Forge Procedural Geometry」は無料ですか?

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

AIスキルとは何ですか?

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

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

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

すべて見る

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

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