Can't get a convex mesh to cook

Backov

01-06-2007 22:56:42

I'm trying to get NxGenerateConvexMeshFromOgreMesh to work.

The first mesh I fed it was a cube with no duplicate vertices (8 verts only).. It failed to cook.

The second mesh I fed it was a "sphere" with 22 verts and 40 tris - it also failed to cook (no duplicate verts again).

So, what's going on? Is there a bug in this function?

betajaen

01-06-2007 23:06:15

Shouldn't be.

Fancy posting them up, so I can have a fiddle?

Backov

01-06-2007 23:34:30

Sure thing:

http://tamedtornado.com/physicsshapes.zip

betajaen

01-06-2007 23:47:06

Sadly I get the same crash as well, but before you start jumping up and down, I have a back story.

Once I replied to your post, I went out and added a new feature in the Ogre to Cloth Mesh function; removing duplicate vertices. Which it works, it reduces the 24 vertex convex1.mesh to 8. Same with cube.1m.mesh

I tried it with racecar.mesh as a laugh, and I got an error. A few minutes after that you posted your meshes, and I get the same error. The vertices being read are "NULL" and in my case; the duplicate vertice code removes all but one of the vertices (as they are all the same), so it's a double crash!

I've tracked down the error to the vertex reading bit, I suspect it's either to do with it having one or more submeshes, or it's reading from a submesh, the phase of the moon or combinations thereof.

I'll fix it though.

Backov

01-06-2007 23:58:34

Well I'm glad you found it anyway.

On a related note - you said in a recent post you were done encapsulating materials?