Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

type Conversions from Obj (3D Model) file to .h and .c

Does XCode provide conversions from Obj (3D Model) to .h and .c file ? I am bit lazy to write code for this conversion. Or any off the shelf product available?

XCode, Mac OS X (10.5), Obj (3D Model)

Posted on Dec 9, 2008 4:09 PM

Reply
24 replies

Dec 16, 2008 10:47 AM in response to ooftish.com

My point being that your continuous misuse of basic terms is making it impossible to understand you, but again, the format of the data is not going to affect rendering speed or animation performance once it's loaded. A point in space is a point in space whether it's declared in a static array or an XML file. If you want it to draw faster then give it less to draw.

Dec 16, 2008 12:54 PM in response to ooftish.com

I am looking for expert advice from IPhone Guru developers..


If it is Guru's your looking for, you might not find them here.
You are currently posting in *Software Development 101*

This forum is for new programmers with basic questions. Please repost your question in the appropriate forum, or join one of the newsgroups that are frequented by the Guru's you seek.

J

Mar 10, 2009 1:40 PM in response to ooftish.com

Hi ooftish,

Did you get an answer to the problem of converting models for the GLteapot program? I ask as I am attempting to do the same thing. How did you convert your .OBJ files to .H files. I would be much appreciated if you could let me know. I can copy over the vertices and normals from .OBJ to .H but I am not sure what I should copy over for the indicies as I have not heard of indicies before as I am more of a 3d modeler than programmer. I assume the inidicies are either the faces or texture co-ordinates.

Any and all help will be apprecited

Mar 10, 2009 5:22 PM in response to ooftish.com

C Objective or otherwise has no knowledge of 3d models, or any way to convert them.

You have to write a obj importer/parser in you program to load the model and any related information ik and animation sequences.

Again for animation you have to write and engine to animate the object, opengl serves one purpose that is to draw the information you provide it with.

As per storing static model information in a header, this is ok for small and few models, i would not want to store 1mb of object data in a header.

So for small models you would write a exporter from lets say blender to export a header file.

For bigger more complex models i would use a proprietary format, roll your own with the information you need.

From what i am reading you would be better off getting a 3d game engine for the iphone and learn to use that.

Mar 12, 2009 6:59 AM in response to ChrisPol

I have been playing with SIO2 and blender but it seems the iphone cannot handle very complex 3d objects regardless of how they are stored. Storing vertices info in a .h file or any other file format does not make much difference. I would still love to know how to convert my 3ds or obj etc... models into a .h file. I can convert my 3ds files into blender and out of blender into the sio2 format used by the sio2 SDK but looking at the sio2 files and the sio2 tutorial it shows that sio2 files are just .zip files with a standard directory structure within them and when you look into those zips you just find files specifying vertices in standard text format so no real difference between using the sio2 files and .h files apart from sio2 has everything else already setup for you and an exporter for blender. I just wish there was a simple exporter and simple source code to a 3d object viewer. I need to display an object in 3d and then allow the user to click on specified areas of the 3d object and be taken to various web links.

type Conversions from Obj (3D Model) file to .h and .c

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.