Communityコーディング&開発github.com

アセットパイプライン

生成または手描きのアートを、ゲームエンジンがそのまま読み込めるファイルに変換します。スプライトの切り抜き、トリミングとフレームサイズへの最近傍フィッティング、パレットへのピクセル化、スプライトシートとストリップ、プレイヤー/チームカラーマスク、シームレステクスチャ、ゲーム内スプライトフレームへの3Dモデルレンダリングをカバーします。

アセットパイプライン とは?

このスキルは、fal-assets スキルが生成した画像や手描きのアートを、ゲームエンジンが直接読み込める形式に変換するための完全なアセットパイプラインを提供します。`um sprite ...` および `um render3d ...` というコマンド群を通じて、スプライトの切り抜き、フレームサイズへのフィッティング、ピクセルアートへの変換、パレットの適用、スプライトシートの作成、プレイヤー/チームカラーマスクの生成、シームレステクスチャの生成など、2Dパイプライン全体をカバーします。また、Blenderを利用して3Dモデルを指定したアングルとアニメーションでスプライトフレームにレンダリングする機能も備えています。ゲーム自身のアセットからフォーマットを学習し、変換後にゲーム内で検証するワークフローを推奨しており、再現可能なパイプラインをスクリプトやMakefileで管理できるように設計されています。さらに、UnityPy を使用して他ゲームの Unity アセットを読み込み、ローカルなリソースパックに変換する高度な機能も含んでいます。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/rehan-remade/universal-modder/tree/main/skills/asset-pipeline

Installed? Explore more コーディング&開発 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

アセットパイプライン:アートからエンジンが読み込めるファイルへ

fal-assets スキルは画像を作ります。このスキルはゲームが受け入れるファイルを作ります。適切なサイズ、フレームレイアウト、向き、アルファ、パレット、フォーマットです。すべてのコマンドは um sprite ... と um render3d ... です。各コマンドには --help と例があります。

1. ゲーム自身からターゲットフォーマットを学ぶ

変換する前に、ゲーム自身のアセットを2~3つ開き、MODLOG.md に以下の項目を書き留めてください:

  • 寸法: フレームサイズ、シートあたりのフレーム数、レイアウト(垂直ストリップ / グリッド / ファイルごとに1フレーム)。
  • 向き: アートがどの方向を向いているか(Terrariaではアイテムは右向き、NPCは左向きでエンジンが反転)、ピボットまたはホットスポットの位置(AoE2ではユニットの接地点がキャンバスの中心)。
  • アルファ: ハードな1ビットエッジ(BC1 punch-through、ピクセルアート)またはソフト。
  • スタイル: パレットサイズとアウトライン(ほとんどのピクセルアートゲームでは暗い1~2ピクセルのアウトライン)。
  • フォーマット: PNG、DDS BC1/BC3/BC7、XNB、SLD、atlas + JSON...

描画コードが最終的な権威です。Terraria では、NPC フレーム高 = テクスチャ高 / Main.npcFrameCount なので、一貫したフレームサイズならどれでも機能します。

2. 2Dパイプライン

um sprite info raw.png                                    # サイズ、アルファカバレッジ、コーナー色
um sprite cutout raw.png cut.png                          # 平坦な背景 → 透明(境界塗りつぶしで内部の白を保持)
num sprite cutout raw.png cut.png --grey 150 --keep-top 0.8   # ソフトな灰色の影 / その下の床も除去
um sprite fit cut.png item.png --size 64x26 --hard-alpha  # トリミング + フレームに1回の最近傍スケーリング
um sprite fit cut.png npc.png --size 38x34 --anchor bottom   # 立ちスプライトはフレームの下端に配置
um sprite pixelate cut.png px.png --size 32x32 --colors 16 --outline   # 絵画的なアートから本物のピクセルアートへ
um sprite palette px.png px2.png --from stock_sprite.png  # ゲーム自身の色にスナップ
um sprite frames npc.png frames/ --n 3 --kind bob          # 安価なアイドルアニメーション(bob/squash/wobble/flash)
um sprite sheet sheet.png frames/*.png --vertical         # Terraria スタイルのストリップ(または --cols N グリッド)
um sprite slice sheet.png out/ --frame 32x32              # 逆方向
um sprite team-mask unit.png unit_grey.png --hue blue     # プレイヤーカラーマスク + 彩度を落としたスプライト
um sprite preview item.png look.png --scale 6             # チェッカーボード + ズーム:出荷前に確認
  • ピクセルアート: 最終サイズに1回、最近傍でスケーリングします。ピクセルアートを2回スケーリングしないでください。
  • 絵画 / HD アート: fit --smooth を使用します。
  • 実際のフレーム: bob/squash を超えるアニメーションフレームについては、基本スプライトを参照として fal edit エンドポイントを使用して各フレームを生成し(「同じドローン、ローター傾斜、フレーム2/4」)、その後、各フレームを同じ方法で切り抜き、フィッティングします。あるいは3D(後述)に進みます。

3. 3D → スプライト(一貫したアングルとアニメーション)

um fal model3d concept.png --name unit                   # テクスチャ付きGLB(デフォルトはTrellis 2)
um render3d assets/gen/unit.glb frames/ --preset aoe2 --length 80 --forward-yaw -90 \
  --anims idle:10:bob,walk:12:walk,attack:16:lunge,death:20:die --shadows --samples 40
um render3d assets/gen/unit.glb side/ --preset side --canvas 128 --length 110 --engine eevee   # プラットフォーマー向け左右向き

プリセット:

プリセット投影法カメラ向きの数
aoe2平行投影30°東から時計回りに16
iso8平行投影30°8
trueiso平行投影35.264°8
topdown平行投影—8
side平行投影—2(右、左)
turntable透視投影—24(プロモーション/アイコンの回転)
  • --length はモデルの最長水平辺のピクセル数を1倍で設定するため、既存のユニットに合わせてください。
  • --forward-yaw はモデルを回転させて正面を+Xに向けます。最初のフレームで確認してください。
  • --shadows は影のみのパス(*_s.png)を追加します。エンジンが影を独自のレイヤーに保持する場合に使用します。
  • モーション:bob、walk、lunge、die、wreck、spin。
  • その後、um sprite sheet またはエンジンライター(例:examples/aoe2-de-civ/sld.py)でパックします。
  • Blender が必要です(PATH 上の blender または BLENDER=...)。Cycles は利用可能な場合 GPU を使用します。
  • 暗い生成テクスチャ:--sun / --ambient を上げるか、後処理で明るくします。
  • ゲームで使用する3D(スプライトではない場合)は、um fal run tripo3d/tripo/remesh [email protected] face_limit:=8000 でリメッシュし、その後 Blender で変換します(GLB → FBX/OBJ)。エンジンのスケールと軸の規則に従ってください。UnityはY-upメートル、UnrealはZ-upセンチメートル、Bethesda NIFはPyNifly経由です。

4. テクスチャとマテリアル

  • タイリング: um fal texture はタイリングされた状態で生成します。um sprite tile-preview t.png t3.png で確認し、um sprite seamless で他の画像の継ぎ目を修正します。
  • PBRセット: um fal pbr。エンジンのパッキングに変換:Unreal の ORM(RGB に Occlusion/Roughness/Metal)、Unity の metallic-smoothness(アルファに smoothness = 1 - roughness)。
  • DDS: texconv(DirectXTex)または magick を DXT 設定で使用します。高品質は BC7、カットアウトスプライトは BC1、ソフトアルファの場合は BC3。

5. ゲーム内で検証する

変換したアセット1つをゲームに入れ、既存のアートと並べてスクリーンショットを撮ります(um win shot)。スケール、向き、ピボット、アウトライン、パレットを確認します。レシピを修正し、同じコマンドで残りをバッチ変換します(スクリプトや Makefile を使い、assets/gen/ から再現可能なパイプラインにします)。

6. ゲストゲームの Unity アセットを変換する(マッシュアップ)

ユーザー自身のインストールを UnityPy で読み込み、ローカルかつプライベートなリソースパックを作成します。出力を MOD、そのリポジトリ、リリースに決して含めないでください。各ユーザーが自分のコピーでコンバーターを実行します。

  • メモリ: UnityPy.load() はバンドル全体を展開します(865 MB のバンドルが 8.7 GB の RAM になる可能性があります)。シリアライズされたファイルのみを展開し、.resS / .resource は遅延読み込みでブロックごとに読み取ります。各コンバーターモジュールを独自のプロセスで実行します。
  • 環境: UnityPy.Environment(path="") を使用し、相互参照されるバンドルを一緒に読み込みます。そうしないと UnityPy が不足する依存関係を作業ディレクトリから検索します。
  • アセットの検索: Addressables バンドル名はアップデートごとにハッシュ化されます(プレフィックスで検索)。Addressables 2.x にはバイナリ catalog.bin があります。ゲームオブジェクトをプレハブにマッピングするには、名前を推測するのではなく GUID キーを使用します。低品質バリアントが存在する場合はそれを優先します(同じメッシュ、より小さいテクスチャ)。
  • スキンメッシュはバインドポーズ(多くの場合 T ポーズ)で保存されています。 ゲーム内の見た目を得るには、アイドルクリップを t = 0 で自分で評価します(UnityPy は AnimationClip オブジェクトを読み取りますがサンプリングはしません。Generic クリップは Transform をパスの CRC32 でバインドします)。ワールド行列を再構築し、スキニングします。
  • コンテナルートから階層をたどり、非アクティブな GameObject とその子をスキップし、ヘルパーメッシュ(まぶた、地面の影、ステンシル/アウトラインマテリアル)を削除します。
  • 軸: Unity は左手系、Minecraft は右手系です。位置と法線の1軸を反転し、巻き方向を逆にします。V を反転し、UV をクランプします。名前付きボーンで確認します(右手が右側にあること)。
  • 共有アトラス: 各パーツのテクスチャを UV バウンディングボックスで切り取り、UV を再マッピングします。
  • オーディオ: AudioClip.samples には FMOD(fmod_toolkit)が必要です。ffmpeg でモノラル OGG にエンコードします。
  • Minecraft 側: パックには pack.mcmeta が必要です(1.20.1 では pack_format 15)。ResourceLocation は [a-z0-9_./-] のみを受け入れます。ポーズ付きメッシュの場合、RenderType.entityCutoutNoCull で描画されるカスタムメッシュファイルの方が forge:obj(ブロックアトラステクスチャ、usemtl)よりも堅牢です。
  • Oracle: 書き込んだファイルを再読み込みしてプレビューシートをレンダリングし、確認します。

Individual skills in this repo

This repo contains 11 individual skills — each has its own dedicated page.

fal-assets

Generate game assets with fal (fal.ai) through the fal MCP server, the `um fal` CLI (REST) or `fal api`. Covers sprites and icons with transparent backgrounds, consistent variants and animation frames, pixel art, seamless textures, PBR material maps, image-to-3D models, remeshing, auto-rigging, sound effects, music, voice lines, and trailer or cutscene video. Use whenever a mod needs new art, audio or 3D models, or the user mentions fal, generating sprites, textures, models, SFX or music for a game.

game-automation

Launch, see and drive a real game so an agent can test its own mods. Covers launching via Steam or the exe, windowed mode at a fixed size, screenshots of the game window (GPU-safe capture), clicking and typing into menus, holding keys, relative mouse, crash-reporter cleanup, killing by PID, reading logs, scripted test scenes, and an in-game JSON bridge that lets an agent observe and act. Windows-first (also from WSL), with notes for Linux and macOS. Use when a mod must be verified in game, when navigating menus automatically, or when building a repeatable test or demo scene.

game-recon

Figure out how a specific installed game can be modded, before writing any mod code. Covers where it

game-research-websearch

Research a game, engine or modding technique on the open web with archive-aware, rate-limit-safe searches — Wayback Machine/archive.today for dead forums (XeNTaX, Zenhax, old threads), GitHub code/repo search, Nexus/Steam Workshop/Thunderstore APIs, Reddit JSON, YouTube transcripts, plus archive snapshots as evidence. Use when starting work on a game (

mashup-mods

Build cross-game mashups and total conversions, the

mod-any-game

Mod a PC game the user owns, taking an idea to working in the real game and recorded. It covers new items, weapons, enemies, bosses, units, civilizations, mechanics, art, sound, VR and cross-game mashups. Use when the user wants to mod, extend, hack on, reverse engineer or mash up a game (

port-a-mod

Port an existing mod to a newer game version or another mod loader while keeping its behaviour, values and quirks. Typical cases are an old Forge 1.7.10 or 1.12 Minecraft mod moving to modern Fabric or NeoForge, a Skyrim LE plugin moving to SE/AE, or a tModLoader 1.3 mod moving to 1.4. It covers pinning one source version, a private decompiled reference, an adaptation matrix, extracting the mod

publish-mod

Package and release a finished game mod. Covers the pre-release lint (no game files, decompiled code or leaked keys), README and install steps, credits and AI disclosure, versioning, where to upload (Nexus Mods, Steam Workshop, Thunderstore, mod.io, GitHub releases), and the post with a video. Use when the user wants to ship, share, upload, release or post a mod.

reverse-engineering

Read how a game actually works so a mod can hook it. Decompile .NET/Mono (ILSpy), IL2CPP (Cpp2IL, Il2CppDumper), Java (Vineflower) and native code (Ghidra, IDA, via MCP servers); dump data and asset formats; reverse-engineer a binary file format and prove it with a round trip; read live memory (Cheat Engine, Frida, x64dbg); find render passes (RenderDoc). Use when a mod needs game internals, e.g.

share-field-notes

Search and contribute to the shared AI-modding knowledge base, where field notes record how specific games were modded, decompiled or reverse-engineered (exact versions, route, engine facts, verification, gotchas). Use before starting work on a game (

showcase-video

Record and cut a short showcase video of a game mod, or a compilation of clips, ready to post on X/YouTube. Records the game window with only the game

関連スキル