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