1

I'd like to import objects I create in Cheetah 3D to my open GL iphone app. Can someone show me how this can be done? I can export my objects as any number of file formats, but I'm thinking obj is the correct one. What do I need to do to render this in my opengl canvas?

Thanks, I am a total n00b when it comes loading things from an external file!

epatel
  • 45,805
  • 17
  • 110
  • 144
dev
  • 2,949
  • 5
  • 37
  • 48
  • Have a look at this SO question [Want to display a 3D model on the iPhone: how to get started?](http://stackoverflow.com/questions/413919/want-to-display-a-3d-model-on-the-iphone-how-to-get-started) – epatel Mar 20 '09 at 08:57

2 Answers2

1

While I've not done any GLE work specifically, I can tell you at least that obj is the most portable and widely used format in general.

FBX (Filmbox) is a relatively new and interesting format that seems to be gaining some traction, but you'll find that obj will suit most of your needs.

OpenGL has no native support for reading 3d file formats - you'll need to use a library like GLUT that can convert that data in the obj to an OpenGL primitive.

Download GLUT and find progs/demos/smooth/glm.c which provides methods for parsing objs.

Bayard Randel
  • 9,930
  • 3
  • 42
  • 46
0

I built a loader for Cheetah 3D's native file format, .jas, and I explain my process for why I chose .jas and how I figured out how to read what I want from the file. The loader is undergoing changes as I progress on my game, so it's not finished, but it's already capable of reading vertex and polygon data, any transformations on the model, tessellation of any quads on the fly, calculating vertex normals, reading UVs and throwing everything over the fence to the GPU.

What I haven't added to the loader yet is the ability to read animated bones and skinning data. I'll be adding that soon.

Brad Larson
  • 170,088
  • 45
  • 397
  • 571
Jim Love
  • 3
  • 1