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

Thread: Strange Texture Coordinates in OBJ file

Hybrid View

  1. #1
    Intern Contributor uwi2k2's Avatar
    Join Date
    Mar 2011
    Posts
    98

    Strange Texture Coordinates in OBJ file

    hi all,


    i just downloaded a obj file plus textures from a old counterstrike map.

    when i open the obj in blender the map is shown and textured perfectly fine.

    Now i wanted to liad it in my engine and i just took a look at the texture coordinates in the obj file, and came across somesthing like this.

    Code :
    vt 11.2917 -7.3542 0.0000
    vt 1.4141 -0.6875 0.0000
    vt -0.9193 -0.6875 0.0000
    vt 1.4141 -0.9141 0.0000
    vt -7.3542 -5.5000 0.0000

    well i know that you can set that kind of coords and that opengl will just repeat texture,
    but all the text coords for the meshes are set in this strange way ... and looking in the UV editor of blender
    the vertex is not evel close to the texture ...

    am i missunderstanding somthing here .. or is there a diffent way to describe textures ?

    dank
    uwi
    uwi2k2 - OpenGL Trainer: www.opengl-trainer.com
    ---------------------------------------------------------
    Free Programming Helpline: www.programming-hotline.com
    ---------------------------------------------------------
    A Friday Night Programmer: www.uwiworld.net

  2. #2
    Junior Member Newbie
    Join Date
    Feb 2013
    Posts
    11
    Is there an .mtl file? It is possible that there is a scale applied to the texture which is specified in the material.

  3. #3
    Senior Member OpenGL Pro
    Join Date
    Jan 2012
    Location
    Australia
    Posts
    1,117
    and looking in the UV editor of blender
    As you say this is to force texture repeating; the UV editor will not necessarily be able to handle this since they normally have a map from 0-1 and a separate field to specify the repeat. Have you tried rendering it? I have never seen negative UV before but it should work.

  4. #4
    Intern Contributor uwi2k2's Avatar
    Join Date
    Mar 2011
    Posts
    98
    hi,

    thanx for the feedback ..
    indeed the textcoords where just set strangly to have em repeated over the mesh.
    so it was not a tech issue but a manner of bad 3d data.

    thanx
    uwi
    uwi2k2 - OpenGL Trainer: www.opengl-trainer.com
    ---------------------------------------------------------
    Free Programming Helpline: www.programming-hotline.com
    ---------------------------------------------------------
    A Friday Night Programmer: www.uwiworld.net

Posting Permissions

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