From: Simon C Mills (simon++at++wgs.estec.esa.nl)
Date: 09/15/2000 01:46:31
Matthew Hesher wrote:
>
> pfUsers,
> First let me apoligize for posting this non-performer question. However it
> could be of considerable use to anyone wishing to write a plugin to read
> OBJ files into a performer application. I'm writting a program to read OBJ
> files into an OpenGL display list and I desperately need help determining the
> relationship of the texture coordinates in the OBJ file (vt) to the texture.
> OBJ texture coordinates do not seem to be limited on 0 to 1 like OpenGL
> texture coordinates are. I need to normalize these OBJ texture coordinates
> on 0 to 1 so that I can use them in OpenGL. The texture I'm using is larger
> than the geometry I'm placing it on. Therefore I need to be able to align
> certain parts of the texture to certain parts of the geometry (this is also
> why I don't know the maximum texture coordinate value possible in my OBJ file.)
> Thanks for any help or pointers to useful information.
> Curt
> hesher++at++cs.fsu.edu
Texture coordinates do not need to be limited to 0 to 1 so what is in
your OBJ files is valid. What happens outside that range depends on what
texture repeat function (see pfTexture::setRepeat). The WRAP function
causes the texture to repeat like tiles and CLAMP clamps texture
coordinates to between 0 and 1 which visually results in the perimeter
texels being "smeared" out to the edges of the polygon. I hope this
helps.
Regards, Simon
_______________________________________________________________________
Simon Mills
Silicon Worlds S.A.
c/o Modelling & Simulation Section (TOS-EMM) Tel: +31 (0)71 565 3725
European Space Agency (ESA/ESTEC) Fax: +31 (0)71 565 5419
Postbus 299, 2200AG Noordwijk e-mail: simon++at++wgs.estec.esa.nl
The Netherlands http://www.estec.esa.nl/wmwww/EMM
_______________________________________________________________________
This archive was generated by hypermail 2b29 : Fri Sep 15 2000 - 15:39:03 PDT