Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: Texture Map and Geometric Coordinate

  1. #1
    Guest

    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.

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Apr 2000
    Posts
    748

    Re: Texture Map and Geometric Coordinate

    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.

    Y.


    [This message has been edited by Ysaneya (edited 12-04-2003).]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •