Winter Fire AR
This application appears to be a simple novelty application but actually has some fairly complex code behind it.
The snow and fire are an OpenGL ES based particle system using the ES 1.1 Point Sprite extension. The code for simulating and displaying the particles runs entirely in Java/Dalvik space, although I am looking into using the Android NDK to speed up the simulations. The particle systems include a number of simulation(gravity/speed/lifespan) variables as well as color and blending settings.
They were designed using a custom particle system editor I wrote as an eclipse plugin which saves the particle systems to an XML file which is parsed and processed by the application at run time. The editor uses standard Java OpenGL and the same XML format as the Android application. The XML format allows me to easily tweak the Particle systems as well as have a simple external format that can be downloaded from a server and loaded dynamically.
Overlaying the GLSurfaceView over the Camera Preview SurfaceView uses a tricky little hack that I hope won’t break in subsequent versions of Android.
I recently updated the application to allow the user to take pictures, save them to gallery, or share them with their favorite application. I had to extract the OpenGL image, flip it and convert it to a format that Android understands and overlay it on the image that the camera produces, the whole process sounds much easier than it actually was.
-With the release of the Nexus One, I added the ability to have the winter/fire effects as a Live Wallpaper.





