does Collada work?

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
funxer
Posts: 10
Joined: Thu Jan 04, 2007 6:25 pm

does Collada work?

Post by funxer »

I've been following the examples and "01.HelloWorld" claims that I may load a Collada .dae file...I try but nothing shows up.

I've exported the same model as an Obj and it shows up so I know it's not a scale problem.

I've also tried irrEdit -0.6 and this is what I get:

COLLADA skipping section: library_animations
COLLADA skipping section: library_materials
COLLADA skipping section: library_effects
COLLADA skipping section: library_geometries
COLLADA skipping section: library_visual_scenes
COLLADA skipping section: instance_visual_scene
Loaded mesh: ../../media/ColladaTest.dae
Polycount:0

The same model exported as an Obj:

Loaded mesh: ../../media/ObjTest.obj
Polycount:800

______________________________________________________

Find the Collada File here:
http://www.3drobert.com/cgtalk/ColladaTest.dae
______________________________________________________

Here is the code:

//Based off of the "01.HelloWorld" Example


#include <irrlicht.h>

using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;

#pragma comment(lib, "Irrlicht.lib")

int main()
{

IrrlichtDevice *device =
createDevice( video::EDT_SOFTWARE2, dimension2d<s32>(640, 480), 16,
false, false, false, 0);

device->setWindowCaption(L"Hello World! - Irrlicht Engine Demo");


IVideoDriver* driver = device->getVideoDriver();
ISceneManager* smgr = device->getSceneManager();
IGUIEnvironment* guienv = device->getGUIEnvironment();


guienv->addStaticText(L"Hello World! This is the Irrlicht Software renderer!",
rect<int>(10,10,260,22), true);


IAnimatedMesh* mesh = smgr->getMesh("../../media/ColladaTest.dae");
IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh );


if (node)
{
node->setMaterialFlag(EMF_LIGHTING, false);
node->setMD2Animation ( scene::EMAT_STAND );
}


smgr->addCameraSceneNode(0, vector3df(0,30,-40), vector3df(0,5,0));


while(device->run())
{

driver->beginScene(true, true, SColor(255,100,101,140));

smgr->drawAll();
guienv->drawAll();

driver->endScene();
}

device->drop();

return 0;
}

________________________________________________________
_______________________________________________________

Irrlicht Engine version 1.2
Microsoft Windows XP Professional Service Pack 2 <Build 2600>
COLLADA skipping section: library_animations
COLLADA skipping section: library_materials
COLLADA skipping section: library_effects
COLLADA skipping section: library_geometries
COLLADA skipping section: library_visual_scenes
COLLADA skipping section: instance_visual_scene
Loaded mesh: ../../media/ColladaTest.dae
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Yes, collada does work, but apparently not with Collada 1.4. Many major tags seem to have changed their names, the file structure has changed, etc. So try to export your meshes to Collada 1.3 or 1.2 or use a different format.
sgt_pinky
Posts: 149
Joined: Sat Oct 14, 2006 11:20 am
Location: Melbourne, Australia

Post by sgt_pinky »

@funxer: Just from hanging around here I bit I would recommend using the b3d format, because it seems to be the most actively maintained (by Luke).

Other than that, I have had a lot of success with the .x format as well.

Unless there is some reason that you need Collada of course.

Cheers,

Pinky
Intellectuals solve problems - geniuses prevent them. -- Einstein
#irrlicht on irc.freenode.net
Post Reply