Community画像github.com

m4bwav/polywright-finish

メッシュをゲームエンジン、Web、ARに最適化・整えて出力するためのAIエージェントスキルです。ポリゴン削減、LOD生成、リトポロジー、UV展開、ベイク、PBR設定、衝突判定、リギング、軸や単位の変換など、最終的な書き出しまでをカバーします。

polywright-finish とは?

このスキルは、3Dメッシュを任意のターゲット(Roblox、Unity、Unreal、Godot、three.js、USDZなど)に合わせて最終調整するための包括的なワークフローを提供します。`pw.py inspect`や`pw.py check`コマンドでメッシュの状態を測定・検査し、ポリゴン数・UV・スケール・向き・テクスチャ密度などの問題を特定します。その後、スケール調整、リトポロジー、LOD生成、UV展開、PBRテクスチャのベイク、リギング、そして各ターゲットに最適なフォーマット(GLB、FBX、OBJ、USDZ、STL)への書き出しと検証を段階的に実行します。特に、ゲームエンジンごとの軸、単位、法線マップの向きの違いを自動的に処理し、エラーを減らします。このスキルはpolywrightファミリーに属し、`evergreen.json`で状態管理が行われ、保守ユニットとして評価されています。

対応✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/m4bwav/polywright/tree/HEAD/skills/polywright-finish

Installed? Explore more 画像 skills: steipete/songsee, affaan-m/frontend-design, mattpocock/improve-codebase-architecture · View all 6 →

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

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

ドキュメント

polywright-finish は何をしますか?

メッシュは、ターゲットのチェックに合格し、レンダリングで正しく見え、適切なサイズと向きでインポートされたときに「完成」します。ハブに戻る:../polywright/SKILL.md。エンジンの詳細:references/engines.md。特定のエンジン向けに段階的に作成・仕上げる手順: references/roblox.md、references/unity.md、references/web-threejs.md。 曲げやシェーディング、テクスチャに優れたメッシュ:references/topology.md。

ステップ1:計測、そして判断

pw.py inspect <file> および pw.py check <file> --target <t> --real-size-m X を実行します。失敗した項目が次にすべきことを示します:トライアングル数超過、UVなし、マテリアル数超過、サイズ不正、開いたエッジ、そしてゲーム・Web・ARターゲットでは反転または重なった面、UV密度の不均一(inspect --topology;反転面:convert --fix-winding)。破壊的な操作の前後には必ずレンダリングします(pw.py render)。

ステップ2:スケール、向き、ピボット

  • メートル単位の実寸:pw.py convert in out --size-m X --ground --center(最長辺をXに;変形しにくい形状には既知の寸法を使用)。ドアは2.0~2.1 m、椅子の座面0.45 m、テーブル0.75 m、人物1.7~1.8 m。
  • 小道具は下部中央、ドアはヒンジ、車輪はアクスル、武器はグリップにピボットを設定。
  • 軸:Blender +Z上、前面は-Y;glTF +Y上、前面は+Z;Unreal +Z上、センチメートル単位;Unity +Y上、左手系;Roblox +Y上、1 stud = 0.28 m。不明な場合は1 mの立方体と矢印でテストエクスポート。

ステップ3:ターゲットに応じたジオメトリ

要件対処法
トライアングル削減、静的プロップpw.py convert --max-tris N(崩壊型デシメーションで輪郭を維持);LODは pw.py lods(レベルごとに約半分)
トライアングル削減、曲がるメッシュデシメーションは禁止:曲がらないところでループを結合し、関節周りのループは維持(references/topology.md)
変形・スカルプト用のきれいなクアッドまずボクセルリメッシュ(閉じる)、次にQuadriFlow(polywright-blenderにレシピ)、Instant Meshes、Quad Remesher(有料)、またはホスト型のクアッドリメッシュ;キャラクターは手作業
生成メッシュ(密、でこぼこ、柔らかいエッジ)静的プロップ:デシメートして再ベイク;ヒーローまたはアニメーション:リトポロジーして再ベイク;またはより良いリファレンスで再生成
複数のパーツを一つに結合--join;ソリッドの場合は pw.py union
衝突判定パーツごとにボックス、カプセル、または凸包;UnrealはUCX_プレフィックス;RobloxはCollisionFidelity BoxまたはHull;移動オブジェクトにはレンダーメッシュを使用しない

ステップ4:UVとテクスチャ

  • UV:pw.py convert --uv(Smart UV Project)で小道具用;ベイクドライトマップ用に2つ目の非オーバーラップセット(レシピ);キット全体で一貫したテクセル密度;トリムシートとアトラスでマテリアルとドローコールを削減。
  • 高密度メッシュから低密度メッシュへのベイク:法線、AO、カラー(レシピ bake-high-to-low)。リトポロジーはUVを破壊するため、常に再ベイクする。
  • PBRメタリック・ラフネス:メタリックは0か1、ラフネスで見た目を表現、アルベドは純黒・純白にしない;glTFではオクルージョン、ラフネス、メタリックをR、G、Bにパック(ORM)。
  • 法線マップ:OpenGL(Y+)はBlender、Unity、Godot、glTF、three.js、Roblox用;DirectX(Y-)はUnreal用。不一致はグリーンチャンネルを反転して修正。テクスチャは2のべき乗;WebとARではマテリアルあたり1024~2048。

ステップ5:リギング(動かす場合)

Aポーズ入力、きれいなマニフォールドメッシュ。UniRig(MIT、ローカル、8 GB)またはホスト型のTripo、Meshy、AccuRIG(最もきれいな人型ウェイト)、Mixamo(人型、最良のリターゲットドキュメント)。2026年の比較では、Meshyのヒップピボットが5~15 cmずれ(足が滑る)、AccuRIGが0.01スケールで一度インポート:リギング後はスケールとピボットを必ず確認。Roblox:頂点あたり最大4つのボーン影響、ルートは原点に配置。Rigifyリグは変形セットよりもはるかに多くのボーンをエクスポートする(deform-onlyで278/706):ゲームでは変形専用スケルトンを作成するか、上記のルートを使用する。

アニメーションクリップ:各クリップは共有の少数のコアポーズで開始・終了し、ブレンドなしで連結可能に;ループの最初と最後のフレームは同一;クリップごとにルートモーションかインプレースかを決定し記録;アドティブクリップ(エイム、ルック、リーン)はベースポーズ上の別アクションとして保持(Gregory, Game Engine Architecture 2e (2014), sec. 11.6)。

ステップ6:エクスポートと検証

pw.py convert でGLB、FBX、OBJ、USD/USDZ、STLを書き出します。ターゲット別:

ターゲットエクスポートその後
game-robloxMeshPartごとにFBX、OBJまたはGLB、20kトライアングル以下、1マテリアルcheck --target game-roblox;roblox-agentが配置
game-unityGLB(glTFast)またはFBX --fbx-bake-axesプロジェクトでインポートテスト(unity-agent)
game-unrealFBXまたはGLB;高密度オパークメッシュにはNaniteインポート時にスケール確認
web-threejsGLB、その後 gltf-transform optimize in.glb out.glb --compress meshopt --texture-compress ktx2 --join-named falsegltf_validator;ページ確認(threewright)
ar-usdzconvert in.glb out.usdzusdchecker --arkit(usd-coreがインストールされている場合)
video-blockout実寸のGLBまたは.blend、ターンテーブルとデプス/法線パス(レシピ)ビデオプラグインに引き渡し(cinewright)
commerce-gltfGLB、実寸、原点下部中央、トライアングルのみcheck --target commerce-gltf

スムーズ・バイ・アングルはBlender 4.1以降のジオメトリノードモディファイア:モディファイア適用済みでエクスポートするか、そうでなければハードエッジがスムーズになってしまう(glTF、FBX、OBJすべて、5.2.1で確認)。各出力を記録:pw.py manifest <dir> --add-output out/<file> --target <t> --inspect。

メンテナンス

永続ユニット、ティア moderate。関連ファイル:RESEARCH.md、CHANGELOG.md、 LEARNINGS.md、TESTS.md(evals/evals.jsonを含む)、MAINTENANCE.md、 状態はevergreen.jsonに保存。使用のたびにevergreen.jsonを読み込み、期限が切れたら更新。

Individual skills in this repo

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

m4bwav/polywright

Start here whenever a task needs a 3D model and no sibling below clearly owns it: a model of a real or imagined thing for a game (Unity, Roblox, Unreal, three.js), a 3D print, AI video or AR, or another plugin asking for a mesh. Picks the route (find, capture, generate, code), scaffolds the asset folder and manifest other plugins read, and runs pw.py (inspect, render a sheet, convert, check a budget, bpy headless, match a picture's camera, army blockouts with depth and pose passes for AI...

m4bwav/polywright-blender

Use whenever Blender is scripted, automated or debugged, before writing any bpy code: headless runs that report errors (pw.py bpy), the bpy API traps models still write in Blender 5.x (removed importers, renamed sockets, EEVEE names), tested recipes (modifiers, booleans, remesh, UVs, bakes, turntables, depth passes, batch exports), Blender MCP servers and their risks, and other 3D tools per OS. Use on 'write a Blender script', 'automate Blender', 'batch export .blend', any bpy traceback or...

m4bwav/polywright-generate

Use whenever an imagined or hypothetical 3D model must be made from a prompt, a drawing, concept art, photos or a blockout: image-to-3D through ComfyUI (TRELLIS.2, Pixal3D, Hunyuan3D-2 via pw.py gen) or hosted (Meshy, Tripo, Rodin), or code (bpy, build123d, CadQuery, OpenSCAD) when it has dimensions; then texturing and the licence record. Use on 'make me a 3D model of a dragon', 'turn this drawing or concept art into 3D', 'image to 3D', 'text to 3D', 'TRELLIS', 'Hunyuan3D', 'Meshy', 'model a...

m4bwav/polywright-references

Use whenever reference images, views or textures for a 3D model are needed, before modelling or image-to-3D: orthographic front, side and back views with a height bar, A-pose turnarounds, multi-view sets, blockout renders repainted into consistent views, seamless textures and quick normal/height/roughness maps (pw.py texture). Use on 'what references do I need', 'reference sheet', 'front side back views', 'turnaround', 'seamless texture', 'PBR maps from this photo'. Not for flat graphic...

関連スキル