Bug: Can not load Ogre .mesh if the model has submesh.

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
fadeawaygod
Posts: 7
Joined: Thu Apr 22, 2010 6:37 am

Bug: Can not load Ogre .mesh if the model has submesh.

Post by fadeawaygod »

you can't load the mesh When it has submesh and has skeleton animations .
COgreMeshFileLoader.cpp

Code: Select all

	OgreBoneAssignment& ba = Meshes[i].SubMeshes[j].BoneAssignments[k];
					if( ba.BoneID < m->getAllJoints().size() )
					{
						ISkinnedMesh::SWeight* w = m->addWeight(m->getAllJoints()[ba.BoneID]);
when error appear, ba.BoneID >= usednum in .irrArray.h

and the .mesh show normal in ogremax viwer.
fadeawaygod
Posts: 7
Joined: Thu Apr 22, 2010 6:37 am

Post by fadeawaygod »

Add on:
it seems that some bone is not load in normal.

Code: Select all

ISkinnedMesh::SWeight* w = m->addWeight(m->getAllJoints()[ba.BoneID]);
ba.BoneID >= Skeleton.Bones max used num.

So where can I upload .mesh and .skeleton ?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You could try at the bug tracker http://sourceforge.net/tracker/?group_i ... tid=540676
If that's not working (due to size) you can use any free file hoster.
fadeawaygod
Posts: 7
Joined: Thu Apr 22, 2010 6:37 am

Post by fadeawaygod »

I have tried at the bug tracker,but can not post the bug .
So mybe you can give me a email,
the size of my package is only 254k.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

My SF mail address should be visible on the authors page or on my SF profile. Otherwise try mediafire or any other open hoster.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Ok, got it from Niko :roll: Anyway, the mesh references joint number 29, where only 0-28 exist. I can add a check for this case, which allows to load the mesh. But it's still corrupted then. So unless there's something really weird in the Ogre file format, I'd say that your mesh is broken. Better export into a different mesh format.

BTW: Does anyone know a good Ogre mesh viewer? I only found an outdated one, and one that does not read very much of the files.
fadeawaygod
Posts: 7
Joined: Thu Apr 22, 2010 6:37 am

Post by fadeawaygod »

ogre max viewer. but I don't have it's source code.
I will check it by using ogre to see if it can work normal.
fadeawaygod
Posts: 7
Joined: Thu Apr 22, 2010 6:37 am

Post by fadeawaygod »

I check this problem again.
It's also wrong in ogremax viewer.
the wrong submesh don't display int ogre viewer.
and I didn't watched carefully before. So I made a mistake.
Now I use oFusion to export the mesh.
it generate six .mesh files for every single modle in max (six body parts ) and six .skeleton files.
it's some odd @@. but it works. both in irrlicht and ogre.
I will try other exporter to see if I can get a single .mesh and a single skeleton.
Post Reply