Monday, August 9, 2010

Bullet SoC - Squashing those bugz

I've just been doing a bit of a bug-squash sprint tonight, dealing to a few reported issues which have lingered in this branch for a while. If you've been finding any bugz in particular, please test with a recent version, before reporting on here.

In short, I've tackled:
  • Duplicating objects not duplicating Rigid Body settings
  • Deleting objects involved in Rigid Body simulations crashing
  • Objects slowly 'popping' back to their original pre-sim locations. Well, I haven't totally fixed the underlying cause, but I've exposed settings for controlling the velocity thresholds below which the object is considered by Bullet as being "moving too slowly to worry about" and stops coming up with values for it. When these are set to the Bullet defaults (0.8 for Linear, and 1.0 for Angular), the pesky problems reappear in most sims. So for now, I've left those to just be 0 and 0 since that seems to work best for the situations I've seen.
  • A bug where a "rotated gravity" field was being applied to all simulations as a result of the Force Fields commit. I've now corrected the problem causing it, though this now means that the demo posted earlier doesn't quite work in the same ways anymore (though still similarly). In particular, there was one cube that zoomed off on a diagonal path which can be attributed to this bug.

Also, been looking a bit into whether various tools are working correctly. For instance, I think I've finally verified that one of my first tests for Effectors was actually not such a great test case. The modified version can be found here.

Wind Effector Demo (Modified Version)

In the original version, there were only 3 cubes, the floor plane, and the wind effector. As it turns out, the wind strength in the original was far too low to do anything, and the fact that the cubes and floor plane had the default friction values meant that they could not slide around at all (as hoped). So, in this updated version, I've boosted the wind strength (I'm not sure how this maps to real-world values, but it's probably getting quite strong) and made the friction on the other objects nearly no-existent (they values they have give them very little static friction, which is practically 0. In real-world terms, static friction = 0 is a perfectly slippery surface such as ice, so we've now got ice-cubes on a skating rink here :)

Anyways, this should prove an interesting base for some playing around. Have fun with it!

When I get around to it (desperately hoping that working on assignments for Uni courses won't end up digging into this time), I'm currently planning on setting up some operators to build up brick walls and such, already set up with settings to let them work out of the box. Perhaps I'll firstly need to add a few more triggering options first before I do that, but we'll see how it goes. Fingers crossed!


  1. Hey Ali, been playing around with a fresh build and things are working a lot better, not to mention all the new additions. Great job! I updated the wiki to reflect things I am no longer having any problems with as of r31177.

    I don't know if this is possible (with bullet) or in scope, but it would be cool if objects could have a sort of static field setting so they would stick together when they are close enough. I suppose it would have a strength and margin setting.

    I think something like this would help in trying to simulate the grout in a brick wall or shingles on a roof. Just food for thought.

    Also is there any real world equivalent to the mass setting? Like does a mass of 1 equal a certain number of pounds or kilograms? Is there any sort of calculation done for things like air drag, based on the size of the object and it's weight?

  2. Hahaha! Its amazing!!! Forces moving the rigid body!!! Thats great! I've played with a graphicall build for osX. We can do SO MUCH MORE in motion graphics with this feature in Blender!
    Thank you SO MUCH, aligorith!!! You're doing a great job!!!
    Please! Continue!!!