Importing blender-files to OpenGL apps


(vank) #1

What’s the easiest way to import and use models made in blender, in OpenGL apps?


(dahnielson) #2

Depend on what file format the OpenGL program accept (note OpenGL are a graphic API). If we are talking games alot of FPS use MD2 and MD3 file formats others apps may accept VRML.

To export data you need to use Blenders Python scripting capabilities to write an exporter.

If you are writing your own OpenGL app take a look at the Milkshape format (there are some nice tutorials) for models.


(vank) #3

Thanks.
Im writing my own OpenGL apps, how do I export my scene to a milkshape file?


(Zweistein) #4

If you write me an email ([email protected]), i can send you a python script, wich is not written by me, that export your meshes from the blender file to lots of glVertex3f(0.0 ,0.0, 0.0); lines. With the right coordinates :wink: and with normals.