Mousetrap ball physics

Hi there

I’m modelling a realtime physics simulation of a Mousetrap Board game.

http://img.photobucket.com/albums/v240/f1969ob/mouse_trap_0.jpg

Using the 2.40 test builds and Bullit physics how would I get a ball bearing to drop faster without it screwing up the collision detection. In my current scene the ball is painfully slow (the scene still has a high FPS). I can get the ball to go faster if I angle the surfaces upon which the ball rolls. But I’m not too keen on that approach as it is distorting the accuracy of the models. Here’s a link to the scene if anyone fancies a look at it?

http://www.reupload.com/uploads/mouseTrap_26_test.blend

thanks in advance

As the bearing falls down the rickety steps? Try increasing the restitution of the steps, as they’re actually quite elastic.

i’m sorry i have no idea how to solve you’re problem but i have to say that i realy like it it looks pretty nice.

niels

Adding a material to the ball adds quite a bit of speed but its still pretty slow.

What you can do is turn off the collision for all the faces, and add invisible platforms for the ball to roll on just the way you want it.

thank you for your kind replies and suggestions

Arr Matey!! What you can do is turn off the collision for all the faces, and add invisible platforms for the ball to roll on just the way you want it.

I plan to do this eventually and I have turned off collision for all the faces that should not come in contact with the ball. Currently my computer is powerful enough to run the simulation at > 60 fps. I don’t think the scene is cpu/physics limited (but I am willing to be corrected)

xarton As the bearing falls down the rickety steps? Try increasing the restitution of the steps, as they’re actually quite elastic.

I have played around with the material properties and I cannot get a serious speedup.

I think it might be time to ask Erwin for some suggestions

back soon :smiley:

When you’re in the logic buttons, on the actuators, go to motion and force, put the force higher.

I like the ‘invisible path’ idea, at least in certain places. If the movement is slow or jerky at particular places on the course, then the machine may indeed be CPU-limited in those areas.

It is not a performance problem at all. In the end, the slope really doesn’t go down in the corner, it actually goes slightly up…

I fixed a couple of things in Bullet-Blender integration. Hooked up the ‘formfactor’ (an inertia tweak), friction, restitution, and some scaling related things.

However, the rounded ramp really doesn’t have a proper slope in the corner. Please try to fix the artwork, it should roll much better. Try to play with the ‘formfactor’ Also, you really don’t need to switch off collision detection on all the other faces. It is not a performance problem.

Check out the new Blender-Bullet Windows build here:
http://www.continuousphysics.com/ftp/pub/test/index.php?dir=blender/&file=blender241.zip

It also has ‘add object’ for Bullet and a few other fixes.

Thanks and happy new year!
Erwin

Thanks Erwin

Using your new build the ball moves much faster now. I made all the rolling surfaces point down instead of up and I reduced the form factor of the ball.

http://img.photobucket.com/albums/v240/f1969ob/mousetrap_30.jpg

I have also added a constraint to the see saw which gets hit by the new larger ball. The code for the constraint is taken from your p2p demo. I’m ignorant of the correct terminology but this appears to be a point constraint (I think Maya calls them nails?). Obviously for a see-saw I need some kind of hinge constraint. Has this been implemented in Bullet yet?

If anyone is interested here is the latest blend file. Use the left and right cursor keys to rotate the scene.

http://www.reupload.com/uploads/mouseTrap_30_test.blend

Haven’t looked at the .blend but can’t you just give the see-saw an Ipo? Or does that not work?

Yes I could use an IPO but I’m trying to model the scene as a realtime simulation using the new Bullet engine. Faking it with Ipos will be a last resort!

Well I found some time to revisit my Mousetrap project

It’s almost done but I’m looking for some advice - shall I try to implement parts of the course in physics or should I fake it with ipo animations?

question 1 - how should I implement the long bat which hits the suspended boot?

question 2 - how should I implement the cage which falls down at the end of the course.

You can get the latest testing version of Blender with Bullet here
http://www.continuousphysics.com/Bullet/phpBB2/viewforum.php?f=11

And finally here is my latest Mousetrap scene
http://www.reupload.com/uploads/mouseTrap_60_test.blend

thanks in advance you lovely lovely people

In your newest version everything “breaks” It is as if all of the physics were changed and it all just goes flying.

are you using a recent test build of Blender?

You can get the latest testing version of Blender with Bullet here
http://www.continuousphysics.com/Bul…forum.php?f=11

cheers

Hello again

Finally all the components now react with one another.

http://www.reupload.com/uploads/mouseTrap_83_test.blend

Don’t forget to use Erwin’s test builds
http://www.continuousphysics.com/Bullet/phpBB2/viewforum.php?f=11

It’s quite addictive to watch.

I know it has a few problems. Hopefully Erwin can give me some suggestions and then I’ll try to capture a movie of it.

let me know what you think…

If i disable ‘enable all frames’ and ‘show physics rate’ it works great.

LetterRip

very fun it worked out of the box here at 83 fps

Updated scene so it will work with Erwin’s latest test build and turned off ‘Enable all frames’
http://www.continuousphysics.com/ftp/pub/test/index.php?dir=blender/&file=blender-2.43-preview11c-win32.zip

Captured movie using Xvidcap in Linux (was surprising easy and cheap!)
http://www.box.net/public/dp48lledgy (3.5 meg)

Latest version of scene can be found here
http://www.box.net/public/jc29f7p2iq (866 k)

cheers

Youtube mouse trap movie link: