I have worked with the UV coordinates(texture coordinates) a long time, cause they are not right when i am exporting them. I’ve begun to hate such a good program that Blender is.
But they could had more documentation about export scripts… I have checked some exports scripts for directx and compared them with mine but i can’t find out why mine not working right.
Since i am a new user, i can’t post links to a picture but if you put http:// in front of this “imageshack.us/photo/my-images/691/boxcf.png” you would see a picture of what i mean.
for uv_textures in mesh.uv_textures: endOfTexName = uv_textures.data.image.name + '*' file.write(endOfTexName.encode()) for data in uv_textures.data: for uv in data.uv: uvCoordsPacked = struct.pack('<2f', uv, 1 - uv) file.write(uvCoordsPacked)
And here is a code snippet from my loader. mesh is defined as mesh = bpy.data.meshes[object.name].
I have debugged my program to see what’s happening, and I see that the indices from the faces are only meant for the vertices’s and not for the texture coordinates. So wrong texture coords are being used per vertex. So I wants to know how you can index the texture coords so they are linked with the indices in the faces.
I would have been glad if someone told me how it is supposed to be done.