Jump to content
  • Advertisement
Sign in to follow this  
Burnskagen

OpenGL Beginner: Blender models in OpenGL apps

This topic is 2535 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I realize that this has been asked about before, as I spent a long time searching google, as well as the forum for an answer, but all of the ones I found relied on amounts of knowledge that exceed mine. Therefore I make a thread of my own.

I have created a model in blender and I wish to use it in my OpenGL application. Can someone please explain to me how I would do this, and keep in mind that I am a beginner? I would be grateful.

Share this post


Link to post
Share on other sites
Advertisement

I realize that this has been asked about before, as I spent a long time searching google, as well as the forum for an answer, but all of the ones I found relied on amounts of knowledge that exceed mine. Therefore I make a thread of my own.

I have created a model in blender and I wish to use it in my OpenGL application. Can someone please explain to me how I would do this, and keep in mind that I am a beginner? I would be grateful.


Save it to disk in a format of your choice, then load and parse the file in your application.
Most commonly used formats are well documented and many even have libraries you can download that will handle the loading and parsing for you.

Thats about as much help as you can get unless you specify what format you want to use.

Share this post


Link to post
Share on other sites

[quote name='Burnskagen' timestamp='1325453868' post='4898775']
I realize that this has been asked about before, as I spent a long time searching google, as well as the forum for an answer, but all of the ones I found relied on amounts of knowledge that exceed mine. Therefore I make a thread of my own.

I have created a model in blender and I wish to use it in my OpenGL application. Can someone please explain to me how I would do this, and keep in mind that I am a beginner? I would be grateful.


Save it to disk in a format of your choice, then load and parse the file in your application.
Most commonly used formats are well documented and many even have libraries you can download that will handle the loading and parsing for you.

Thats about as much help as you can get unless you specify what format you want to use.
[/quote]

I don't know, which format would be smartest? I don't need the lighting or the camera, but I want to store everything else, so that the objects can become part of a scene composed within the openGL app.

Share this post


Link to post
Share on other sites
"Wavefront OBJ" if you want only meshes with materials (which loader is easy to implement).
"3D Studio Mesh" which has a limit of triangles per mesh - 65536 (16-bit). It contains a binary data which impossible to read in text editors (with "wavefront obj" you can). Data stored into chunks (meshes, materials, lights, cameras, animation (which "wavefront obj" doesn't contain)). If you need there only some kind of them just skip the chunks which you wouldn't use during reading from file.
There are many others (also you can create your own format (how to store data in file & how to get it from there)).
Need examples, tutorials? Ask Google for that (with list of formats supported by blender!) and chose the file format of scene which its architecture you like.

Share this post


Link to post
Share on other sites
I recommend using the assimp (http://assimp.sourceforge.net/) library for loading models, it can load models for you in a variety of formats including blender format (although i don't recommend loading them directly). A good format to use would be MD3 or MD5 both of which assimp can load.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!