You are probably aware that our new Nexus One Android phone comes loaded with live wallpapers. I had the chance to work on some of them and I wanted to share with you high-resolution images of Grass and Galaxy. These two wallpapers were prototyped as desktop applications and you can see below what they look like.
I’ll try to see if I can get these two desktop apps released, hopefully with the code. The desktop versions run on Mac OS X, Linux and Windows.
Which language this being prototyped ? Java ?
I used Processing (which is actually Java.)
Nice!
Will there be APIs to make your own live wallpapers in the upcoming version of the Android sdk?
Hi. When are you planning to release code? I’m pretty interested in knowing how you did this. :)
Is that using similar techniques from your Filthy Rich Client book? I could see how you have done the third, but first and second :x That is pretty darn remarkable. Looking forward seeing the code!
@BoD: Yes, the 2.1 SDK contains public APIs to write and publish live wallpapers.
@Amatzu: I’ll try, I need to figure out how to release the code.
@Mohamed: The second and third are actually the same wallpaper. The blades of grass are made of a bunch of triangles and the background is just a bitmap. To simulate sunset/sunrise, I simply fade between 4 different images. I also fade the brightness of the grass to simulate light. As for the galaxy, it’s a bunch of textured quads, blended with a color and a couple of light maps.
Here is what it looks like with no texture on the stars (just drawing dots): http://progx.org/users/Gfx/notexture.png
And here is what it looks like with no light maps for the galaxy: http://progx.org/users/Gfx/nolightmap.png
Note that on Android, the Galaxy wallpaper is implemented differently, using point sprites instead.
Really cool to see you using Processing to create these wallpapers. I’m assuming the API leverages the Processing classes. Do you foresee us being able to utilize the same sorts of animations that live wallpapers provides, but NOT for live wallpapers, but maybe for use inside an app (think of a splash or startup screen that uses the live wallpaper APIs)?
The prototypes are written in Processing. I did port Processing to Android to run live wallpapers and performance was not on par with what we wanted, so we implemented something called RenderScript.
I’ve seen the release notes on the 2.1 SDK but it seems that it did not give out some sample codes as to how to create live wallpapers. Maybe even how to load it to the emulator, or its project structure.
There’s a sample live wallpaper in the SDK.
Got it thanks! Will work on it..
Hi Romain,
You mentioned the use of renderscript, is there any more info’ on this coming soon?
You can watch the presentation I gave at Devoxx 2009. We’re still working on RenderScript so don’t expect much. The code is available :)
Hi Romain,
I’m sorry but i did not find the sample live wallpaper in the SDK.
Can you precise the filepath of this sample?
Thank you again.
It’s called CubeLiveWallpaper. You have to download the platform API level 7 first.
Yeah, thanks, i found it.
I’m very surprised. Is the only one way to draw live wallpaper is by using drawLine … or can we use xml layout?
I have try inflate layout and to view.draw(canvas), but nothing appears.
All you get is a Canvas, you cannot use Views and you won’t be able to use Views.
Just to confirm if you need to create a moving riverflow, then you would have a runnable which redraws a canvas everytime? also is there a way to set a background image or you really need to redraw the background then the new motion of the water for example?
Thanks Romain, good job.
This is really cool. So, can I still create my own wallpaper using online tools at sites like mobilespin.net?
Hey Romain,
I’m really curious about the status of RenderScript, as I too am not satisfied with a java-only implementation. The cube example doesn’t have any RS, and the .rs files in LiveWallpaper.apk are interesting, but not altogether helpful. How does one implement the RenderScript back into the wallpaper?
Jonathan,
You cannot use RenderScript for live wallpapers at the moment because, as I mentioned several times before, it is a private API and it’s still changing a LOT and very quickly. Just use OpenGL for now.
*Wish someone would make a tunnel 3d / wormhole live wallpaper. Could tilt the tunnel from the accelerometer.*
Like this!
http://www.openprocessing.org/visuals/?visualID=3621
Hi, can anyone help me find Romains talk and/or presentation on renderscript without paying loads of money for it? (no offence, just think companies can be the ones paying, not me).
Thanks.
I’m an owner of the nexus one. I have fallen in love with the Grass wallpaper. There’s something weird about my technology coordinating with the time of the day. Also, because i live in seattle, I like that it’s a sunny climate. :) It can be raining outside but i look on my phone and its beautiful!
I think it would be cool if the grass could be shorter or even eliminated. Also, if it could respond to seasons. Maybe frost in the morning during winter. Maybe shooting stars? A brief peak at the sun? And man, if I could have the same background when i went to google or my mac desktop and my pc desktop. That would be amazing. Everywhere I went to have the season.
I realize that this is more of a developer type of crowd that hangs out here. So some my ideas may be lame. Thanks for this feature. I think Grass should be the default wallpaper on the device. Thanks!
I usually don’t post in Blogs but your blog forced me to, amazing work.. beautiful!!!
I’m a huge fan of the Live Wallpapers, and it’d be wonderful we could use them on our desktops as well. Romain, are you still anticipating being able to release a desktop version and/or source to go along with it?
Could you PLEASE, double please, render full day (sunny) one.
I’d like to put them on my desktop wallpaper so that they change (night – morning – day (missing)).
Thank you again for this.
Also, is it possible to render something bigger, say – 1280×1024 or 1280×960?
Thank you again.
Note:
I got a reply to my mail asking for a daylight wallpaper. If anyone needs it, feel free to contact me at neven1992(at)gmail(dot)com.
Very good article! This is a extremely informative weblog in which you have.
Hi I would be glad if you tell me about the prototypes
where they successfull or not.
I am really interested in the Galaxy
I really wan’t to have it if it is possible.
Thanks a lot
Hi I have made a similiar code to you
But I have a question about the colors
I would be really glad if you could help me by telling me how to add the color map and the glow effect
A million thanks in advance
My Email is: nouri.f.nima@gmail.com
they are very nice
Very interesting. I found your blog on google and will bookmark it now. Keep up the good work.
Hey Romain, any news about Renderscript ? It will be – one day – available along the official API version ?
Keep up the good work.
RenderScript will become a public API :)
Romain,
Can you tell us when? Will it be released with 3.0?
thanks