jiba,

It would appear that only you know the magic incantation to get a world or shape to only point to a material filename instead of storing the material inside of itself.

Right now, objmtl2soya stores the texture for the object inside the .data file it generates. This is very wasteful, as objects can't share materials. The current code, around line 60, looks like:

      elif fn=='map_Kd':
        mat[curmat].texture = soya.Image.get(pr[0])
        mat[curmat].diffuse = (1.0, 1.0, 1.0, 1.0)

I want it to only store the filename so the material can be referenced separately and shared between shapes, so I change it to:

      elif fn=='map_Kd':
        mfn = pr[0].split('.')
        mat[curmat].filename = mfn[0]
        mat[curmat].diffuse = (1.0, 1.0, 1.0, 1.0)
        #mat[curmat].get(mfn[0])
        #mat[curmat].save(mfn[0] + ".data")

And while the geometry is saved out correctly, it loads up the shape and it shows up as solid white. The log does not show that the materials have been converted.

When I exit and restart, the log shows the textures being converted to materials, and their .data files are placed in the materials directory. However, they are not actually applied. The geometry shows up as solid colors, with no texture definition at all:

        http://www.polycount.net/vito/splitexport.jpg

What is going on?  How is this supposed to work?

Thanks,
Vito Miliano

Reply via email to