The Persistence of Ignorance

Menu Home
pens-physics-11

Koppi's Bullet Physics Playground

Koppi's BPP + Wings3D + POV-Ray 3.7 RC6, Oct-2012

After the sslt tests with the dominoes pieces, I was thinking that it would be nice to do a sort of "domino effect" scene, but setting it up by hand looked like crazy... so I started looking into automatic alternatives.

The first one was to use MegaPOV mechanics, but somehow I got a little bit scared by the docs... so I continued searching and found something called Bullet Physics Playground by Koppi. It is a little, mostly alpha tool to play with LUA scripting and the Bullet Physics Library, with the nice extra feature of exporting to POV-Ray.

Below are some of my first tests with it, using assistance from the author to make it compile and run on my system. The program it's not documented at all, and has little examples, but the potential is there... and it's big. And it already helps making a lot of scenes that previously were very difficult...

In fact, I liked so much the program that I'm going to try to make it better suited for POV-Ray users, hopefully with the help of the author, either on the main branch or making a fork. I already corrected a segfault and a few little bugs, just because I was forced to: Koppi is sailing until mid-december, and I really wanted to use it with something more complex than the examples.

Another nice thing about Koppi's playground, is that it allows to construct scenes the way you will do on POV-Ray, with loops, and if's, and lots of random values here and there... The tool consists on a LUA interpreter, which is the "interface" to the Bullet Physics Library. There are some bindings in place which allow to create simple collision objects, and to add them to the physics simulation. Then you run the simulation, and the whole thing is rendered in openGL on real time.

You can export each frame to POV-Ray format too, and that's the actual good thing about it. It's currently very simple, and only exports basic primitives with fixed SDL code, but after the export I do some automated search&replace to put there my own objects, with the same or similar shape and dimensions, leaving the transformation matrix in place, and ...voilá!


WIPS, tests and other images:

bolts-and-nuts-03 bolts-and-nuts-04 bolts-and-nuts-box-02 bricks-pile-04 bricks-pile-05 chain-fall-01 chain-fall-04 chain-fall-05 chains-curtain-01 chains-curtain-02 domino-19-effect-physics domino-24-effect-physics domino-25-effect-physics domino-26-effect-physics domino-27-effect-physics domino-28-effect-physics domino-30-effect-physics domino-31-effect-physics pearls-collar-05 pens-physics-04 pens-physics-06 pens-physics-07 pens-physics-08-mix pens-physics-10 seating-chaos-01 seating-chaos-03 seating-chaos-05 seating-chaos-07 tablones-03 tablones-04

This site uses CMS Made Simple
© 1996-2016 Jaime Vives Piqueres
(jaime-at-ignorancia-dot-org)

Creative Commons License