views:

303

answers:

5

I am looking for a way to convert a .obj file of Lightwave 3D to a .h file for iPhone. I looked around and has seen several scripts that can generate .h files for you, but all of them cannot understand Lightwave 3D .obj format. If anyone appears to know some sort of methods that can translate lightwave 3d .obj files to .h file, please share.

Or better, if anyone appears to know some other ways to make .h files, please advice. Thank you.

+1  A: 

Perhaps convert the .obj file to a Blender file, and export a header file from that.

Alex Reynolds
+1  A: 

Jeff Lamarche also has a number of posts on conversion of Blender files to .h files under the OpenGL ES tag at his blog. He's posted a Python script that was iteratively improved by the community (notably Scott Lyons and Dennis Ippel).

I'm not aware of a script that does the export straight from Lightwave, so it currently looks like you'll have to go through Blender first...

Rich Pollock
+1  A: 

Simon Maurice's OpenGL ES series has a 3 part article (I, II & III) on leveraging Blender's python interface to bring models into OpenGL ES iPhone applications. It includes a step-by-step guide and sample projects.

Nathan de Vries
A: 

Not exactly what you've asked for but I've written a step-by-step guide on how to get a LightWave model into OpenGL ES via COLLADA.

A: 

Cheetah 3d at www.cheetah3d.com is a mac-only 3d modeling tool that exports obj as .h