Softbody Stack of Cubes (physics)

Hi all
I was looking into creating an animation of a wall out of blocks which then could be knocked over - a bit naff I know but I am experimenting!..

I’ve seen this on other peoples animations on youtube etc and I could well be wrong but I thought you could do this using softbody?

I created a plane for the floor - then set up collision
Then I created a cube that is softbody and has collision as well
Then my plan was to duplicate the cube to make a wall of these cubes
However try as I might the cubes wont sit still on each other - when baked they vibrate against each other and look very odd
I’ve tried every combination of softbody and collision settings I can think of!
Any idea what I’m doing wrong?
I think one problem is the cubes are not totally ridged!

In the blender game engine the physics works much better and you can create stacks of blocks much more easily - is there any way to use the game engine physics in an animation?

Attachments

blocks.blend (156 KB)

Game>“Record Game Physics to IPO”

Also set the cubes’ “bounds” to “box”. ( in logic settings [f4] ) . It seems to me they are set to sphere by default.

Here’s a sample of using the game engine to simulate a wall of bricks.

AVI (3.0M)
Zipped blend file (2.3M)

Nice setup Koryo.
Just curious about the two scripts I see on the right side of the screen: I’m not a programmer but I’d like to understand a bit more about how they work.

Since the physics engine doesn’t damp nicely the below scripts control the activation of the dynamics simulation

So, may I re-use those scripts in other GE simulation getting a better damp result?

The two scripts just cycle through all the objects whose names start with “Cube” and disables and enables the dynamics simulations. You can change the name of the objects by editing “ObCube” to “Ob<your object name prefix here>”.

The game logic is on the Sphere. The init.py script is triggered by an Always sensor in pulse mode, set to repeat sometime after the simulation’s done, and the bricks.py is tiggered by a Near sensor between the sphere and one of the bricks.

There may be someway to get the solver in the physics engine to converge nicely, but I don’t know how, so scripts like this are necessary for now.

So, may I re-use those scripts in other GE simulation getting a better damp result?
Certainly, although there’s no warrenty for their suitability for any purpose. I am also not responsible for any damages or losses that you may incur by using the scripts either directly or indirectly :stuck_out_tongue: