Sign in to follow this  
Chris_J_H

Directx Meshes from Blender Models

Recommended Posts

Hello, I am looking for some general guidance. I am developing a simple Game Engine in C++ & DirectX9 as more of a learning exercise than anything and have reached the stage where I need to start importing pre-modeled geometry to create meshes, terrains etc. I have started learning how to use Blender(2.57) (which seems to be the recommended free software to generate 3d models). At the moment I am looking at static meshes with UV and TBN coords to accomodate normal maps, but imagine that I'll progress to animation in due course. I am comfortable writing C++ file parsing software to extract information & filling appropriate directx mesh vertex/index buffers as well as filling in neccessary normals/tangents etc... However I am lacking knowledge of Python (although accept I'll need to get to grips with it at some point) so am not keen to start writing a custom exporter from Blender straightaway. I understand that the .x format is increasingly not used so don't particularly want to tie myself to it.... The question is: How should I bridge the gap between what I create in Blender and using it in my C++ (Visual Studio 10) developed applications? - which file format/pre-built exporters should I look at using? - being able to start simple and refine & develop the approach as I go.... I am little overwhelmed by the shear number of fomats and modelling packages out there....Thanks.

Share this post


Link to post
Share on other sites
Although I have not done anything like what you are doing, I have worked a great deal with Blender and trying to import its models into existing game systems. With my experience, I would recommend using the Collada exporter in Blender, then either write an interpreter in your engine to translate the collada data or write you engine to use the raw collada data. The reasoning for this is flexibility. Learning how to write an exporter for Blender may be a great exercise, but it absolutely ties your engine to Blender. That may not be a great thing to do if you think you'll ever use the engine for anything other than a personal hobby. Additionally, since Collada is simply a standardized XML for digital shapes and animation, it should be easier to implement than any other format that I am aware of Blender supporting. It also seems to support everything, where most other model formats have specifications on how models must be made and animated.

Share this post


Link to post
Share on other sites
[quote name='M.Jackson' timestamp='1305996481' post='4813891']
Although I have not done anything like what you are doing, I have worked a great deal with Blender and trying to import its models into existing game systems. With my experience, I would recommend using the Collada exporter in Blender, then either write an interpreter in your engine to translate the collada data or write you engine to use the raw collada data. The reasoning for this is flexibility. Learning how to write an exporter for Blender may be a great exercise, but it absolutely ties your engine to Blender. That may not be a great thing to do if you think you'll ever use the engine for anything other than a personal hobby. Additionally, since Collada is simply a standardized XML for digital shapes and animation, it should be easier to implement than any other format that I am aware of Blender supporting. It also seems to support everything, where most other model formats have specifications on how models must be made and animated.
[/quote]

Thanks for this. I was looking at the Collada format before but was a bit put-off by the bloated and technical looking output file from Blender. But as you say its an XML standard, therefore text based and non-modeller specific, and it should be easy enough to extract just the data I am interested in using the various identifiers etc and also should accomodate whatever I do going forward.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this