Hello,
On Sat, Oct 27, 2012 at 10:09 PM, Dmitry K.
<zzf...@hotbox.ru> wrote:
COLLADA importer crashed.
3ds importer worked good and fast but the .3ds model is not so good looking as .obj model.
I haven't yet tested OpenFlight importer.
I'm a bit disapointed. Why is it so hard to make good and really fast importer that works for the engine?
Importers are tricky business, because e.g. while Collada is a "standard", there are many incompatible files produced by the authoring tools. Also most importers will load only mesh and texture data, any physics, animation or other data will likely be missed (with the exception of few loaders). OSG isn't a full-blown game engine but a scenegraph only, so it doesn't really have a complete artwork production pipeline - you need to build your own.
Your best bet is to use osgconv, load the file as e.g. .obj if it works for you and have osgconv save it as .ive file. Those are binary and load fast and can include textures as well. However they are not guaranteed to be compatible between OSG versions, so you may have to re-generate them in the future if you upgrade OSG. Alternatively, you can save the scenegraph from your application directly using the osgDB::writeNodeFile() functions into an .ive - that is basically what osgconv does.
I didn't have much luck with newer .osgt, .osgx and .osgb formats - the serializers were regularly missing data or just plain crashing outright. Good old .ive and .osg formats are the most reliable.
Regards,
Jan