diff --git a/marble-sculp/scene.py b/marble-sculp/scene.py index 8faa18a..cac5ca9 100644 --- a/marble-sculp/scene.py +++ b/marble-sculp/scene.py @@ -28,7 +28,7 @@ def convert_obj(self, filename: str) -> str: material = "" for ind in range(len(self.objects)): - material += f"newmtl Material.{ind}\nNs 360.000000\nKa 1.000000 1.000000 1.000000\nKd {random.randint(0, 1000000)/1000000} {random.randint(0, 1000000)/1000000} {random.randint(0, 1000000)/1000000}\nKs 0.500000 0.500000 0.500000\nKe 0.000000 0.000000 0.000000\nNs 0.000000\nd 0.400000\nillum 9\n\n" + material += f"newmtl Material.{ind}\nNs 360.000000\nKa 1.000000 1.000000 1.000000\nKd {random.randint(0, 1000000)/1000000} {random.randint(0, 1000000)/1000000} {random.randint(0, 1000000)/1000000}\nKs 0.500000 0.500000 0.500000\nKe 0.000000 0.000000 0.000000\nNs 0.000000\nd 1.000000\nillum 9\n\n" with open(f"./static/{filename}.mtl", "w") as fp: fp.write(material)