Question about 3D format to load

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
chamile
Posts: 9
Joined: Thu Jun 05, 2008 4:38 pm

Question about 3D format to load

Post by chamile »

Hello

I have a 3D model format derived from a *.x-Mesh but with using xml instead of plain text. You may have a look at a sample file on
http://home.arcor.de/jaelcbase/archive/gecko.xml

My question is: Is it possible to load this with Irrlicht? Of course this is a stupid question, it should be possible. The real question is: How difficult is it to load such a file?

Background: Some years ago, a game project was started to build up his own engine with DirectX9 in C++. During the time, I joined and developed the models with Cinema4D and ported them to first x-format later to the modified xml-x-format. After a time of nearly 2 years of death, I try to revive the project. Because of the experimental design, the code is very confuse and has lots of mem leaks. Therefore a complete redesign is the weapon of choice. At this point it's unclear for me to recode the original engine or to use one which is primary complete enough (like Irrlicht). I will connect this decission to the question above.

For people which are interested:
Some screenshots from the original:
http://home.arcor.de/jaelcbase/index_en.html
The project page is:
http://sourceforge.net/projects/jaelc
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Yes you can load it, you just need to write your own X-XML model loader to parse this file and store the vertices, polys, materials etc into meshbuffers.

You can look at CXFileLoader.cpp in src/irrlicht of your SDK and study how Irrlicht loads the usual .X files and then you can probably see how you might adapt it to make a similar one that will read your specific file format.

Presumably you don't have the original .x files or any way of loading the X-XML files back into a modelling program as obviously those would be easier and quicker routes, though writing your own loader won't be hard if you've got a bit of experience with C++ and 3D graphics and a fair amount of patience ;)
Image Image Image
chamile
Posts: 9
Joined: Thu Jun 05, 2008 4:38 pm

Post by chamile »

Yes, I had a similar idea about this an looked for some of the File Loaders. Surprisingly the milkscape-loader seems to be closer to my format as the x-loader.
As I wrote the loader for DirectX, It should not be a problem to adapt one of the Irrlicht loaders to my needs. Thank you!
Post Reply