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 3 of 3

Thread: Generating texture coordinates evenly

  1. #1
    Intern Contributor
    Join Date
    Oct 2000
    Location
    Pittsburgh, PA
    Posts
    52

    Generating texture coordinates evenly

    I'm trying to have OpenGL generate my s and t texture coordinates for me, but I'm having trouble getting it to look right on certain objects, mostly solid cylinders.

    I can't figure out good s and t vectors to use so that the texture is just mapped evenly around the whole object. There always seems to be some streaking on a pair of sides or something.

    My main problem is that I just haven't found a good reference for how the s and t coordinates actually work, but if anyone can help me out with the s and t vectors I'm looking for that would map evenly on all parts of an object, that would be great.

    Thanks GLers,
    Ray

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Sep 2000
    Location
    Santa Clara, CA
    Posts
    1,096

    Re: Generating texture coordinates evenly

    This is a common problem when you try to draw an entire object with just one set of texture coordinates.

    If you're trying to wrap some kind of image around an object, you will generally need to duplicate some vertices and give them different texture coordinates.

    Generally, texgen is better suited for algorithmic kinds of texture mapping than for mapping images on arbitrary objects. For example, texgen is great for projecting spotlight textures.

    - Matt

  3. #3
    Junior Member Newbie
    Join Date
    Oct 2000
    Location
    santana, madeira, portugal
    Posts
    17

    Re: Generating texture coordinates evenly

    can anyone tell me a simple explanation of what is texture S & T, Q, R and what can be used with or to do what?

    i know its used under env mapping, sphere mapping and all that in opengl, but how does it work for us?

Posting Permissions

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