Add the local npc_parts.py head/face/hand part pipeline with tests and docs
This commit is contained in:
1 parent
1b554df516
commit
b8d8869e03
7 files changed
+434
-13
No files matched your search
@@ -45,6 +45,44 @@ required before any prototype detail is absorbed. Working scenes live under
|
||||
directly over the tracked `.blend`. The same rule already appears in
|
||||
[`asset-tooling.md#recommended-part-workflow`](asset-tooling.md#recommended-part-workflow).
|
||||
|
||||
## Local part pipeline
|
||||
|
||||
The overhaul uses `tools/npc_parts.py` to build, extract, assemble, inspect and sheet the
|
||||
reusable head/face and hand parts before they are rolled into the 12 characters. It reuses the
|
||||
`blender_assets.py` builders (no second face/hand implementation) and stays local-only/headless.
|
||||
Part sources and preview GLBs live under `tmp/npc-parts/<variant>/`; they are **not shipped
|
||||
assets** — only the assembled character GLBs, AO/maps, the manifest and the review sheets are
|
||||
committed.
|
||||
|
||||
```bash
|
||||
# Build one part fresh from the current builders (head|face|hand_l|hand_r)
|
||||
flatpak run org.blender.Blender --background \
|
||||
--python "$PWD/tools/npc_parts.py" -- build --part face --variant npc_casual \
|
||||
--out "$PWD/tmp/npc-parts/npc_casual/face.glb"
|
||||
# Pull the current shipped head/hands out of the built character GLB (comparison)
|
||||
flatpak run org.blender.Blender --background \
|
||||
--python "$PWD/tools/npc_parts.py" -- extract --part hand_l --variant npc_casual \
|
||||
--out "$PWD/tmp/npc-parts/npc_casual/hand_l.glb"
|
||||
# Assemble a variant (currently rebuilds the procedural character)
|
||||
flatpak run org.blender.Blender --background \
|
||||
--python "$PWD/tools/npc_parts.py" -- assemble --variant npc_casual \
|
||||
--out "$PWD/tmp/npc-parts/npc_casual/assembled.glb"
|
||||
# Inspect a part or assembled GLB (Blender import view)
|
||||
flatpak run org.blender.Blender --background \
|
||||
--python "$PWD/tools/npc_parts.py" -- inspect --file "$PWD/tmp/npc-parts/npc_casual/face.glb"
|
||||
# Contact sheet / before-after comparison (outside Blender; stdlib + Pillow)
|
||||
python3 tools/npc_parts.py sheet --dir tmp/npc-parts/npc_casual \
|
||||
--out docs/blender_previews/sheet_parts.jpg
|
||||
python3 tools/npc_parts.py compare --before DIR --after DIR --out sheet.jpg
|
||||
```
|
||||
|
||||
`build --part head` produces the bare head shell; `build --part face` is the shell plus
|
||||
nose/eyes/mouth/ears; `build --part hand_l|hand_r` are the left/right hand geometry. `extract`
|
||||
pulls the current shipped geometry out of the built character GLB by vertex group (`Head` for
|
||||
`head`/`face`, `HandL`/`HandR` for the hands), so it shows what is actually shipped rather than
|
||||
what the builders would emit fresh. The assembled GLB must still pass
|
||||
`blender_assets.py inspect`/`audit`/`fit` before any part is accepted.
|
||||
|
||||
## Optional MCP
|
||||
|
||||
Blender MCP can be used for interactive head/face/hand part exploration, but it
|
||||
|
||||
Reference in new issue
Block a user