bean bags

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
trying
Posts: 6
Joined: Fri Jul 08, 2011 10:39 pm

bean bags

Post by trying »

What would be the best way to simulate a bean bag using Bepu... specifically, if one where to throw a small bean bag against a board as in a game such as bean bag toss?
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: bean bags

Post by Norbo »

The easiest way would probably be to fake it and just make it a single solid object, like a convex hull. It won't deform because entities are rigid bodies.

Another option is to create a lattice of connections between entities which compose the collidable bulk of the object. In the ClothLattice demo in the BEPUphysicsDemos project (downloadable from the main source section on codeplex), it shows how to make a cloth-like simulation using a bunch of spheres and joints.

A fancier implementation of cloth that supports self collision can be found in the development version, the ClothTestDemo. The development version is downloadable here: http://bepuphysics.codeplex.com/SourceC ... evelopment

A beanbag has volume, so the above approaches need to be modified to form a 3d lattice instead of just 2d. The complexity of the lattice affects performance a lot, so sticking to the simplest acceptable level is advised- especially on the Xbox or WP7.

Technically, something like FEM deformable solids would produce a theoretically more efficient result. I have some internal prototypes of various kinds of deformation and stress simulation, but completing their development for general public use is lower priority relative to other improvements.
trying
Posts: 6
Joined: Fri Jul 08, 2011 10:39 pm

Re: bean bags

Post by trying »

Awesome info...thank you very much. I'll check out the demos and see what I come up with. Love the engine thus far and appreciate the work and effort being extended to us non physics people!
Post Reply