Jump to content
  • Advertisement
Sign in to follow this  
kburkhart84

OpenGL Blender files

This topic is 4903 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 couldn't think of a better place for this question, because it is too technical and doesn't have to do with the creation of 3d models, rather loading and displaying them. I'd put it in OpenGL, but it doesn't matter the API used for this. I have looked around already but I was interested in using the .blend file format for actual game models, instead of my current md2 files. I also need the animation that comes too. I haven't found anything on it. If there is one, I'd like a link to a tutorial, but if there isn't one, maybe atleast a link to the actual binary data in the .blend file format. From their, I might be able to figure out how to load it myself. Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
If you want to know how it works, I suggest you get the blender source here and look at the DNA_* files in the source/blender/makesdna folder (or if you have VC, look at projectfiles/projectfiles_vc7).

Other than that, I don't know of any third party loaders for the .blend file format.


jfl.

Share this post


Link to post
Share on other sites
Greetings!

Isn't blender open source? You could just visit the official Blender3D web site and download the source package and go investing it. In general, most original package files are not very suited for games.

I most commonly use 3dsmax, but I have to admit, the 3dsmax exchange is pure hell work, nothing but a pain in the a.. I decided to use Alias .OBJ as for me, but there are issues with groups too. You never really know in which group selection are you in.

The most usable idea is MilkShape3D. Visit the MilkShape site, you will find free sources about the MS3D format. MilkShape is very buggy, and it does not convert game files 100% but you will have the fastest results with it. You will be able to reuse Quake2 & 3 files, Max Payne 1 & 2, Unreal Tournament, Half-Life etc...

Before starting skeletal animation, I suggest you to refresh some algebra on matries. The Real Soon Now code isn't very good at math and it complicates too much on matrix blabla. Someone could rewrite it to D3DX - anyone would understand it at once. It is very easy once you get the idea. MilkShape supports importing/exporting/modeling for many popular game formats. It is worth a try.

Share this post


Link to post
Share on other sites
I've used Milkshape before, and my models usually are MD2 models, but I don't know of any and can't find a good MD2 exporter for Blender, and I'd rather use blender than Milkshape due to that it is free, and has more/better features. The only thing I can think of is to export MD2, or another stable format, than use another program(free) which can animate and add bones like in milkshape. The program would have to output good MD2 files, but it could load the same or whatever output I chose from blender. I'm not too good at modelling yet, but I like Blender's features, especially the subdivision surfaces.

Share this post


Link to post
Share on other sites
If you need the animation data, why not use the .x format, I believe Blender has an exporter?

If I remember correctly, the Blender team suggests that you do not use the .blend file format for loading into games, because the .blend format has a lot of extraneous information (from a game's point of view), and it also is not 'fixed', i.e. the format may change in future versions of Blender. (Both of these are generally true of any modeling/animation software's internal format).

Hope this helps,

SwiftCoder

Share this post


Link to post
Share on other sites
As far as I remember, the .blend is just a dump of the memory used to store the scenegraph of blender. So it really contains a lot of stuff you don't want : UI configurations, etc.

As someone said, you can use .x exporter which is available in the 2.36 release. You could also write your own exporter using python scripting. It's not hard and you have full control on what you do. That's what I did ^^


Share this post


Link to post
Share on other sites
I may try to use my own exporter/make it. That or I'll just keep the MD2 format and convert with some other software. I just wanted to avoid conversions outside the program, but one way or another, it probably wasn't avoidable. Thanks for the help.

Share this post


Link to post
Share on other sites
I think I have finally settled on the graphics pipeline for my engine. It uses the skeletal animation code from realsoonnow only not the the binary format, it uses the ascii format. I use Blender to model, and then export to .3ds, (this triangulates the model, and provides a sufficiently featured format) then I import this file in to CharacterFX (Which really is excellent IMO) to do all of the animating/boning/etc. CharacterFX can also export Milkshape3D ascii files, which I then load with my engine, plus an external ".anim" file of my own making that stores frame ranges for all of the different animations. Only thing I haven't hacked yet is blended animation (walking with the legs, attacking with the upper torso/arms, etc.) Other than that, I think it's working great and finally up to par to make some good animations, hopefully it will be easy for people to learn, too, so they can modify my game.

Share this post


Link to post
Share on other sites
I would first look into the python blender interface to pull data out since I think the .blend file changes internally each version. There is a Calc3D I think or something named like that, a char animator app that pulls data out of blender thru that python interface I think.

Share this post


Link to post
Share on other sites
Almost Cal3D. And yes, Blender fully supports exporting (including armatures and animations) to the Cal3D format by default, using the python interface.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!