Doh, can’t sleep…

… so… I wrote my first particle-system ever. It does not look photorealistic - by far not *g* - but implementing something like that is great fun! You see a cluster of 5000 particles in the screencasts below. Right now I’ve two emitters (a “singularity” one and a rectangle one) with a gravity force-field being applied to the particles. WASD/Quake-like camera-navigation I implemented too, so one can “walk around”. From here numerous things could be added: wind, general turbulence, attraction-/repulsion-forces between particles, collision-detection with obstacles… the visualization could be improved with motion-blur, lighting, shadows etc. Rendering- and simulation-loop are coupled and run at 60 Hz. Screencasts were recorded with 30 Hz.







11 Responses to “Doh, can’t sleep…”

  1. Mirco Müller (macslow) 's status on Thursday, 05-Nov-09 03:41:51 UTC - Identi.ca Says:

    [...] Fight insomnia with coding particle-systems http://macslow.net/?p=415 [...]

  2. Bob Hazard Says:

    Drawing the plane was a good idea, makes it look much more professional. Can you believe there isn’t a simple DrawLine() in Directx?

    Try alpha blending some billboards and you can make some wicked flame/smoke effects surprisingly easily. What I used to do was prerender an explosion using something like combustion and then take the frames as pngs for billboarding.

  3. Jakub Steiner Says:

    I fear the next notifications release ;)

  4. Vadim P. Says:

    Tbh, I was a bit dissapointed by notifications update in Karmic (mb you were working on something else… not my position to say!). But this does look scary. And maybe unrelated ;)

  5. Per-Erik W Says:

    Really Cool! Now just change the particles from “spikes” to something else … Gnome Foots perhaps ;)

  6. bfloch Says:

    Nice. Not a houdini yet but nice try ;-)

  7. tretle Says:

    Hoping this has something to do with the emotion engine link I gave you awhile ago :D

  8. MacSlow Says:

    @ Bob Hazard: Yeah, billboards are another nice addition I could do… making the cluster look less abstract.

    @ Jakub Steiner: Don’t worry jimmac, this is purely spare-time work, not job-related at all. notify-osd will stay subtle.

    @ Vadim P.: A lot of work and bug-fixing went into notify-osd for Karmic. I did not work on something else. That particle system is really totally unrelated to notify-osd. I don’t understand why people assume that now everything I blog about has some relation to notify-osd. If this would be the case I’d clearly state that. I even have a dedicated tag for this on my blog… and it’s not used for this blog-post.

    @ Per-Erik W: Just like Bob Hazard suggested earlier, billboards are a nice possible extension for this indeed.

    @ bfloch: How am I not surprised to see you comment on something like this *g* This is not going to be competing with anything that’s in big applications like blender, Houdini, Maya, Fusion etc. It’s just hacking for the fun of it and the joy of realtime 3D.

    @ tretle: Gee… folks… you read far to much into my blog-posts *g*

  9. tretle Says:

    “Gee… folks… you read far to much into my blog-posts *g*”

    Too bad, particle font effects could have been a really interesting addition to gnome :D

  10. Manuel Says:

    What’s your borderless Dust theme? How did you got that sleeky appeal?!

  11. MacSlow Says:

    @ Manuel: I tinkered with the .xml file of Dust’s metacity theme. Got rid of all the borders and outlines. You can grab it here http://macslow.net/metacity-theme-1.xml. Copy that over the existing ~/.themes/Dust/metacity-1/metacity-theme-1.xml (if you have it only installed locally for you account) or /usr/share/themes/Dust/metacity/metacity-theme-1.xml (if Dust is installed system-wide).

Leave a Reply