From fa2d0592fd64f8cf27abb06f8d1e51546040c173 Mon Sep 17 00:00:00 2001 From: Michi Date: Sun, 8 Nov 2026 02:13:01 +0100 Subject: [PATCH] paint_mesh: also write .pcol (points + colours) for fbx2gim Co-Authored-By: Claude Opus 5.5 --- paint_mesh.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/paint_mesh.py b/paint_mesh.py index 443a5be..4794c32 100644 --- a/paint_mesh.py +++ b/paint_mesh.py @@ -254,13 +254,21 @@ def main(): glb = os.path.join(out, f"{name}_painted.glb") with open(glb, "wb") as f: f.write(trimesh.exchange.gltf.export_glb(painted, include_normals=True)) + # Punkte + Farben schlicht binär (fbx2gim überträgt sie auf die Mixamo-Figur; Assimp liest die + # Farben aus der GLB nicht zuverlässig): int Anzahl, je Punkt 3 float + 4 byte RGBA + pcol = os.path.join(out, f"{name}_painted.pcol") + rgba = (np.c_[np.clip(colours, 0, 1), np.ones(len(colours))] * 255).round().astype(np.uint8) + rec = np.zeros(len(colours), dtype=[("p", " {glb}\n-> {obj}\n-> {png}") + print(f"-> {glb}\n-> {pcol}\n-> {obj}\n-> {png}") return 0