Thursday, August 26, 2010

Bullet SoC - Experiments, Fixes, and More to Come...

So, the official GSoC 2010 period is over now, but that does not mean all coding activity on this project is stopped for good.

Leading on from where I left off last time, I've been conducting some experiments and tweaks with the "Wall" template, implementing some ideas for this that I didn't have time yet to do and investigating how to improve the stability of this asset in actual sims.

Fixes and Improvements
Fix 1: More realistic dimensions
The original bricks were being made 3x1x1 meters, but only weighing 1 kg for all that volume. Not really an accurate representation of actual bricks, though maybe satisfactory for foam-parties.

Improvement 1: Alternating rows are "offset" (half a brick width) and shorter (by 1 brick) to compensate

 New "offsetted" bricks arrangement

I tried this arrangement in the hope that by stacking them like this, there would be a lesser tendency for the bricks to part down stacks. After all, there must be a reason that nobody stacks bricks in even rows in real life, right? ;) Of course, the old version is still available, in case somebody really wants that case instead for whatever bizzare reasons (this may include making a single-file column).

However, this still isn't terribly stable enough (as we'll see later).

But, as a result of doing this, and fixing some more alignment issues...

Fix 2: Initial or "source" brick is no longer kept in place as part of the wall.
It turns out that it was overlapping with one of the bricks in the wall. This was the cause of the "jump" in the first column in all the sims coming out of the original situation.

In the screenshot above, you can see that it's currently placed off to the side, for further editing. However, I'll probably add code to delete this after building the wall.

As such, it's no longer fit to be the "owner" of all the other bricks (for facilitating easy moving of the whole wall), so an empty is now added for this purpose.

So, with these new tweaks, it's time to test these new setups.

After initially being disappointed by the stability of this new brick arrangement (it still topples over eventually, though it manages to hold for about 1 second at first), I decided to see if this was the case if we gave those walls a bit more "support". Which leads to...

"Box" configuration of walls

This arrangement consists of 4 "walls" which interlock at the corners. Interestingly, this collapses even faster, though it does manage to look quite funky in the process (barrowing and buckling).

As some posters suggested in comments to the previous post, it looks like it's time to implement those "on collision" triggering options! (Now if only I could figure out how to best achieve this with the Bullet apis...)

When can we play with this?
I've still got a few more code tweaks to make before releasing this new variation for people to play with. I'll probably do that tomorrow morning, at which point I'll also release some of the test files made from this.

So... stay tuned! :)


  1. Keep up all the good work! Thanks Aligorith.


  2. Ha! It´s really great to hear that this is not over! Is so good to hear about the triggering options! I´m testing the Cinema 4D MoDynamic system and I found great ideas but I don´t know if they are possible.
    And your work with templates is becoming great! That four wall setting is really awesome useful! Ah, and the empty to move the entire wall is very handy!