Exporting Multiple Blender Meshes

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
rconnaug
Gnoblar
Posts: 5
Joined: Mon Dec 06, 2004 9:55 pm

Exporting Multiple Blender Meshes

Post by rconnaug »

Hey all...

So I've created a model of a bee in blender to be exported into Ogre. Because different parts of the bee need different materials, I left the head, middle section and legs of the bee as one mesh, the striped tail as another mesh, and the pair of wings as a third mesh (I'm new to blender, so this may be poor form...). I rigged the wing mesh with an armature and saved an animation of the wings flapping, and all looked well. Then, I exported the meshes, one at a time, without any errors. Then, to unify the meshes into one ogre mesh, I merged the .material files, and merged the .mesh.xml files by moving all of the <submesh>....</submesh> blocks into one main Bee.mesh.xml file. I also was careful to transfer everything in the wings submesh, etc regarding the vertex assignments to the bones. Next I ran the skeleton and mesh xml's through the XML Converter, and again had no problem

At runtime, my simulation attempted to load the bee mesh, and the knot.mesh (included with ogre). and produced this:

Code: Select all

Mesh: Loading Bee.mesh.
Skeleton: Loading bee_skeleton.skeleton
Mesh: Loading knot.mesh.
etc etc etc
So I assume that it loaded the mesh ok (maybe not). When the meshes were actually supposed to be displayed on the screen, however, it crashed, with this error message:

Code: Select all

OgreMesh.cpp:1481: static void Ogre::Mesh::softwareVertexBlend(const Ogre::VertexData*, const Ogre::VertexData*, const Ogre::Matrix4*, bool): Assertion `srcElemPos && srcElemBlendIndices && srcElemBlendWeights && "You must supply at least positions, blend indices and blend weights"' failed.

Can anyone point me in the right direction as to what this is referring to?
~ryan~
biteme
Halfling
Posts: 70
Joined: Fri Mar 11, 2005 12:49 am

Post by biteme »

you can join all the meshes (by meshes I assume you mean objects) in object mode by the "join object" command. You also have to parent your armature to the new joined object to have the animations exported with the mesh..

Then export that will give you one orge xml file and one material file all merged together.

I have no idea if this will solve your crash (i'm not a coder) but I am thinking it might.
Post Reply