I'd like to have a 3d object inside an iPhone UIView that can be rotated by using the touching events (swipe with a finger maybe). Where shall I start looking at? I guess OpenGL ES might be useful to do this, but I know nothing about it and I do not wanat to go deep inside OpenGL Programming ( studiying physics, rotations, quaternions etc) so maybe that is not what I need. I can create very basic 3d models in Blender so I'd like to use those in the app (I saw there are scripts that can parse and convert obj files in arrays of vertexes etc) Shall I rely upon a graphic engine like Irrlicht? Any suggestion is welcomed
you can look at a few things. Cocos2d-iphone is a good framework for 2d stuff. the templates they use are pretty good and set everything up. in cocos2d-iphone you can still draw opengl primatives (in the draw method) but also have the power of cocos2d to do things like sprites and other elements.
otherwise here is a quick guide for bringing in blender objects into an iphone project.
one thing that i noticed was with blender 2.5 alpha, i couldnt get the script to integrate properly so you just have to do that part manually. Just remember to convert your quads to triangles because thats what the iphone takes in.
That is something I've done a few months ago. A friend that is a proper Objective-C developer said I should try the SIO2 engine.
Tutorial2 covers exactly what you are after.
Basically you build your scene in Blender and there is an exporter to get that in the SIO2 Game Engine on the IPhone, how awesome is that ? :)
To break it down:
- Open up the xcodeproject from Tutorial02
- Open up Blender (with a mesh)
- Run the Exporter(select the TextEditor in a Window, open sio2_exporter.py from SIO2_SDK/exporter and run)
- Select your mesh and hit export. You could backup tutorial02.sio and export a new one.
- In template.mm find the templateScreenTouchMove() method (towards the bottom) and update the mesh name
e.g. change
SIO2object *_SIO2object = ( SIO2object * )sio2ResourceGetObject( sio2->_SIO2resource,
"object/Suzanne" );
to
SIO2object *_SIO2object = ( SIO2object * )sio2ResourceGetObject( sio2->_SIO2resource,
"object/YourMeshName" );
It's all explained in the video tutorial as well.
Good luck!