- Messages
- 4
wrong uv coordinates at export
Hi,
I am writing my own custom script to export vertex data to be used in iOS.
But for some reason, the uv coordinates come out wrong. There are gaps and in the final render (image attached).
Basically, I am using the following loop to go through each triangle of each polygon
I am attaching the render, UV texture and the iPhone screenshot. As you can see, there are areas where apparently the UV coordinate lands in the background of the texture.
Hi,
I am writing my own custom script to export vertex data to be used in iOS.
But for some reason, the uv coordinates come out wrong. There are gaps and in the final render (image attached).
Basically, I am using the following loop to go through each triangle of each polygon
Code:
for(i=0;i < core.polygonCount();i++){
for(j=0;j<core.polygonSize(i);j++){
vertexIndex = core.vertexIndex(i,j);
normal = core.normal(i,j);
normals[vertexIndex] = normal;
uv = core.uvCoord(i,j);
uvCoordinates[vertexIndex] = uv;
}
}
I am attaching the render, UV texture and the iPhone screenshot. As you can see, there are areas where apparently the UV coordinate lands in the background of the texture.