I have a mesh stored in .obj format with a texture image in .png format. For any "defined" pixel in the texture image, I'd like to compute the corresponding 3D coordinates when the texture image is mapped to the 3D mesh. For "defined" pixels, I mean the texture pixels that correspond to points on the surface of the mesh, not the texture pixels between the texture patches.
The .obj file format is as follows:
v 0.123 0.234 0.345 1.0
v ...
...
vt 0.500 1
vt ...
...
vn 0.707 0.000 0.707
vn ...
...
f 1/1 2/2 3/3
f ...
...