From BlenderWiki

Jump to: navigation, search
Note: This is an archived version of the Blender Developer Wiki. The current and active wiki is available on wiki.blender.org.

Synopsis

This project aims at continuing the work done by Joshua Leung for the Google Summer of Code 2010, integrating the bullet physics library natively into blender so users don't have to go through the clumsy process of running their simulations inside blenders game engine.


Deliverables

  • A simple way to setup stable rigid body simulations.
  • The ability so bake the simulation.
  • Ways to control the simulation via constraints, forces and the animation system.
  • End-User Documentation.
  • If time allows additional features, see below


Project Details

My focus will be on making something that is usable and reliable not adding a lot of shiny features, those can be done afterwards when we have a stable base.

So the goals in order of importance are:

1. Stabilize what already works:

  • adding/removing/modifying rigid bodies, collision shapes and rigid body worlds
  • stepping through the simulation
  • changing rigid body properties
  • force fields
  • ...

2. Finish what should work but isn't finished:

  • enabling/disabling sleeping
  • switching between dynamic and kinematic state of rigid bodies
  • ...

3. Implement what is needed to be useful:

  • expose more rigid body properties
  • compound objects
  • custom convex hull shapes
  • manual collision shape editing
  • motion caching / baking
  • rigid body constraints
  • use more of bullets features to make simulations more stable (ccd, internal edge utility, ...)
  • investigate bullets multi-threading support
  • ...

4. Documentation

  • especially with regards to what to do/not do to achieve stable simulations
  • ...

5. Cool, fancy features (if there is time, otherwise after gsoc).

  • breakable constraints
  • animation driven rigid bodies
  • demolition/fracturing
  • deformation
  • soft bodies
  • interoperability with the game engine
  • ... there's always more


Project Schedule

It's hard to make time estimates since I'm already working on it and it's unclear what will be already finished when the project officially begins but here we go:

  • Stabilize current features (2 weeks).
  • Finish partially implemented features (1 week).
  • Implement dynamic/kinematic switching (a few days).
  • Use more of bullets features (1 week).
  • Further work on collision shapes (1 week).
  • Implement motion caching (2 weeks).
  • Implement rigid body constraints (2 week).
  • Bug fixing and documentation (2 weeks).

The estimates above are very likely to be overly pessimistic so I may have time to start on the more fancy features.

One fancy feature that a lot of people want is some sort of fracturing. This can be done in several ways: 1. Break the object into pieces before the simulation and switch it for the intact one at the moment of impact. 2. Break the object dynamically during the simulation and have material properties to control it.

The first approach of doing it is rather easy to implement and could be done quickly, we just need a way of breaking objects into pieces (via a modifier or an operator). The only thing on the simulation side that would help this would be breakable constraints, but even those aren't necessary. The second approach is much more tricky (but also much more fun) and needs more time to implement (maybe even it's own gsoc project) so it's not likely to be done.

I won't be taking any vacations but I will be having exams towards the end of the project, since I don't have any dates yet I cannot be specific.


Bio

I'm a computer science student currently working on my bachelors degree in Hannover, Germany. I'm very comfortable with C like languages (C, C++, Java, Vala) and know enough python to get by in blenders code-base.

I've been a blender user for almost six years, bullet integration has always been one of my most wanted features. Before I started to work on it myself I submitted a couple of small patches, some of which have been committed others are still in the patch tracker after over a year without any comments :(, tsk tsk.

I started helping Joshua to bring his BulletDev branch [1] up to speed some time ago (since I really want this feature). Shortly after that I found out that he's busy with other projects but will be available to mentor those who want to work on the areas of blender he is familiar with. So this years Google Summer of Code is a good opportunity for me to spend more time on this project. I'm familiar with bullet, having worked with it previously and I also got pretty comfortable with blenders code-base through the work I've already done.

You can see the work I've done so far in Joshua's and my [2] git branches.


[1] Joshua's BulletDev branch https://gitorious.org/~aligorith/blenderprojects/aligoriths-blender/commits/BulletDev

[2] my branch https://gitorious.org/~sergof/blenderprojects/sergofs-blender/commits/sergof-bullet-dev