I have recently downloaded the 30-day trial version of 3DSMAX 2012; and would like to import some of my objects into an IPhone application.
My idea has been to export the file from 3DS in OBJ format and read them from my app afterward. From the App log, i can see that all vertex data are correctly read as i can see exactly the values as they are defined in the OBJ file. However, what i get on the iphone simulator is not what i have drawn on 3DS.
To simplify my investigation, i have imported a cube; with the following vertices (see the attached screenshots; one being the object drawn, second being the object shown in the iphone simulator)
-49.6109f, -37.0908f, 14.4273f,
-10.8045f, 40.7808f, 59.8638f,
76.1792f, 40.7808f, -14.4273f,
37.3728f, -37.0908f, -59.8638f,
-25.655f, -65.3948f, 42.476f,
61.3287f, -65.3948f, -31.8151f,
100.1351f, 12.4768f, 13.6214f,
13.1514f, 12.4768f, 87.9125f,
The code i use in the drawing method is the following:
glVertexPointer(3, GL_FLOAT, 0, [drawObjectTmp getVertices]);
glEnableClientState(GL_VERTEX_ARRAY);
glDrawArrays(GL_TRIANGLE_STRIP, 0, 8);
With the arrays of drawobjectmp having the exact values described in the OBJ file. Note also that the GL_TRIANGLES option has presented similar results on the screen.
My current assumption is that something has to be done on the objects in 3DS studio max to export the file with a certain vertex "order"; however i am a total beginner in 3DS so it makes my troubleshooting rather slow. I have couple of leads on teslta to transform surface into trianges but it didn't really work out on the simulator screen either. I have tried also exporting the objects with the triange option on; didn't help either.
I am sure it's a trivial issue for any experienced person in opengl and 3ds max; but i am not , yet
so i am open for any suggestions, pointers to good tutorials or demos on this particular topic.
Thanks
Babarorhum







