Help: Ball floating ontop of and Maze

User avatar
Garibalde
Posts: 44
Joined: Fri Dec 18, 2009 6:06 pm
Location: Montreal

Help: Ball floating ontop of and Maze

Post by Garibalde »

I created a Maze in 3DsMax and exported it as a Ogre Mesh. I ahve a Sphere also created with 3DsMax.
I load both objects with bullet. However the ball seems to roll over the top of the Maze. It seems that buttle thinks it is an closed Cuboid object. When i select debug drawer I see strange trianlges that should not exist in the mesh.

Are there an special requirements with creating mesh object that i am missing?

I have included pictures below:
The Maze with the ball floating on the top.
6-5-2010 2-25-17 AM.png
This figure shows the maze with debug drawer enabled. The two holes can be seen with triangles
also other triangles are also visible.
6-5-2010 2-37-21 AM.png
Thanks
Garibalde
You do not have the required permissions to view the files attached to this post.
User avatar
Garibalde
Posts: 44
Joined: Fri Dec 18, 2009 6:06 pm
Location: Montreal

Re: Help: Ball floating ontop of and Maze

Post by Garibalde »

I think the problem is more fundamental. I tried to make a simple box with a hole through it.
I tried to plave the box on to a small peg.. the peg cannot pass throught the hole. With Debug Drawer it seems that the hole in the box has a few criss-crosing triangles which are causing an obstruction during collision.

I am not sure how to generate acceptable objects where this problem does not occur is there a how-to for creating model in 3DsMax or any other software.

Thanks very much for an help.

Garibalde
User avatar
Garibalde
Posts: 44
Joined: Fri Dec 18, 2009 6:06 pm
Location: Montreal

Re: Help: Ball floating ontop of and Maze

Post by Garibalde »

Hmm no replies,

Has anyone been abble to simulate a case when you are palcing objects into another object such as a bunch of balls into a bucket for example? I am trying to do something
as simple as this and i cant seem to get the balls into the bucket.. it seems the open end
of the bucket has a force field on it.. the balls roll of the top?
dangerdaveCS
Posts: 14
Joined: Mon Jun 07, 2010 5:37 am

Re: Help: Ball floating ontop of and Maze

Post by dangerdaveCS »

How are you loading your mesh into Bullet? Assuming you got everything else right, it looks to me like the parsing of the 3ds mesh isn't working. When I've had wierd triangles appear where they shouldn't it's been because I was looping across vertices/indices using the wrong step size.

In my app I create triangle meshes dynamically, so I don't load in any data.

But once I have my list of triangles as an array of indices (int) and array of vertices (float) I create a btTriangleIndexVertexArray, then pass that to create a btBvhTriangleMeshShape. Then create a btRigidBody using the btBvhTriangleMeshShape.

I'm pretty new to Bullet myself, so I'm afraid I don't have much inside knowledge to offer, but considering how strangely quiet this board is I thought I would try to weigh in.
Dominik
Posts: 32
Joined: Fri Dec 19, 2008 2:51 pm

Re: Help: Ball floating ontop of and Maze

Post by Dominik »

Is it possible that your mesh contains quadrilateral faces? If you interprete a quad-face array as triangles, weird stuff like on your screenshot can happen.