View Full Version : Texture Map and Geometric Coordinate
I have a texture map that looks like a checkerboard. The image is created at runtime as an array of GLbytes. I have a simple geometric object (composed of a small about of 4 sides polygons), and the image is texture-mapped onto each polygon.
I need to know, for each texel in the image, what 3D point on the object the center of the texel is mapped to.
Is there a way to do this?
Thanks in advance for any help.
12-04-2003, 08:03 AM
In other words you want to do the reverse of texture mapping, right ?
Do you want, for each pixel of the screen, to find the 3D world location ? Or rather, as i understand it, for each texel of your texture, to find the 3D world location of a point that was "texture mapped" to this particular texel ?
If you're meaning the later, why do you need that ? What if multiple polygons are mapped to the same texel ? In that case, starting from the texel, you've got multiple solutions to the problem. If you also add tiling (repeating textures), the same texel can be unmapped to a single triangle multiple times.
It can certainly be done, but frankly i think the easiest for you would be to describe WHY you need this functionnality, and find other, easier alternatives.
[This message has been edited by Ysaneya (edited 12-04-2003).]
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.