Page 1 of 2

Exporting Blender Model/Scene to Irrlicht

Posted: Mon Mar 24, 2008 1:37 pm
by Caliban
Hello,
i yust tried to model some Blender objects to export them to Irrlicht.

While i am able to export only one object, i didnt manage to export the whole scene. Is there a special trick to do that ? I didnt found in the forum an answer, so i am asking here.

thanks and regards

Posted: Mon Mar 24, 2008 6:57 pm
by Halifax
It has to do with your exporter, and nothing to do with Irrlicht. Usually they have an option where you can select whether to export the selected object, or export the whole scene.

Posted: Mon Mar 24, 2008 8:52 pm
by Caliban
Thanks,

i have found an option, the key "a" to select all objects. But i only can export to collada. And when Irrlicht imports the scene, it has no texture.

Thank you

Posted: Mon Mar 24, 2008 9:53 pm
by hybrid
Yup, collada isn't really done yet, even the current SVN trunk version is not yet really working properly. You can also export the whole scene as one mesh, then all other exporters should work as well.

Posted: Tue Mar 25, 2008 4:54 pm
by Caliban
Ok, i am sorry, i have to look to some other format.
I made the expirience that, when i try to import 3Ds Format from Blender, there are also some drawbacks, that the textures and lights and other things are not imported, only the dimensions of the objects.

Maybe i make something wrong, due to the fact, that i have just started to test the developement cycle ?

Thanks and regards

Posted: Tue Mar 25, 2008 6:17 pm
by wyrmmage
there's actually an option in Blender to export all the objects in a scene, which probably does something differently than hitting 'a' to select all of the objects and then exporting them. (this probably misses things like lights, and I believe it doesn't select different objects depending on if you're in edit or object mode).
Ok ya, I just checked, and if you export to a .obj file, it gives you the option to export just the selected objects, or everything (it's the very top-left option).
Hope this helps! :)
-wyrmmage

Posted: Wed Mar 26, 2008 10:53 am
by Caliban
Hello,

thank you !

I can export the Scene to an ".obj" File.

But i have now to find out, how to open an ".obj"-File in Irrlicht ...

regards

Posted: Wed Mar 26, 2008 11:46 am
by hybrid
Just like all other mesh file formats with smgr->getMesh("filename")

Posted: Wed Mar 26, 2008 12:18 pm
by Caliban
hybrid wrote:Just like all other mesh file formats with smgr->getMesh("filename")
Yes,

i did that, but when i start the system, the compiler complains about escape sequences, which are not recognized.

I think, i still have missed something or i do something wrong.

regards

Posted: Wed Mar 26, 2008 1:38 pm
by hybrid
I guess you use Windows-style filenames. Using \v inside C-strings is a bad idea. Use the C-style / filename separators or drop the path completely.

Posted: Thu Mar 27, 2008 6:25 am
by Caliban
hybrid wrote:I guess you use Windows-style filenames. Using \v inside C-strings is a bad idea. Use the C-style / filename separators or drop the path completely.
Hmm, i test it on a windows system and my example-programs can call the getMesh methods on the other formats without a problem. I wondering, what i am missing.

thanks

Posted: Thu Mar 27, 2008 9:26 am
by hybrid
Simply post the complete error message and the mentioned code lines.

Posted: Thu Mar 27, 2008 11:51 am
by Caliban
hybrid wrote:Simply post the complete error message and the mentioned code lines.
Oh, sorry, hybrid, you were right. I exported the obj-File and i can read it with smgr->getMesh("file.obj")
I donĀ“t know why, but it seems that Blender is exporting only some arbitrarily objects and now, with my last compilation, it is crashing ...
I have to test a lot, i think

thank you !

Posted: Thu Mar 27, 2008 9:48 pm
by hessiess
the obj loader dusent seem to like files with more than a few k verts. otherwise the program slowly uses more ram and crashes when all the ram is used. at lest that's what it dus on Linux. Try a different format

Posted: Thu Mar 27, 2008 10:56 pm
by hybrid
I'm pretty sure that I've tested the obj loader with valgrind. So there should be no mem leakage. If you have a huge number of groups (with the obj loader from SVN), many materials, or huge materials it might require some time and lots of memory. Do you have a problematic example?