Page 1 of 1

Ogre .mesh?

Posted: Wed Jan 28, 2009 5:01 pm
by interceptor
I have a small problem. Trying to load an ogre .mesh file.. The console says "Loaded media/flat.mesh", but nothing appears? I tryed with an identical 3ds file and that works fine..

Code: Select all

IAnimatedMesh* mesh = irrsmgr->getMesh("media/flat.mesh");
	if(!mesh)
		printf("Mesh Error..\n");
	ISceneNode* node = irrsmgr->addMeshSceneNode(mesh);
	node->setMaterialFlag(EMF_LIGHTING, false);
	node->setMaterialTexture(0, irrdriver->getTexture("debug1m.png"));
Any advice?

Files:
./media/flat.mesh
./media/flat.material
./media/debug1m.png
./debug1m.png

Posted: Wed Jan 28, 2009 6:23 pm
by hybrid
Many options from .mesh file are not yet supported. Seems like the visible stuff was skipped in that file.

Posted: Sat Jan 31, 2009 2:08 pm
by interceptor
Well, it was just a flat plane. :shock:

Update: It now gives an error at least! "Could not open blah blah..."

Edit: Fixed. used a cube instead of a plane. But i hope it loads other meshes ok..

Posted: Sat Jan 31, 2009 3:14 pm
by hybrid
If you don't succeed with loading files, it's always a good idea to make them available for download. It's often easily possible to fix the loaders to support more things of the files.
BTW: I've added some more material options in latest SVN/trunk, such as texture filtering and detail enhancements.

Posted: Sat Jan 31, 2009 6:08 pm
by interceptor
Ok great. Turns out it was an exporter error i think. All mesh files are loading fine now, Thanks!!