self.out_file.begin("texture2d")
self.out_file.write("min_filter", "NEAREST")
self.out_file.write("mag_filter", "NEAREST")
- self.out_file.write("storage", "RGB", len(mesh.materials), 1, 0)
+ self.out_file.write("storage", "RGB", len(mesh.materials), 1)
texdata = '"'
for m in mesh.materials:
texdata += "\\x%02X\\x%02X\\x%02X"%(int(m.R*255), int(m.G*255), int(m.B*255))
self.out_file.begin("material")
self.out_file.write("diffuse", m.R, m.G, m.B, 1.0)
self.out_file.write("ambient", m.R*m.amb, m.G*m.amb, m.B*m.amb, 1.0)
- self.out_file.write("specular", m.specR, m.specG, m.specB, 1.0)
+ self.out_file.write("specular", m.specR*m.spec, m.specG*m.spec, m.specB*m.spec, 1.0)
+ self.out_file.write("shininess", m.hard);
self.out_file.end()
self.out_file.end()
self.out_file.end()