0

Possible Duplicate:
Loading model using Jeff Lamarches script

Guys this might sound very newbie question anyway i'm very new to GLKit and OpenGL

I'm using the Jeff Lamarches scipt from here (https://github.com/jlamarche/iOS-OpenGLES-Stuff) to generate Objective C header file from Blender.

Let say I've created a cube and did UV mapping in Blender using some image suppose image.png.

So basically I would like to understand where in the header the information about the mapping of the texture on the 3D model is kept ? Because I see only the vertex coordinates and normals in it.

In his examples of the MeshVertexModel is a three field array i.e.

...
    {/*v:*/{-0.351562, 0.828125, -0.242188}, /*n:*/{-0.183599, 0.982971, 0.005310}, /*t:*/{0.954205, 0.958702}},
...

But all I'm getting from generated header file is in following format

...
    {/*v:*/{-0.351562, 0.828125, -0.242188}, /*n:*/{-0.183599, 0.982971, 0.005310}},
...
Community
  • 1
  • 1
deimus
  • 9,565
  • 12
  • 63
  • 107
  • It would be extremely helpful for you to link to the script you're using. I assume it's the one in this github repo: https://github.com/jlamarche/iOS-OpenGLES-Stuff. – warrenm Jul 19 '12 at 19:35
  • I'm also using the same script – deimus Jul 19 '12 at 19:36
  • @Sven whats the hell I'm downvoted, the question your reffering is my own other question, and it totally has nothing to do with this one. If you find anything that my be corrected here let me know ! – deimus Jul 19 '12 at 19:38

1 Answers1

0

Found that similar issue has also Wavefront export, here http://projects.blender.org/tracker/index.php?func=detail&aid=30317&group_id=9&atid=498 in 2.63 Blender.

Just replacing the uv_layer = me.uv_textures.active.data by uv_layer = me.tessface_uv_textures.active.data helped to have generated texture coordinates.

Update : For the sphere and cube the script does not work normally, i.e. for Cube it does generate no vertices and for sphere it does generate the vertice of a circle, for other complecated objectes the patch works and generates all the data correctly.

deimus
  • 9,565
  • 12
  • 63
  • 107