Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been researching this extensively.

We have a game that's 90% complete, using custom game logic in iPhone 4.0. We've been asked to import a 3D model and have it animate when various events happen in the game.

I've put together an OpenGL view (based on Eagl and several examples), and used Blender to import the model, as well as Jeff LeMarche's script to export the .h file. After much trial, it worked, and I was able to show a rotating model (unskinned).

However, the 3d artist hadn't UV unwrapped the model, so provided me a new model, this one as a Maya file, along with animation in a FBX format, a .obj file, and .tga texture unwrapped.

My question is : how can I use FBX inside OpenGL ES inside iPhone to run through animations? And what's the pipeline to get this Maya file into Blender to be able to create a .h file. I've tried the obj2opengl however the model is missing normals (did it have it in the first place?) and the skin isn't applying at all (possibly a code issue, something I think I can fix).

I'm trying to use Jeff LeMarche's animation tutorial but can't figure out how to get the model files into a proper .h file for use.

Any advice?

share|improve this question
up vote 2 down vote accepted

I am not sure if Maya has Collada format export by default. I guess it does. Only in the case it does not, you might then just install a plugin: .Then, use a Blender build that supports collada import in at least in bones, weights, animation. I think latest blender beta builds do support it. You might try one or several of the latest here:

So, if all that works, means you can export as collada file from Maya, import that file into Blender, and from blender, export as just blend file (ie, for using in that engine mentioned) , or export as directx *.x file (perhaps the import might also work as well, and I think there are x exporters for Maya) , or, reported to work, export from Blender as FBX file,lastly, but with some tech problems of the md2 file format, you could use md2. You could as well just "bake" all frames inside an "Action" in blender, there's a button for that, so to be able to export an OBJ per frame, or, less memory/performance waste, one per x frames, then, in your code, use interpolation, linear or spline, between keyframes, if you can. You might need to do a conversion from these OBJ files to your .h files in a way that your code interpolates (blends motion between two keyframes), as so many objs might be too much memory for the iphone.

share|improve this answer
I'll try this out and see if I can get it to work. Thanks for being descriptive and I'll let you know how it works. Wish this were better documented. – Dominic Tancredi Apr 6 '11 at 14:05

First you need to think what you want/need to implement.

You either implement a skeletal animation system or a keyframe animation system.

If you only need one animation and it's not very long go for the keyframe animation, the skeletal stuff takes a while and if you never done it's going to take a while...

My last project with keyframe animation I did the following:

  1. Imported the FBX into blender, there's a script to import, it's buggy as hell
  2. Exported all the keyframes as .obj files, make sure you select these options on the blender export: Keep Vert Order, Normals, HQ, Triangulate.
  3. Converted the .obj files with a script of mine (based initially in obj2opengl), so that all the keyframes are exported to a binary file with all the vertex data interleaved.
  4. When the animation is needed load the bin files into memory
  5. Running the animation is done by interpolating between two keyframes and storing the result in a VBO

For reference I'm using a model with 4096 Vertices and 16 keyframes, runs well even on a iPhone 3G.

share|improve this answer

Import the file with blender and then convert it to something you can use. The 3D iPhone engine oolong can import blender files for example.

share|improve this answer
I've looked into oolong. Just built the test ReadBlender file... I mean, that's nice for building scenes, but I can't exactly control the animation. Any advice on how to get from Maya -> Blender? Or for controlling the animation in the pipeline? – Dominic Tancredi Mar 29 '11 at 1:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.