Log in or register to post comments

Steps to load new models

June 17, 2012 - 6:22am #1

Hello,

I'm trying to find simple steps to load new model into the iOS ImageTracker project, but all the forums are about issues, and I feel a little lost.

I have a .obj file and I use obj2opengl.py to get a .h file. My problem is not having indices in the file. So I tried to use glDrawArray, but it doesn't show anything when I run the example. The only way to see the model is to keep the indices from the teapot.h file, but it's not correct.

Is there any example or steps to change the teapot model? It shouldn't be that hard.

I'm using the native iOS SDK
Mac OS X 10.7.4
Xcode 4.3.2
iPhone 4 GSM with version 5.1.1

help me

January 9, 2013 - 9:15am #5

 

I'm using xcode, but try using Unity3D.
my problem is with the 'new' model 3d, because the sample application (FrameMarkers) in this part of the code
 
"[self add3DObjectWith: pinguinoNumVerts ofVertices: pinguinoVerts normals: pinguinoNormals texcoords: pinguinoTexCoords
                      with: NUM_Q_OBJECT_INDEX ofIndices: QobjectIndices usingTextureIndex: 0]; "
 
I have not 'NUM_Q_OBJECT_INDEX' nor 'QobjectIndices' in my model.h.
 
I went through a model. obj to. h using obj2opengl.pl.
 
What do you recommend?
 
thanks friend

Have you tried using

January 9, 2013 - 8:46am #4

Have you tried using Unity?

..as you can make quite good progress even with the free version, and changing the model is easy :)

N

Indices

January 9, 2013 - 8:09am #3

 

Hey friend,
you solved your problem?
because I have the same: (
 
regards

Re: Steps to load new models

June 18, 2012 - 2:11am #2

Hi iBasel

There are quite a few threads on this, so hopefully some of these might help

http://ar.qualcomm.at/node/2000231

describes how to take a Blender model and generate header files. It generates a header file that is similar to Teapots.h, except that it does not include an index array. That means you will need to use the glDrawArrays function instead of glDrawElements.

http://pastebin.com/cUNA8krx

this describes a very simple plane object that you could try.

HTH

N

Log in or register to post comments