views:

22

answers:

0

Hi,

I am facing a problem more or less similar to the post http://stackoverflow.com/questions/1513383/texturing-error-on-a-sphere

The difference is I am trying to sphere map non spherical objects.I will describe my problem in detail.

I am writing an application which generates 3d models out of system fonts.I am using the gluTesselator for triangulation of my font contours. I have also implemented certain UV mapping techniques like simple Planar/Box mapping.I am in the process of implementing sphere mapping where I am stuck.

My problem is as follows: After the gluTesselator gives me the faces,I get the sphere mapping coordinates for every vertex using simple Cartesian to polar coordinate conversion. When I use these UV values and try to render this geometry I get undesirable artifacts at random places. After digging into this issue a little bit I found the reason to be that the faces in my geometry actually share vertices.This is the way the gluTesselator gives me the faces.Therefore my start and end vertex will end up having the same UV values which is improper.Also I am not aware as to which are supposed to be the pole vertices because my geometry could be of any shape based on the font and character chosen.

One solution could be to duplicate some vertices,but what I am not able to understand is which vertices to duplicate and what should be the change in UV for these vertices. Another solution could be to write my own tessellator which would tessellate the contours the way I want..This looks like quite a bit of work :(.

Can anyone please suggest a solution and give me a direction as to how I must approach this problem.

Thanks in Advance, Pravi