Results 1 to 3 of 3

Thread: Texturing Objects build from Triangles

  1. #1
    Senior Member Regular Contributor
    Join Date
    Mar 2000
    Location
    Germany
    Posts
    235

    Texturing Objects build from Triangles

    I know how to put a Tga or pcx as Texture on
    -for example- a Quad with glTexImage2f.
    But how do I map these Texture on a Object
    -for example- a sphere,which consist of Triangles(Faces),if I want the bitmap to cover the whole sphere and not only a single face?

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Feb 2000
    Location
    France
    Posts
    880

    Re: Texturing Objects build from Triangles

    Hi !

    I am not sure you will like the answer but you have to calculate the textures coords yourself....

    Basically, most of us use a modelling tool (for me it's 3DS Max r3) which generates those mapping coords. Then, we import the object along with its normals (calculated in the software as well) and texture coords.

    You might find links on the web for algorithm about texture coords generation. But I can't remember those links !

    You can also ask OpenGL to generate those coords (look at glTexGen function) but this won't work for complicated objects...

    Hope this helps !

    Eric

  3. #3
    Senior Member Regular Contributor
    Join Date
    Mar 2000
    Location
    Germany
    Posts
    235

    Re: Texturing Objects build from Triangles

    I know read ASE-Files(exportet by 3Dsmax) and
    the Texture coordinates from this Files work
    perfect.Muchos Gratias Eric!

Similar Threads

  1. Replies: 13
    Last Post: 03-23-2018, 10:15 AM
  2. ? Texturing many triangles - 3DS loader question ?
    By Z-Knight in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 09-07-2011, 03:30 PM
  3. Texturing on triangles issue
    By mtnbiker in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 03-20-2010, 04:40 PM
  4. Texturing triangles
    By Tea in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 06-14-2002, 09:49 AM
  5. Texturing Objects build from Triangles
    By XBCT in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 03-04-2000, 03:21 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean