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

Thread: generating texture coordinates...

  1. #1
    Intern Newbie
    Join Date
    Feb 2003
    Location
    france
    Posts
    48

    generating texture coordinates...

    Hi, I'm looking for highly detailed docs/tutorials/book references to learn how to generate texture coordinates (spherical/cubic/planar...) in a home made 3D editor.
    thanks for any pointer you can provide.

  2. #2
    Junior Member Newbie
    Join Date
    Dec 2003
    Location
    Bangalore, Karnataka, India
    Posts
    4

    Re: generating texture coordinates...

    >
    Hi! I'm trying to do the same currently. First I tried copy pasting q3Radiant code. It generates the texture coordiantes for the brush planes but it all seems to be messed up. No wonder, as Quake uses a different coordinate system while I'm using the default OGL coordinate system.

    I tried looking for material on this subject but could'nt find any. I'll be glad to receive any help or give any help on this.
    Udaya Shankar K.

  3. #3
    Junior Member Regular Contributor
    Join Date
    Nov 2003
    Location
    Michigan, USA
    Posts
    184

    Re: generating texture coordinates...

    Kind of related to this problem. I am trying to generate texture coordinates for generic meshes. By this, I mean, I only posess the vertices and connectivity information/faces.

    There was a paper on the use of kohonen neural networks to generate meshes from points. It also included how to generate texture coordinates.

    Anybody have a suggestion. Thanks.

  4. #4
    Junior Member Newbie
    Join Date
    Jun 2000
    Location
    NY
    Posts
    22

    Re: generating texture coordinates...

    Texture Coordinate Generation depends on your Vertex-Coordinates.
    The general approach is to project a normal from your vertex to your Plane/Cylinder/Sphere and then use the point in your texturemap-coords (plane, cylinder and sphere have only 2 parameters to construct them).

    for example if you want to generate a planar texture coordinate for a Vertex, just use the X/Y coords of your vertex. (you can scale them and add an offset, but this the basic transformation):

    U=sx * V.x + tx;
    V=sy * V.y + ty;

    You can also use X/Z, Y/Z for generating, then you just use another plane.

    Hope that helps a little bit..
    Peter

  5. #5
    Advanced Member Frequent Contributor
    Join Date
    Aug 2001
    Location
    Italy
    Posts
    626

    Re: generating texture coordinates...

    Originally posted by maximian:
    There was a paper on the use of kohonen neural networks to generate meshes from points. It also included how to generate texture coordinates.

    Anybody have a suggestion. Thanks.
    My suggestion is to leave neural networks out of the way. They're way over-complicated for the purpose and I don't think they can give very useful results at all.

    Now, the CSG subsystem I am developing is all but completed however, some of its basic concepts should apply pretty well to other kinds of applications.
    There are basically two kinds of meshes:
    GSC meshes. Those can be build from GSC ops. At the lowest level, every GSC entity has specific code to generate texCoords. So planes generate their texcoords according to their settings while cubes and spheres use other methods.
    Complex meshes. Those are so complicated building them from GSC ops is way unpratical. Artist is responsible to generate correct texcoords for this kind of meshes.

    Maybe you should be more clear about the kind of meshes you're trying to use.
    If you are going to generate texcoords for arbitrary meshes, the only thing I can tell you is good luck. This is work for artists, you could manage to make it some times but there will be times in which it will look simply ugly.

Posting Permissions

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