Reputation: 5850
I have been developing on iPhone for a long time, but I am new to game development. In my new project, which is a cross between an application and a small "game", I have to show an animation of a dancer, based on the interaction with the user. There are about 5 predefined dancing sequences, created by the artist with Maya or whatever 3D modeler program.
I have been thinking about:
Exporting the dancing sequences in 2D, and use UIImageView, Core Animation or some 2D game engines such as cocos2d to show them on screen. However, since the dance sequences may be long (around 10s each => 150+ frame images), I'm afraid it will require too many frame image, and eat up too much memory.
Use 3D: I hope it will be lighter, would it? Because we only need to import the skeleton and maybe key animation points, and the animation will be done by the code?. However I only have basic knowledge in 3D (very basic openGL etc...). I am willing to learn more, but what are the common practices here? For example in what format should I export the animation into? About the memory, would it really save me a lot compared to the 2D approach?
Upvotes: 5
Views: 1202
Reputation: 1356
If your animation is static you could render it into a movie file from your modeller.
If you want to do it in 3D you should probably try do it with an engine like ogre, like the other answer suggests. OpenGL itself has no support for 3D file formats.
What I once did to get 3D data from Blender into one of my ios projects without any additional engines/libraries was to export my scene into a Collada file (which is XML) and build a XSLT transform which transforms Collada into a standard OS X plist (also XML). For the XML transformation you can use Saxon.
Upvotes: 2
Reputation: 1973
try Ogre3D, it works great on the iPhone, has support for skeletal animation and has plenty of community support.
Upvotes: 1