Wednesday, March 21, 2007

Particle Simulations


I've left the super-optimized, runtime-bytecode-compiling 3D engine project for a short while, so I can focus on a demo for the Nullarbor demoparty.

Competing in Nullarbor will be particularly challenging for me, simply because I'm using Python, and can't afford expensive CPU consuming algorithms.

I've decided to base the demo around particle system effects, mainly because Numpy is able to make these sorts of simulations relatively fast.

A couple of hints for would-be particle-system programmers: Use additive blending, use the GL point sprite extension, and turn off depth testing. If I had found these 3 hints spelled out in one sentence, I would have saved quite a few hours research. :-)

In other news, someone decided to debianize my FibraNet package. People actually _use_ this code? :-)

4 comments:

Pierre said...

That sounds very good!

I've always been interested in demomaming... I spent ages when I was younger in front of my computer, watching at those Haujobb/Bomb/Calodox/etc. prods, and I really enjoyed them.

I would have like to be able to study their code at that time, but (1) it was in horribly complicated languages, and (2) nobody would spread its own source code.

A couple of years later, I discovered free softwares, open source stuff and all that, and I quickly made a connection between that and the demomaking community: if only they'd been released their demos with the source code! :)

Now, I'm more willing to learn a simple and elegant language like Python, and I'm glad to see it's still possible to make some pretty stuff with it.

Will you detail your production and/or release the source code someday?

I hope so!

Keep up the good work!

(by the way, I found out your blog by subscribing to the unofficial Planet Python)

Simon Wittber said...

As proof of code ownership (for the Nullarbor competition), I have to detail the steps in my production.

I'll write about it here, and will release the code when its finished.

René Dudfield said...

Hi,

if you can assume psyco, then a particle system in python can be very close to C speed.

When I ported the nehe particle system demo to python from C ages ago, with psyco it was faster than C.

OpenGL level optimizations are definitely where most speed ups are.

Anonymous said...

@illume:
Hi i'm in the process of learning opengl using python, and i've been in a fix to get some particle system up and running in python, can you please tell me how you where able to port the code to python

Popular Posts