News Projects Resume Contact

ImageCloud

What is it?
Sackboy1 Sackboy2 Sackboy3 Sackboy4 Sackboy5
Sackboy6 Sackboy7 Sackboy8 Sackboy9 Sackboy10
ImageCloud is a program that evolves a dynamic set of transparent triangles towards a reference image.

This idea is nothing new. It has been done before by Roger Alsing, with his EvoLisa project.

The difference between EvoLisa and ImageCloud is that ImageCloud generates the triangles in 3D, while EvoLisa uses 2D. The nice consequence of this is that, in ImageCloud, you can fly around in the cloud of polygons, and see how they interact to form the final image. The effect you get when you finally come back to the one point in space from which the triangles were drawn when evolving the image, facing the one special direction, is that the original 2D bitmap magically appears before your eyes, like an optical illusion.

But I'm getting ahead of myself here. This is how ImageCloud works, in pseudo-code:

For each generation
{
  randomly add/remove a triangle (or do nothing)
  randomly change the position of a random vertex (or do nothing)
  randomly change the color (RGBA) of a triangle (or do nothing)
  randomly change the shuffle the drawing order of a triangle (or do nothing)
  draw the triangles (using OpenGL)
  compare the resulting image to the reference image
  IF it is equally close to the reference image as the previous generation, or less close, undo all mutations of this generation
}

And that is basically all. Leave it running for long enough and you will get the above image, starting from this one as a reference:

Sackboy original
  • Original image is 256x256 RGB
  • Final image took 1000003 (attempted) generations
  • of which 32464 were kept
  • and 6346 triangles make up the entire image

Here is a movie of the process at work, with some fancy flying through the cloud added for extra coolness:



Some facts about this example:
  • Original image is 256x256 RGB
  • Final image took 5347376 (attempted) generations
  • of which 106678 were kept
  • and 8346 triangles make up the entire image
  • it took many hours to render. My current laptop can test 400 generations per second at first, but it slows down as the list of triangles grows to about 150 fps

Finally, here is a movie of a talk I gave on ImageCloud during one the schools' Neverending Conferences


Future plans
Things I'd like to do in the future with this program:
  • Speed up
  • Tweak the mutation parameters for better results
  • Create an interactive mode where you can draw a rectangle or draw with a photoshop-type brush to specify which area of the image to concentrate on, to fill in those difficult details
  • Draw using entire 3D models as basic primitves instead of triangles (spheres, or cylinders, or teapots, ...)

mADE