Monday, March 25, 2013

My new app - FC Barcelona Logo LWP

Well, it's not the game I was telling you about and neither the super brilliant idea I had (which turned out to be somewhat impossible to implement for legal reasons). It is a nice looking live wallpaper featuring an animated 3D logo of FC Barcelona - a great football/soccer team with amazing players and a uniqe game style. It's also my attempt at learning 3D animation and other graphic techniques on Android. You can find it on Google Play and let me know what you think. This time I decided to release a paid version only, but if $0.99 is too much for you, you can at least take a look at the screenshots and the video.

What went well

I had a chance to delve into 3D graphics once again and I used to be pretty mad about it back in the day. I used min3d and its live wallpaper fork to animate a model I created with Blender - a free 3D modelling tool. I had some minor problems with the library itself and since it has been discontinued for some time, I couldn't really expect the bugs to be fixed, but still I decided not to use Rajawali - its successor, because it's less compatible with old devices, more complicated and runs slower. I might try it in the future though, because it supports OpenGL ES 2.0 and shaders, which can make the end result look stunning.

What I'm proud of is that I managed to use ambient occlusion that I prerendered into textures using Blender. If you don't know this technique, just type it in google and see the images. Here's how Blender's Wiki describes it:

Ambient Occlusion is a sophisticated raytracing calculation which simulates soft global illumination by faking darkness perceived in corners and at mesh intersections, creases, and cracks, where light is diffused (usually) by accumulated dirt and dust. This has the effect of darkening cracks, corners and points of contact, which is why ambient occlusion is often referred to as a “dirt shader”.

If you have a careful enough eye, you should be able to see it in the logo render above as well. Just look at the red cross or the red stripes and note that they cast a soft shadow on the white and yellow background.

Creating the model probably took me a little more time than I first thought (a good couple of hours), but that was because I had to learn how to use Blender (I am more used to 3DS Max which I learned in the past) and then to simplify the model itself to take less space and load faster on a mobile device. I watched a very good tutorial on how to bake ambient occlusion into a texture and it helped me a lot. I first got inspired to try it by a youtube video, which showed an extremely good looking 3D logo even though it was using only simple OpenGL ES 1.0 techniques.

What I was struggling with

I didn't realize it was so difficult to make a video of an OpenGL application. Obviously, I couldn't publish my live wallpaper without showing people what it looked like in action, because no one would buy it. Using the emulator and then recording the screen wasn't an option, because the app looks very bad this way and runs much slower. I found a nice article on How to Record Screen Activity on an Android Device. Unfortunately, some of the options it describes didn't really work for me. I couldn't use a HDMI cable to connect my phone to the computer, because I don't own one (I mean the cable). I didn't want to use paid software like Screencase Video Recorder, because I wasn't sure if I could sell so many copies of my wallpaper to be able to pay for it. Using my digital camera wasn't an option as well, because I don't like the quality of such videos. I tried transfering the content of my phone's screen to my computer via USB, but I could only reach about 2 fps this way (I think I was using Ashot, but I don't remember it well right now). Finally, I found ASC, which lets you record your phone's screen and save it as an mp4 file and doesn't require your phone to be rooted, unlike many other apps. What its description didn't say though is that you can only record 20 second videos and after making a couple of them you have to wait for about an hour and a half... unless you pay. At this point I was so frustrated with how much time I spent making the video, that I decided to go with it anyway, wait 1,5h once or twice and then combine the 20 second parts in Adobe Premiere. I'm not totally happy with the result, but it looks good enough for now. You can see it below.

Final thoughts

I'm quite content with the app. Thanks to ambient occlusion it looks realistic and I had a chance to refresh my 3D graphics knowledge. After a week of being published, the wallpaper has been bought 7 times, which is not a mind blowing figure, but definitely not a bad one either. If I could keep the install rate, I would be selling about 25 copies a month. Who knows - I might even make other models of other club logos and publish them as well. Now that I have the most difficult part done (namely the code), it should be easy to create new wallpapers based on it.

As to my game, I promise it's going to get finished. I might publish another experiment of mine first though. I was also thinking about doing a research on making videos of your apps. I really don't want to struggle with it again and I'd much rather have some solution ready. If you know how to do it well or want to share some other useful knowledge, please write a comment or email me directly. I'd also appreciate any feedback on my wallpaper - let me know what you think.

Thanks for reading and and all the best to you!

No comments:

Post a Comment