Virtual Entertainment: Project 1 Case Study

So I sat down bright and early in the afternoon in this class called Virtual Entertainment. Being that I am irresponsible, I had not read the course description, but I had assumed that it had something to do with creating games n’ the like. Much to my surprise, it was a class geared towards experimentation, leaning more towards generative art, and all things processing.

I set out to make some fancypants generative art for my first project. This was to be a rather quick project with a time line of  ~3 weeks. I dug up some old code I had made last year. I had begun to experiment with processing, directly after seeing my idol Robert Hodgin present at Flash in the Can. Here was of my Initial Tests:

blog1blog2

If you want a crappy javas applet version you can see it here.

(read the source at your own risk, its really quite unkempt )

So this was a simple test of drawing particles, based on a system called “Polar Turtle” That a couple of my professors developed here at RIT ( Nancy Doubleday, and Steeve Kurtz ) That i’ve modified to my own end. These simple turtles track a target, and are constricted by a maximum turning value per frame. Having the constraints on the turning creates some really slick looking turning. It also creates the framework for more complicated behaviors.

So, this was a nice test, but it has no meat. I began to experiment with other kinds of stuff i could do with the polar tutle in processing. I was very much interested in it’s ability to tap into OpenGL, as coming from a flash background… hardware acceleration is something dreams are made of.

I took these guys into faux 3D and added some nifty OpenGL additive blending and came up with some interesting results.

blog31blog4

This was all well in good, but it really wasn’t what i was looking for. I went back to the drawing board, and remembered some nifty stuff I’d seen at FITC, namely Hodgin’s particle test he had shown. He had uploaded the source of it to his blog, so naturally I downloaded that guy and took a peek. I stripped down his engine, and rebuilt a similar system, except instead of Hodgin’s simple particles I implemented an upgraded version of the Polar Turtle. This time I had added an obstacle avoidance skill to their repertoire. So the particles, try to track the mouse, but they also try to avoid each other. That created some really nice looking motion.

blog5blog6

The trails added a nice effect, but they were, still rather lame. It really needed to have a much better visual payoff.  I started to play around with, drawing a new image after all of the particles had died. creating a “big bang” effect. I logged all of the positions from every particle  in a massive array and then after all the particles had died, I would draw some new art based on that data. After some tinkering, the results would look something like this:

blog6a

The general theory behind this ‘after image’ is that I throw all of the positions of every particle in order of their birth into an array on every frame.  For example, if you have 10 particles, 0-9 in the array would be frame 1, 10-19 would be frame 2 etc. I then take that bigass array and draw triangles between all of the points in that order, and texture them with a larger version of the particle texture. This gives the triangles a transparent edge, so you don’t see where they connect to the particles. The end result looks pretty neat. Interestingly enough processing can handle those guys like a champ. It only started to get slowdown if I went above 8,000~10,000 positions. ( Each position consisted of the x /y positions of each particle and their age at the time. )

Since the afterimage was based on the positions of the particles, you were essentially drawing with your mouse. Which is surprisingly entertaining. I’m not quite sure How much time I’ve spent just playing with the pretty flashing lights, but I’m sure I’d rather not know. I was a big fan of how the afterimages turned out, but I thought I could push it a bit further. I decided to try and generate the afterimage in realtime, while I was displaying the particles. Turns out that looks pretty sweet.

blog6b

Here are some more renders that I pulled from the most current version:

blog7blog8

All in all, the renders don’t really do it Justice. If you want to download the application and fool around with it, be my guest. I certainly have quite a bit of fun playing with it.

Windowz / OS X

I’ve included some hotkeys for the application:

C: clear screen

1 - 0: set the length of positions recorded for the after image rendering.

1 = 2000 positions,  0 = 100,000 positions.

I plan to take this little application further in the next 7 or so weeks. Next on my agenda is to rewrite the particle engine for 3D. My 3D math is a bit limited, but I should be able to figure something out.

One Response

  1. Courtny Cotten Says:

    This is pretty intense! I really appreciate this type of digital art not only because of it’s beauty but your commitment to making it all come together. The technical aspect is what really sets this apart from someone simply emulating this in a raster based image editor.

    Played with your “particlething” engine on my 30″ cinema display and before I knew it I had my screen covered in ghost images and miniature big bangs.

    Keep up the good work and hope you share more with us in the future!!

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.