Thanks! The attached pictures are the checker-board texture UV-mapped to a sphere using typical sphere-mapping from a 3-d modeler.
The left sphere is made from a small number of segments, the right a much larger number. Since the UV map is per vertex you can see the 'sphere' lines aren't well-projected on the left.
The 3-d modeler can get the caps right because for each vertex it knows the connectivity to neighboring vertices; a straight vertex->uv function is going to introduce discontinuities or wrap-around and possibly undefined results at the poles.
So theoretically if you have your triangles in advance and you are applying a mapping function to each one to pre-compute UV, you could 'solve' the poles with some analysis. I don't think you can do this in shader without geometry shaders and a ton of work.
I'm not a fan of using projection for part textures at all - the rest of the modeling world uses UV mapping, which makes the projection of parts, management of discontinuities, and other complex issues not the problem of the file format and every client that reads it.
The left sphere is made from a small number of segments, the right a much larger number. Since the UV map is per vertex you can see the 'sphere' lines aren't well-projected on the left.
The 3-d modeler can get the caps right because for each vertex it knows the connectivity to neighboring vertices; a straight vertex->uv function is going to introduce discontinuities or wrap-around and possibly undefined results at the poles.
So theoretically if you have your triangles in advance and you are applying a mapping function to each one to pre-compute UV, you could 'solve' the poles with some analysis. I don't think you can do this in shader without geometry shaders and a ton of work.
I'm not a fan of using projection for part textures at all - the rest of the modeling world uses UV mapping, which makes the projection of parts, management of discontinuities, and other complex issues not the problem of the file format and every client that reads it.