Using 3D objects in an iOS app
Asked Answered
L

3

5

How would I go about adding a 3D object from Maya into an iOS app? For now, before it gets too complicated, I just want to add it in, no response to touch yet. Is there a tutorial about this? Thanks!

Edit: It doesn't necessarily have to be Maya. I can learn how to use another program.

Lopeared answered 14/7, 2011 at 14:6 Comment(6)
I would assume you're going to have to write your own rendering code. Maya is proprietary, and cocoa-touch doesn't include a library for any out of the box 3D rendering. OpenGL ES is available, but you would have to write your own rendering engine.Jackleg
And I'm assuming that's really hard? Anyway, I was looking at the Elements app that Steve Jobs made a big deal about in the original iPad keynote, and wondered how they even put the objects in the app.Lopeared
Are there rendering engines available for download, such as Cocos2D is for making games? Thanks!Lopeared
Elements uses pre-rendered video, with time controlled by swipes left and right instead of a clock. Elements does not use a 3d model.Alyshaalysia
@Alex Brown: do you have any more information about that? I tried to look at the .ipa of Elements to see what they used, and I see a bunch of .pv files. No idea what they are, videos or zip or 3D objects.Lanny
Take a look at the new iBooks building application in the mac application store - it provides this functionality.Alyshaalysia
L
5

Go to Xcode and start an OpenGL-ES Project.

Export your maya-model to *.obj(Wavefront)-format and use Jeff Lamarches obj-loader to create c-header files that you can include into your iPhone project!

Luigi answered 14/7, 2011 at 14:27 Comment(2)
There doesn't appear to be a link to download the source code. Do you have one?Lopeared
The link to the google-project page in the post is under "right here": code.google.com/p/iphonewavefrontloaderLuigi
P
9

Molecules is a great open source iOS app that uses OpenGL ES to render 3D objects that have nice touch interaction. Maybe that would be a good starting point.

Pluperfect answered 14/7, 2011 at 14:26 Comment(0)
L
5

Go to Xcode and start an OpenGL-ES Project.

Export your maya-model to *.obj(Wavefront)-format and use Jeff Lamarches obj-loader to create c-header files that you can include into your iPhone project!

Luigi answered 14/7, 2011 at 14:27 Comment(2)
There doesn't appear to be a link to download the source code. Do you have one?Lopeared
The link to the google-project page in the post is under "right here": code.google.com/p/iphonewavefrontloaderLuigi
E
-1

For a more modern example of rendering 3D meshes, check out this library. It comes with an OBJ parser, so if you can export your geometry as an OBJ file, you can render and interact with it using the library on iOS. Here's a short video of the library in action.

Euripus answered 3/8, 2014 at 17:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.