Dev Noise Textureのロゴ

Dev Noise Texture

コミュニティ
Nebulavenus
dev-noise-texture

Add procedural noise texture generation to the asset pipeline — C tool, Python plugin, web UI with live preview

概要

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

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

  • どのLLMでも利用可能

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

  • 指示だけで完結

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

  • オープンソース

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

インストール

AIスキル「Dev Noise Texture」を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/dev-noise-texture
  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/dev-noise-texture .claude/skills/dev-noise-texture
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

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

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

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

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

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

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

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

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

スキルの指示

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

Noise Texture Generation

Add procedural noise texture generation to the forge-gpu asset pipeline. A C tool samples noise functions from forge_math.h across a pixel grid and writes grayscale BMP heightmaps. A Python pipeline plugin invokes the tool as a subprocess, and the web UI provides interactive parameter tuning with live preview.

When to use

  • Generating procedural heightmaps for terrain
  • Creating tileable noise textures (fBm, Worley, ridged multi-fractal)
  • Deriving normal maps from heightmaps
  • Adding procedural texture generation to the pipeline

Key API calls

C noise functions (forge_math.h)

FunctionOutputUse case
forge_noise_perlin2d[-1, 1]Basic gradient noise
forge_noise_simplex2d[-1, 1]Less axis-aligned than Perlin
forge_noise_fbm2d[-1, 1]Multi-scale terrain, clouds
forge_noise_ridged_fbm2d[0, 1]Mountain ridges, rivers
forge_noise_worley2dF1, F2 distancesVoronoi cells, edges
forge_noise_domain_warp2d[-1, 1]Organic distortion

Pipeline plugin (pipeline/plugins/noise.py)

FunctionPurpose
find_noise_tool()Locate forge_noise_tool binary
run_noise_tool()Invoke tool as subprocess with CLI args
generate_noise_textures()Batch generation from pipeline.toml config
NoisePlugin.process()Plugin entry point for pipeline integration

Server endpoints (pipeline/server.py)

EndpointMethodPurpose
/api/generate/noisePOSTGenerate full-resolution texture
/api/generate/noise/previewGETStream a 256×256 BMP preview

Correct order

Adding a new noise type

  1. Implement the noise function in common/math/forge_math.h with full documentation (parameters, output range, usage example)
  2. Add tests in tests/math/test_math.c (determinism, range, edge cases)
  3. Add a NOISE_* enum value and parse_type case in tools/noise/main.c
  4. Add the type to VALID_TYPES in pipeline/plugins/noise.py
  5. Add it to the NOISE_TYPES array in pipeline/web/src/routes/generate/noise.tsx
  6. Add it to the NoiseGenerateRequest type dropdown and server endpoint

Setting up noise generation in a project

  1. Build the tool: cmake --build build --target forge_noise_tool

  2. Add [noise] config to pipeline.toml:

    toml
    [noise]
    noise_enabled = true
    output_dir = "generated"
    
    [[noise.textures]]
    name = "terrain_height"
    type = "fbm"
    width = 1024
    height = 1024
    seed = 42
    tiling = true
  3. Generate: uv run python -m pipeline generate-noise

  4. Or use the web UI: uv run python -m pipeline serve --reload

Seamless tiling

Map 2D coordinates onto a 4D torus — each axis traces a circle in a separate 2D plane:

c
float angle_u = u * 2.0f * FORGE_PI;
float angle_v = v * 2.0f * FORGE_PI;
float r = frequency / (2.0f * FORGE_PI);
/* Noise sees (r*cos(u) + r*cos(v), r*sin(u) + r*sin(v)) — continuous
 * across the tile boundary because each circle closes on itself. */

Normal map derivation

Central differences on the heightmap with wrapping:

c
float dx = (heightmap[y*w + xp] - heightmap[y*w + xm]) * strength;
float dy = (heightmap[yp*w + x] - heightmap[ym*w + x]) * strength;
/* Normal = normalize(-dx, -dy, 1), mapped to [0, 255] RGB */

Common mistakes

  • Forgetting to normalize output. Perlin/Simplex/fBm return [-1, 1], ridged returns [0, 1], Worley returns [0, ~1.5]. The tool normalizes via min/max scan before writing BMP pixels.

  • Tool not found on MSVC. Multi-config generators put binaries in build/tools/noise/Debug/. The tool_finder.py searches config subdirectories automatically.

  • Normal map source ordering. In pipeline.toml, the heightmap entry must appear before the normal map entry that references it (the plugin processes entries in order).

  • Tiling with Worley noise. The 4D torus approximation works well for gradient-based noise but can produce visible seams with Worley at low frequencies. Increase frequency or use fBm/ridged for seamless tiles.

Ready-to-use template

C tool invocation

bash
forge_noise_tool heightmap.bmp fbm \
    --width 1024 --height 1024 --seed 42 \
    --octaves 6 --frequency 4.0 --persistence 0.5 --tiling

forge_noise_tool normals.bmp fbm \
    --width 1024 --height 1024 --seed 42 \
    --octaves 6 --frequency 4.0 --normal-map --normal-strength 2.0

Python one-off generation

python
from pathlib import Path
from pipeline.plugins.noise import find_noise_tool, run_noise_tool

tool = find_noise_tool()
if tool is None:
    raise RuntimeError("forge_noise_tool not found — build it first")
run_noise_tool(
    Path("output.bmp"), "ridged",
    width=512, height=512, seed=42,
    frequency=4.0, octaves=6, tiling=True,
    tool=tool,
)

Web UI preview URL

typescript
import { noisePreviewUrl } from "@/lib/api"

const url = noisePreviewUrl({
  noise_type: "worley-edge",
  width: 256, height: 256,
  seed: 42, frequency: 8.0,
})
// -> "/api/generate/noise/preview?noise_type=worley-edge&..."

Reference

よくある質問

AIスキル「Dev Noise Texture」では何ができますか?

Add procedural noise texture generation to the asset pipeline — C tool, Python plugin, web UI with live preview

TypingMindでDev Noise Textureを使うメリットは何ですか?

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

TypingMindにDev Noise Textureをインストールするにはどうすればよいですか?

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

Dev Noise Textureを使えるAIモデルはどれですか?

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

Dev Noise Textureで使えるAIモデルの数に制限はありますか?

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

AIスキル「Dev Noise Texture」は無料ですか?

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

AIスキルとは何ですか?

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

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

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

すべて見る

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

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