Thursday, June 17, 2010

Bullet SoC - Sneak Peek

Disclaimer: This is a very limited proof of concept implementation

With that out of the way, here are some demos that I'm sure you've all been waiting for...

Artifact 1 - Cube controlled by Bullet, and affected by gravity only

Artifact 2 - Dynamically controlled object (Cube), affected by gravity, falling onto an animation system controlled object (Plane). The plane isn't moving in this instance, but that doesn't mean it can't move...

Artifact 3 - Animation system controlled moving object affecting physics object. Not quite as impressive as I hoped it to be due to blotched settings, but it gives an idea.

Basically, what you see here is all that currently works! Currently I don't really have time for more (exams), so this will have to do.

What is done:
  • Basic evaluation loop to run Bullet simulations within normal Blender, and see the results of this in realtime in the viewport
  • A few operators to set up a simulation to run in this loop
  • Two basic collision shapes hacked in - cube and sphere. More refined setup still needed for setting up other collision shapes.
  • Basic parts of the framework proposed in the design doc - datastructures + core api's
What still needs to be done (i.e. key next steps):
  • A better C-API for interfacing with Bullet. Currently the one supplied by Bullet is as (if not more) limited than suggested in the codebase, but was used as a baseline to get a feel for integration issues first. Will probably try to keep this able to allow plugging in other RigidBody engines later, but that is of less importance than getting sufficient access to Bullet functionality.
  • Further investigation (i.e. best way to present settings) + implementation of interaction of sims and animated objects. Should be simple to integrate, but no time to do this well yet.
  • Investigate and expose other settings necessary to adequately control simulations
  • Properly implement collision shape setup
  • More operators + polish to operators quickly hacked in to get functioning demo
  • File I/O stuff - currently unimplemented, so don't save files and/or use undo with the current system
  • Reset transforms capabilities (when going back to start frame) and use of motionstates (so that backwards playback works?), but these require the improved C-API
From this base, the fancier parts of the project can finally commence.

I've committed the code to my branch (note it is the one with the -2 one the end, not the other one, due to some svn troubles...). Have fun playing with what little there is now, but please no bug reports yet. It's far too early for that!


  1. Looking good!! cheers brother

  2. Yay, looking goooood! This is my most expected GSoC!! Cheers and good luck with the exam(s)!!!