character: idle standing pose and warm skin, not the grey mannequin
- mpfb_character_export.py: new --pose idle folds the A/T-bind arms down to a relaxed standing rest pose (baked via pose.armature_apply before export); new make_diffuse synthesizes a warm skin-tone diffuse with a darker shorts-suggestive band, replacing the Cycles v2-skin bake that came out black and was slow at 1024^2. - write_png now encodes from img.pixels via numpy (fast) because img.save() writes black for an in-memory image. - Re-exported idle character, re-imported to /Game/Test/Character (138 bones, warm M_Character_Export/T_Character_Diffuse); removed stale T_Skin_Diffuse. - Untracked the review PNGs again: the Screenshots/ gitignore rule had been dropped and the parallel session had committed the PNGs, against the AGENTS.md 'never commit the PNGs' rule. Restored the ignore rule; only Screenshots/README.md stays tracked. - README/roadmap/memory updated; review-01-character re-pended for approval.
This commit is contained in:
1 parent
e48a0cd82b
commit
c11cb4caa4
27 files changed
+119
-99
No files matched your search
@@ -140,3 +140,10 @@ Scope: facts and traps that cost time to establish. Planned work lives in [ROADM
|
||||
- **Docs drift silently after a refactor.** Moving the geo scripts to `Geo/tools/` and the Blender builders into `Art/blender/*/` left stale paths in six documents and two tool READMEs. Grep for old paths (`.md` and `.py`) after any move, not just the ones that error at runtime.
|
||||
- **Every new tool needs a row in `Tools/README.md` and `Docs/build.md`**, or the next session will not know it exists. Both now list the full content pipeline in order.
|
||||
|
||||
|
||||
## 2026-11-07 — Character diffuse bake
|
||||
|
||||
- **`img.save()` writes black for an image created in memory** even though Cycles `bpy.ops.object.bake` does update `img.pixels` correctly (verified in-memory px were warm). Writing the PNG ourselves from `img.pixels` is required.
|
||||
- **A per-pixel `struct.pack` loop over `img.pixels` is catastrophic in headless Blender** (256² took 25 s). Blender ships numpy: read `img.pixels[:]` once into a float array, reshape `(h,w,4)`, clip→uint8, reverse rows for PNG top-down, then zlib-compress. Whole 1024² encode ≈ 0.3 s.
|
||||
- **MPFB's v2-skin node tree does not resolve to a simple base colour**, so a Cycles DIFFUSE bake returns black. Since the FBX export material replaces the node tree anyway, synthesize the diffuse directly (`make_diffuse`): warm skin body + a darker shorts-suggestive bottom band.
|
||||
- **A read-only `.umap` silently makes `save_map` return `False` with no error** (already recorded); re-hit in the review pipeline — `chmod u+w` the maps before rebuilding, otherwise the new character material never appears in shots.
|
||||
Reference in new issue
Block a user