Look! Some falling boxes! Part Deux!

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
User avatar
Shtong
Gnoblar
Posts: 23
Joined: Sat Apr 23, 2005 1:46 pm
Location: Paris, France

Post by Shtong »

Wraithdrit wrote:My next big hurdle is to get Nogredex and the Terrain Scene Manager talking and to make a mesh object for Nogredex for the terrain.
I made this a few weeks ago... However, I didn't really made Nogredex and the Bsp Scene Manager communicate, as I didn't found a way to access the index and vertex data from outside the plugin. I created a new plugin instead, by copying BspSceneManager, with a function returning the entire mesh computed from inside. If you find a easier or more "nice-looking" way (I mean, with no need to make a separate bsp scene manager), tell me. :)

And if you want to have a look on my (completed) work, tell me too ^^. I imagined some ways to greatly optimise the terrain meshes, and the general physics performances, but I have no time to implement it for now. Maybe you could do that ?
Wraithdrit
Halfling
Posts: 64
Joined: Thu Jul 29, 2004 6:30 pm

Post by Wraithdrit »

There has to be a way besides redoing the plugin. If need be, the necessary parts could just be extracted from the plugin perhaps... dunno.

I've got a post on the help board about getting at some of the terrainscenemanager data. Maybe that will help.

Oh, and if we find no other way, I'm all for seeing yours. :)
User avatar
darkmaster
Halfling
Posts: 67
Joined: Wed Mar 09, 2005 7:04 pm
Location: Netherland

Post by darkmaster »

Hai, I have a question about the Novodex scale again. If I would like to make a 3D model in Max, then later I export that to Ogre .Mesh, how big should I make the scale in the Max i order to have the same size with
the Novodex world scale (say eveything is by default have SCALE 1 ). Sometimes happens to me that I made something, and it got displayed very big in OGRE, then I extract the mesh position to make trimesh out of it, but the size of the object in physics world is actually smaller.
I hope this is clear hehehehe :wink:


THanks,


Dark
Engineers aren't boring people, but they got excited over boring things and they make it fun.
www.freewebs.com/gpkfontys
psycho
Gnoblar
Posts: 7
Joined: Sun May 22, 2005 12:22 pm

Novodex - Ogre integration

Post by psycho »

Gfm has updated Nogredex to compile with the latest version of Ogre but most of the source is still legacy code from Rocketman's implementation (which had a few problems beyond not being updated for Ogre v1.0.1). For instance, AdvancedInputReader.* is no longer required. Also, his mesh import introduces additional memory leaks and doesn't correctly deal with shared vertices.

I've written my own Novodex -- Ogre application from scratch which you can get at http://web.engr.oregonstate.edu/~mehtane/simulator.zip. Respect to Rocketman for being the first.

Features:
No memory leaks. :)
Uses CEGUI.
Novodex debug rendering through the main frame listener.
Novodex exception checking.
Mesh import, including the option to create a Novodex PMap (more robust collision processing for smooth, highly tessellated meshes).
Multiple world scenes maintained concurrently (I only need two, but this is easily extensible).
MrBigs
Halfling
Posts: 45
Joined: Thu Mar 24, 2005 5:49 am
Location: Australia

Post by MrBigs »

Just had a quick peak at it before I turn in for the night, looks very clean. What version of Ogre has it been compiled for? latest v1.0.1?
psycho
Gnoblar
Posts: 7
Joined: Sun May 22, 2005 12:22 pm

Post by psycho »

The latest for both: Ogre v1.0.1 and Novodex v2.1.2.
Khalin
Gnoblar
Posts: 8
Joined: Sat Aug 14, 2004 4:58 pm

Post by Khalin »

Hey psycho I tried compiling your simulator on VC6 (converted vcproj file manually) and I get these errors:

Code: Select all

--------------------Configuration: simulator - Win32 Release--------------------
Compiling...
Debugger.cpp
E:\Programming SDKs\NovodeX SDK 2.1.2\SDKs\Foundation\include\NxFoundationSDK.h(114) : error C2955: 'allocator' : use of class template requires template argument list
        C:\STLPORT-4.6.1\STLPORT\stl/_alloc.h(371) : see declaration of 'allocator'
E:\Programming SDKs\NovodeX SDK 2.1.2\SDKs\Physics\include\NxPhysicsSDK.h(321) : error C2955: 'allocator' : use of class template requires template argument list
        C:\STLPORT-4.6.1\STLPORT\stl/_alloc.h(371) : see declaration of 'allocator'
SceneCreator.cpp
E:\Programming SDKs\NovodeX SDK 2.1.2\SDKs\Foundation\include\NxFoundationSDK.h(114) : error C2955: 'allocator' : use of class template requires template argument list
        C:\STLPORT-4.6.1\STLPORT\stl/_alloc.h(371) : see declaration of 'allocator'
E:\Programming SDKs\NovodeX SDK 2.1.2\SDKs\Physics\include\NxPhysicsSDK.h(321) : error C2955: 'allocator' : use of class template requires template argument list
        C:\STLPORT-4.6.1\STLPORT\stl/_alloc.h(371) : see declaration of 'allocator'
C:\Main\Tutorial Programming\Novodex Implementations\simulator\Simulator.h(54) : error C2639: compiler generated default constructor required by unnamed class
C:\Main\Tutorial Programming\Novodex Implementations\simulator\SimulatorFrameListener.h(27) : error C2258: illegal pure syntax, must be '= 0'
C:\Main\Tutorial Programming\Novodex Implementations\simulator\SimulatorFrameListener.h(27) : error C2252: 'moveSpeed' : pure specifier can only be specified for functions
C:\Main\Tutorial Programming\Novodex Implementations\simulator\SimulatorFrameListener.h(28) : error C2258: illegal pure syntax, must be '= 0'
C:\Main\Tutorial Programming\Novodex Implementations\simulator\SimulatorFrameListener.h(28) : error C2252: 'rotateSpeed' : pure specifier can only be specified for functions
Simulator.cpp
E:\Programming SDKs\NovodeX SDK 2.1.2\SDKs\Foundation\include\NxFoundationSDK.h(114) : error C2955: 'allocator' : use of class template requires template argument list
        C:\STLPORT-4.6.1\STLPORT\stl/_alloc.h(371) : see declaration of 'allocator'
E:\Programming SDKs\NovodeX SDK 2.1.2\SDKs\Physics\include\NxPhysicsSDK.h(321) : error C2955: 'allocator' : use of class template requires template argument list
        C:\STLPORT-4.6.1\STLPORT\stl/_alloc.h(371) : see declaration of 'allocator'
C:\Main\Tutorial Programming\Novodex Implementations\simulator\Simulator.h(54) : error C2639: compiler generated default constructor required by unnamed class
C:\Main\Tutorial Programming\Novodex Implementations\simulator\Simulator.cpp(15) : error C2955: 'pair' : use of class template requires template argument list
        C:\STLPORT-4.6.1\STLPORT\stl/_pair.h(57) : see declaration of 'pair'
C:\Main\Tutorial Programming\Novodex Implementations\simulator\Simulator.cpp(69) : error C2374: 's' : redefinition; multiple initialization
        C:\Main\Tutorial Programming\Novodex Implementations\simulator\Simulator.cpp(46) : see declaration of 's'
SimulatorApplication.cpp
E:\Programming SDKs\NovodeX SDK 2.1.2\SDKs\Foundation\include\NxFoundationSDK.h(114) : error C2955: 'allocator' : use of class template requires template argument list
        C:\STLPORT-4.6.1\STLPORT\stl/_alloc.h(371) : see declaration of 'allocator'
E:\Programming SDKs\NovodeX SDK 2.1.2\SDKs\Physics\include\NxPhysicsSDK.h(321) : error C2955: 'allocator' : use of class template requires template argument list
        C:\STLPORT-4.6.1\STLPORT\stl/_alloc.h(371) : see declaration of 'allocator'
C:\Main\Tutorial Programming\Novodex Implementations\simulator\Simulator.h(54) : error C2639: compiler generated default constructor required by unnamed class
C:\Main\Tutorial Programming\Novodex Implementations\simulator\SimulatorFrameListener.h(27) : error C2258: illegal pure syntax, must be '= 0'
C:\Main\Tutorial Programming\Novodex Implementations\simulator\SimulatorFrameListener.h(27) : error C2252: 'moveSpeed' : pure specifier can only be specified for functions
C:\Main\Tutorial Programming\Novodex Implementations\simulator\SimulatorFrameListener.h(28) : error C2258: illegal pure syntax, must be '= 0'
C:\Main\Tutorial Programming\Novodex Implementations\simulator\SimulatorFrameListener.h(28) : error C2252: 'rotateSpeed' : pure specifier can only be specified for functions
SimulatorFrameListener.cpp
E:\Programming SDKs\NovodeX SDK 2.1.2\SDKs\Foundation\include\NxFoundationSDK.h(114) : error C2955: 'allocator' : use of class template requires template argument list
        C:\STLPORT-4.6.1\STLPORT\stl/_alloc.h(371) : see declaration of 'allocator'
E:\Programming SDKs\NovodeX SDK 2.1.2\SDKs\Physics\include\NxPhysicsSDK.h(321) : error C2955: 'allocator' : use of class template requires template argument list
        C:\STLPORT-4.6.1\STLPORT\stl/_alloc.h(371) : see declaration of 'allocator'
C:\Main\Tutorial Programming\Novodex Implementations\simulator\Simulator.h(54) : error C2639: compiler generated default constructor required by unnamed class
C:\Main\Tutorial Programming\Novodex Implementations\simulator\SimulatorFrameListener.h(27) : error C2258: illegal pure syntax, must be '= 0'
C:\Main\Tutorial Programming\Novodex Implementations\simulator\SimulatorFrameListener.h(27) : error C2252: 'moveSpeed' : pure specifier can only be specified for functions
C:\Main\Tutorial Programming\Novodex Implementations\simulator\SimulatorFrameListener.h(28) : error C2258: illegal pure syntax, must be '= 0'
C:\Main\Tutorial Programming\Novodex Implementations\simulator\SimulatorFrameListener.h(28) : error C2252: 'rotateSpeed' : pure specifier can only be specified for functions
C:\Main\Tutorial Programming\Novodex Implementations\simulator\SimulatorFrameListener.cpp(70) : error C2039: 'moveSpeed' : is not a member of '__unnamed'
        C:\Main\Tutorial Programming\Novodex Implementations\simulator\SimulatorFrameListener.h(27) : see declaration of '__unnamed'
C:\Main\Tutorial Programming\Novodex Implementations\simulator\SimulatorFrameListener.cpp(72) : error C2039: 'rotateSpeed' : is not a member of '__unnamed'
        C:\Main\Tutorial Programming\Novodex Implementations\simulator\SimulatorFrameListener.h(27) : see declaration of '__unnamed'
Error executing cl.exe.
Creating browse info file...

Simulator.exe - 30 error(s), 0 warning(s)
appart from some typical vc 6 errors like multiple redefs, there seems to be a problem with my stlport (4.6.1), but up until now it hasnt shown any problems. Can you help out?

cheers

ps: gfms wrapper compiled no problem.
psycho
Gnoblar
Posts: 7
Joined: Sun May 22, 2005 12:22 pm

Post by psycho »

I've compiled successfully with Visual Studio 7.1. I can't really help with the STLPORT related errors. Besides that, it looks like your compiler is having a problem with defining static const data members in the nested struct inside of my SimulatorFrameListener class. To get around this, move the definitions to the constructor of the class. You might also need to define an empty default constructor for the struct to placate your compiler.
MrBigs
Halfling
Posts: 45
Joined: Thu Mar 24, 2005 5:49 am
Location: Australia

Phsyco - can you think of a reason why its doing this..

Post by MrBigs »

As a test I'm trying to pass in my own model and have it create the pMap for collisions. However the collission mesh seems to be totally wack! OR its not liking my .mesh for some reason...

See what it looks like...
Image

This is a render of the car im using in that scene. You can't really see it though...
Image

Because that collision mesh is all totally stuffed in that image above it just makes the hotrod shoot up in the air as soon as it touches the ground plane - funny but not whats is supposed to happen.

Any ideas?
CapBBeard
Halfling
Posts: 42
Joined: Wed Jun 08, 2005 2:23 pm
Location: New Zealand
Contact:

Post by CapBBeard »

I had a similar problem using simulator when loading the ninja mesh from the ogre demos. I didn't try any other mesh files, I was just having a look at simulator at the time. The original nogredex doesn't seem to have this problem. I didn't look into it much further because I'm using convex mesh shapes for my novodex collision detection as pmap doesn't appear to work with heightmaps [the object just falls through.. the only real information on this I could find was in the novodex physics SDK documentation, where there was a table showing compatible collision types].
MrBigs
Halfling
Posts: 45
Joined: Thu Mar 24, 2005 5:49 am
Location: Australia

Post by MrBigs »

I tried the Nogredex build before this one and has some mixed results... I did however get that hotrod model into it. However it was buggy in some other areas and I'd thought I'd give Psycho's version a try.. Espacially since it was so nice a clean...

It seems that passing my mesh through to generate the trimesh for the objects is buggy at best. So i think I will have to just use the primitive shapes instead.

My only problem is I wanted to use dotsceneoctree for loading in my levels and I was hoping I could just pass the .mesh file from the dotscene loader into the Trimesh generator and everything would be sweet. (ie my hotrod would collide with the level) - IS THIS POSSIBLE?

I basically have a race track around a city level and I have my hover cars which will race around that track. However the physics is holding me back atm.

Now I'm fairly new to OGRE and novodex so please, If I'm going about this completely the wrong way then let me know?
psycho
Gnoblar
Posts: 7
Joined: Sun May 22, 2005 12:22 pm

Post by psycho »

CapBBeard, I couldn't replicate your problems with loading Ogre's ninja mesh into simulator (I tried it both with & without pmap generation). The only possible difference is that I'm using Ogre's latest mesh file format?

MrBigs, Novodex has some restrictions concerning arbitrary mesh creation like correctly defining the face normals, avoiding t-joints and non-manifold edges, etc. I would like to replicate your setup if only I could get my grimy paws on your hotrod. What modeler did you create it in and how do you export it to Ogre's mesh format?
CapBBeard
Halfling
Posts: 42
Joined: Wed Jun 08, 2005 2:23 pm
Location: New Zealand
Contact:

Post by CapBBeard »

Hmm, that may be a possibility although I'm not too sure at the moment. It may be something to do with novodex. I'm running on 2.2 so I had to modify the code a little to cook the trimesh instead of just passing to the create trimesh function, although I'm pretty sure I didn't mess with anything else. The original simulator is using a pre 2.2 version, so maybe the problem could lie there?
psycho
Gnoblar
Posts: 7
Joined: Sun May 22, 2005 12:22 pm

Post by psycho »

I've got a version that is updated to work with Novodex 2.2 and I just tested it with success. To authenticate:
Image
MrBigs
Halfling
Posts: 45
Joined: Thu Mar 24, 2005 5:49 am
Location: Australia

Post by MrBigs »

@phsyco - I just sent you a PM.

This model was originally made in Maya 6.5. I'm fairly sure it was exported from there with the maya exporter.

What program do u use to model in and what exporter do you use? Have you done any experiments with dotsceneoctree and your novodex wrapper?

I could bring the model into 3dsmax and export it from there using octopus.

Is novodex v2.2 suppose to handle this arbitrary mesh creation better?
psycho
Gnoblar
Posts: 7
Joined: Sun May 22, 2005 12:22 pm

Post by psycho »

I've used Maya 5 with Ogre's Maya exporter tool. However, I've replaced OgreXMLConvertor.exe with the latest available.

Nope, I haven't played with DotSceneOctree at all.

I do have a version of simulator that works with Novodex 2.2 (but it's more specific to a project I've been working on), but as far as the rules for mesh creation goes there're no changes. And pmaps are best for highly tesselated smooth meshes.
MrBigs
Halfling
Posts: 45
Joined: Thu Mar 24, 2005 5:49 am
Location: Australia

Success!

Post by MrBigs »

After updating my OgreXMLConveter and getting the latest Maya 6.5 exporter the Hotrod came into the "Simulator" nicely... There are some pics below.

I noticed the the physics simulation seemed to not work properlly when i had maya open in the background(no surprise there), it was like the slow fps would make it drop simulations or something, because the wood blocks would collide with the hotrod but then gradually fall through.. it was wierd, I don't have a screen shot of it tho.. anyway, here ya go..

Image
Image
Image
User avatar
betajaen
OGRE Moderator
OGRE Moderator
Posts: 3447
Joined: Mon Jul 18, 2005 4:15 pm
Location: Wales, UK
x 58
Contact:

Post by betajaen »

As far as I understand it and tried TriangleMeshes can't collide with other Trianglemeshes.

So are those P-Maps?
MrBigs
Halfling
Posts: 45
Joined: Thu Mar 24, 2005 5:49 am
Location: Australia

Post by MrBigs »

Yes- yes they are, i just checked the code...

Code: Select all

simulator->addMeshObject("HotRodv4.mesh", true, "", MATERIAL_WOOD, 2* Vector3::UNIT_SCALE, Vector3(30, 20, 30));
the 2nd attribute there defines whether or not a pmap should be created. :)
User avatar
betajaen
OGRE Moderator
OGRE Moderator
Posts: 3447
Joined: Mon Jul 18, 2005 4:15 pm
Location: Wales, UK
x 58
Contact:

Post by betajaen »

Ahh thats good then. I thought I'd made a huge mistake reading the documentation and implementing my code.
CapBBeard
Halfling
Posts: 42
Joined: Wed Jun 08, 2005 2:23 pm
Location: New Zealand
Contact:

Post by CapBBeard »

Trimesh/pmap with heightmaps doesn't work though right? I'm still trying to get simulator to give me a good mesh, I'll report back when I find anything. I'm now getting it to make a convex hull instead of trimesh, but it's giving the same result [but I'm going after a convex hull, so I'll try to fix it that way]
User avatar
betajaen
OGRE Moderator
OGRE Moderator
Posts: 3447
Joined: Mon Jul 18, 2005 4:15 pm
Location: Wales, UK
x 58
Contact:

Post by betajaen »

From the documentation it says:

Cubes/Spheres/capsules can collide with all
Convex shapes with all
Heightfields with cubes/shperes/capsules and convexs
Pmaps with cubes/spheres/capsules , convexs and other pmaps
Other meshes cubes/spheres/capsules and convexs.

It seems pmaps are the best route however they must be closed but they can't collide with other meshes, so they'd be best for boxey/bsp type maps.


I suppose the other route would be to build multiple shape actors from primatives.
Last edited by betajaen on Fri Aug 05, 2005 3:51 pm, edited 1 time in total.
CapBBeard
Halfling
Posts: 42
Joined: Wed Jun 08, 2005 2:23 pm
Location: New Zealand
Contact:

Post by CapBBeard »

Convex/convex works [wahoo :P] and pmap/pmap apparently works [just looking in the doc now, there's a table in the PhysicsSDK.pdf manual if you're wondering where I'm reading this], but I'm not sure. It's somewhat annoying pmap doesn't work with heightmaps though, however convex do, which is the main reason I want to use them. I figure if I make several submeshes then put convex hulls around them, I can hopefully get decent collision. I'm not having much luck at the moment though, but that's just my lack of skill :P
psycho
Gnoblar
Posts: 7
Joined: Sun May 22, 2005 12:22 pm

Post by psycho »

Although the documentation says that pmap-pmap collision is robust, it really is only for smooth, highly tesselated meshes; the wood pieces in Simulator are not. In fact, for such meshes, I've had great success with composing them as a bunch of convex submeshes (Novodex has great convex-convex collision detection without using pmaps). And in case you were wondering, here's my Simulator function (for Novodex 2.2 & Ogre 1.0.2):

Code: Select all

// The submeshes comprising the mesh are convex -> good collision detection in Novodex (without pmaps)
SimulatorObject Simulator::addConvexSubMeshObject (const String& meshName, const String& material, const MaterialIndex matIndex, const Vector3& position, Matrix3 orientation, const Vector3& scale)
{	MeshPtr mesh = MeshManager::getSingleton().getByName(meshName);
	if (mesh.isNull())   // Not yet loaded
		mesh = MeshManager::getSingleton().load(meshName, ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);

	NxConvexShapeDesc* meshShapes = new NxConvexShapeDesc[mesh->getNumSubMeshes()];
	NxActorDesc actorDesc;
	size_t originalSize = 0;
	size_t processedSize = 0;
	size_t indicesSize = 0;

	for (int s = 0; s < mesh->getNumSubMeshes(); s++)
	{	SubMesh* submesh = mesh->getSubMesh(s);

		vector<NxVec3> vertices;
		vector<NxU32> indices;

		// Load vertex data from the submesh
		VertexData* vertexData;
		if (submesh->useSharedVertices)
			vertexData = mesh->sharedVertexData;
		else
			vertexData = submesh->vertexData;

		HardwareVertexBufferSharedPtr vertexBuffer = vertexData->vertexBufferBinding->getBuffer(vertexData->vertexDeclaration->findElementBySemantic(VES_POSITION)->getSource());
		Real* vertex = (Real*)vertexBuffer->lock(HardwareBuffer::HBL_READ_ONLY);
		for (size_t v = 0; v < vertexData->vertexCount; v++, vertex += 3)
			vertices.push_back(NxVec3(*vertex * scale.x, *(vertex + 1) * scale.y, *(vertex + 2) * scale.z));
		vertexBuffer->unlock();

		// Load index data from the submesh
		HardwareIndexBufferSharedPtr indexBuffer = submesh->indexData->indexBuffer;
		switch (indexBuffer->getType())
		{	case HardwareIndexBuffer::IT_16BIT:
			{	unsigned short* index = (unsigned short*)indexBuffer->lock(Ogre::HardwareBuffer::HBL_READ_ONLY);
				for(size_t i = 0; i < submesh->indexData->indexCount; i++, index++)
					indices.push_back(*index);
				break;
			}

			case HardwareIndexBuffer::IT_32BIT:
			{	unsigned long* index = (unsigned long*)indexBuffer->lock(Ogre::HardwareBuffer::HBL_READ_ONLY);
				for (size_t i = 0; i < submesh->indexData->indexCount; i++, index++)
					indices.push_back(*index);
				break;
			}

		}
		indexBuffer->unlock();

		originalSize += vertices.size();
		indicesSize += indices.size();

		// Removing duplicate vertices and any referencing indices
		for (unsigned u = 0; u < vertices.size() - 1; u++)
			for (unsigned v = u + 1; v < vertices.size();)
				if (vertices[v] == vertices[u])
				{	for (unsigned i = 0; i < indices.size(); i++)
					{	if (indices[i] == v)
							indices[i] = u;
						else if (indices[i] > v)
							indices[i]--;
					}
					vertices.erase(vertices.begin() + v);
				}
				else
					v++;
		processedSize += vertices.size();

		NxVec3* points = new NxVec3[vertices.size()];
		copy(vertices.begin(), vertices.end(), points);
		NxU32* triangles = new NxU32[indices.size()];
		copy(indices.begin(), indices.end(), triangles);

		NxConvexMeshDesc convexMeshDesc;
		convexMeshDesc.numVertices = vertices.size();
		convexMeshDesc.points = points;
		convexMeshDesc.pointStrideBytes = sizeof(NxVec3);
		convexMeshDesc.numTriangles = indices.size() / 3;
		convexMeshDesc.triangles = triangles;
		convexMeshDesc.triangleStrideBytes = 3 * sizeof(NxU32);
		convexMeshDesc.flags = 0;

		MemoryWriteBuffer meshBuffer;
		NxInitCooking();
		bool status = NxCookConvexMesh(convexMeshDesc, meshBuffer);
		meshShapes[s].meshData = nxPhysics->createConvexMesh(MemoryReadBuffer(meshBuffer.data));
		meshShapes[s].materialIndex = matIndex;
		actorDesc.shapes.pushBack(&meshShapes[s]);

		delete [] points;
		delete [] triangles;
	}

	LogManager::getSingleton().logMessage(meshName + ": " + StringConverter::toString(originalSize) + " original vertices, "
													+ StringConverter::toString(processedSize) + " unique vertices, "
																	+ StringConverter::toString(indicesSize / 3) + " triangles.");

	NxBodyDesc bodyDesc;
	actorDesc.body = &bodyDesc;
	actorDesc.globalPose.t = convertToNovodex(position);
	actorDesc.globalPose.M = convertToNovodex(orientation);
	actorDesc.density = density[matIndex];
	SimulatorObject object(nxScene->createActor(actorDesc), ogSceneNode->createChildSceneNode());
	object.node->setPosition(position);
	object.node->setOrientation(Quaternion(orientation));

	Entity* meshEntity = ogSceneMgr->createEntity(String("mesh_object") + StringConverter::toString(++objectCount), meshName);
	if (material != "")
		meshEntity->setMaterialName(material);
	meshEntity->setNormaliseNormals(true);
	object.node->attachObject(meshEntity);
	object.node->setScale(scale);

	delete [] meshShapes;

	return object;
}
Post Reply