QuickB2 now released open-source!

Code: http://code.google.com/p/quickb2/
Examples: http://quickb2.dougkoellmer.com/bin/qb2DemoReel.swf

This library represents a very different way to approach the programming of physics simulations, and I encourage you all to give it a whirl. It uses the Alchemy port of Box2D for the back-end.

- Doug
By first look, it is a soft body engine

It is possible to customize the render, I mean applying the shape morphing to MC or images?

And will it be possible someday it will be intergrated into main box2d engine?


Anything, thanks for puting it open source
Soft bodies are just one of the many conveniences. However, it's still mainly a rigid-body engine.

You can override qb2SoftPoly::draw() and do whatever kind of rendering you want. For example, you can take the vertices of the poly every frame and use them to texture-map a bitmap.

QuickB2 sits on top of Box2D. It's meant to simplify certain tasks and provide a more friendly API for Flash Developers, so no I don't imagine anything will be integrated downwards.

Thanks for looking.
For the soft body stuff, are you just changing the polygon vertices of a living in-world b2PolygonShape? And then on top of that have a spring system set up between the vertices?
They're triangles connected with springy revolute joints. I made a quick app to show how it works:

http://quickb2.dougkoellmer.com/bin/Sof ... Scenes.swf

qb2SoftPoly is a subclass of qb2Group, and overrides the draw() method to do those splinar outlines.

I never thought of doing it as one b2PolygonShape, but the decomposition you'd have to do every frame would probably make that approach too slow. Not that all those joints and triangles are very efficient, but they seem to get the job done.

I tried having one small circle for every vertex (which I think is how most other soft-bodies are done), but the pop-through was too much of a problem. You also don't have "material" in the center of the polygon to work with, like attach joints to.
That's actually a very clever solution! I like it. It kind of bothers me how the triangles can stab out the other side of the polygon, but it seems to not be a problem in the demos.
Heh yea, I think the smooth-edge rendering tricks the eye a little. Also, situations where the triangles are poking out the other side generally mean that high enough forces/velocities are involved that you don't notice the discrepancy amongst the relative chaos.

If it were a problem though, I think you can stitch the inner corners of a few of the triangles together with linear springs for more reinforcement.
I am going to evaluate the code this coming week to see if I can put it to use in any new projects.

Oh, there is one issue with that demo swf. It never loads on my Droid 2. I think this is because it's a raw swf and not embedded in an html page... but I can't know for sure. (Maybe it is something else)
Ha, well the demo's not exactly targeted for mobile devices, but I just loaded it up on my Nexus One and it worked fine. Surprised it ran as fast as it did actually. Had problems using the GUI though...buttons weren't very responsive.
The fact that you're using the Alchemy version of the engine gives hope that it might be useful in mobile AIR applications, so it's definitely something I'd suggest you think about...

I haven't used the alchemy version of b2, but in looking at the sample page for the WCK I know that even it has performance issues on my phone. The main problem with it is that I *know* there are certain things that I always have to do to box2d to get the performance up in Flash (object pooling, giving the option to be discriminating about even *reporting* collisions to a listener, etc) and I'm concerned that I wouldn't be able to make those modifications to the alchemy version.

Original thread: https://box2d.org/forum/viewtopic.php?t=5987