Best process to show an OpenGL Animation in iPhone [closed]
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this questionI'm having issues being able to import a bone and skeletal animation from Maya to Blender to iPhone. Here's what I've done:
- install the ColladaMaya plugin to export a DAE for Blender to export
- used Jeff LeMarche's script to be able to export a single keyframe of the model and import this .h file into the iPhone game
- Setup the GLView using more of Jeff LeMarche's steps and rendered into our Game, so this model display next to the actual game (not in 3D).
- Researched oolongngine, sio2 (applied but haven't yet gotten e-mail back from them), other SO q's for solutions, including mine from game dev
- Reviewed using FBX SDK content pipeline to dynamically generate class files for the animations.
I can import a model and display it. A lot of these processes respond to that issue and leaving the developer to manipulate the game object programmatically. My main issue is finding the bes开发者_开发问答t, defined process of importing an animation into iphone next to the existing game? I don't need a whole game, or a whole scene, just one animating model and some steps to follow.
This animation is meant to play in a loop. There are 3 more animations that will play on different game states (good move, bad move, etc.). So I'm concerned that LeMarche's keyframe solution (which basically means exporting EVERY keyframe as a .h file) will be incredibly time-intensive and memory-intensive. I'm definitely willing to do it, but after all the research I've done (additional links not included), I'm lost as to where to go next besides hand-exporting each keyframe and importing them.
EDIT:
I've added a bounty to this for anyone who can give me a clearly-defined process for importing an animation from a 3D application into iPhone. NOT the entire application itself (i.e. Unity, Sio2, etc.), but just showing a 3D overlay in an application (like an animating model next to a bejeweled-esqe game, not interacting with the world.)
People keep saying, "create your own model loader". Are there scripts, examples, tutorials, anything that walks through this "model loader" process from EXPORTING from the 3D application (preferably Maya or Blender) and IMPORTING this animation and rendering it in Objective-C?
This is really a big problem with animation export. I had this problem recently and ended up with Assimp.
However it also has problems with skeletal animation exported from Maya and Blender. As for me I prefer 3Ds Max (don't forget to reset Xform before rigging), it has no problems with Collada and animation.
Though if you want to use that models in your game I suggest you to write your custom exporter for Maya or Blender. Also try the mesh (morph) animation. If you don't use inverse kinematics or something like that this is what you need.
I have written code that reads Blender files and parses the mesh, bone and animation data. It then applies the bone animations to the meshes world transforms etc. It's a lot of work, but certainly doable. If you have any questions about Blender peculiars, just ask me.
The other option is using a library like OgreKit, which can read blend files and does skeletal animation for you as well out of the box.
AnimKit is a small animation library that can read a .blend file and play an animation using Glut. It extracts all data for skeletal animation and more, including bones, mesh and animation channels etc from a Blender 2.5 .blend file.
AnimKit is open source (using the permissive zlib license) an you can check it out using Subversion:
svn co http://code.google.com/p/gamekit/source/browse/#svn%2Fbranches%2FAnimKit AnimKit
AnimKit doesn't run on iPhone yet, but I'll port it soon, using Oolong Engine.
Another interesting resource is Proton SDK (protonsdk.com) it has a customized Irrlicht SDK that runs on iPhone/Android etc. The RT3DApp sample can play an animation.
精彩评论