Sunday, August 5, 2012

Acting Animations

Do you know what's your favorite activity of the day is? Mine is, in no doubt, watching a 3D animated movie on  my PC. No matter how busy I am, if I find a good movie, I'd put aside all my hard work and savor the taste of it. :D

Yesterday while watching Kung Fu Panda 2 for the upteenth time, my curious cat started meowing. Who's actually playing the cute Po, brave Tigress and the funny Monkey (my all-time favorite characters)? How do the animations come to life? How does the lip synchronization happen so well?  

Searching about it was so much exciting. I started with the "behind the scenes". Here's the best clip I've found so far.

Yep, it's Jack Black who's giving a voice to Po. Now I feel like they've actually modeled Jack Black in the animated character Po! I remember him playing the stupid, yet really funny character Gulliver in the Gulliver's Travels. Even in "behind the scenes" his actions were comparable to none other than his own. Well, it's all Deja Vu in Kung Fu Panda, don't you think? That's a little something to have an experiment on. Even Angelina Jolie's voice as Tigress freaked me out; in a good way I mean. I suddenly remembered her as Lara Croft in Tomb Rider with her long platted hair wavering just like Tigress' tail. Oh what a match they are!

And oh, there's something more. I'm sure all of you have watched Finding Nemo. In case you haven't noticed, my all time favorite comedian Ellen DeGeneres is dubbing for Dory, the funniest fish in all seven seas. "I shall call him Squishy, and he shall be mine, and he shall be my Squishy", says Dory to a Jellyfish. Adorable and funny that fish is, just like Ellen :).

Enough of beating around the bush. Lets get to the point.

When I was searching about this mysterious fact, something struck my mind. May be they are making animations after choosing who the actors are. May be they are even making dialogues after determining the actor/actress to play the role. Going in that direction I found some interesting pile of information that I'm about to share with you.

Voices of all animated characters are recorded before they start doing the animation. Animators study the videos of each actor (as in behind the scenes), his/her actions and facial expressions. Then they carve their animations to match the actor. This post says it all. Voila! That's the secret behind animated characters resembling real world actors and actresses. It's not just with the voice the character comes to life, but with a piece of the real world actor carved upon it; a fact that makes all the animated movies so picture perfect.

Friday, December 2, 2011

Exploring ways to connect Droid and PC

The curious cat inside me told that it wanted to download and play with some funny talking-cat app. (I ain't kidding. Curious cats love to play with Android apps ;) )  Damn, that app was so heavy (nearly 35MB) which I couldn't afford to download from 3G. Now I'm trying to investigate about sharing the DSL connection of my PC with my Anroid. Sounds interesting, but how? I don't even have a wireless router at home. I can't plug in the phone to the wired connection unless the wire can be plugged in to a Fire-wire port instead of an RJ-45.

Below are some methods I tried but none of them actually worked for my phone. (I hope sharing it may avoid someone else from going up the blind alley. Besides, who knows, it might work in other phones and wireless adapters which are different than mine.)
  1. Connect the phone to the wireless ad-hoc network created in the PC
  2. Install a "virtual router" software in my PC and connect the phone to that access point
  3. Tether phone to PC
Lets go through it one by one.
Note: All the methods below are tested on Samsung Galaxy Mini S5570 with Intel PRO/Wireless 3945 AGB wireless adapter.

1. Creating a wireless ad-hoc network in the PC

Ever tried to connect your smart phone to an ad-hoc network? Don't worry, this is my first time too.
So, what does an ad-hoc network do?
It simply creates a local area network between two devices allowing them to communicate directly. It doesn’t matter whether both the devices are PCs, or one device is a PC and the other is a smart device, or both are smart devices.

Of course you can create a wired LAN between two devices, which I’m gonna discuss under the topic “tethering”, but here I tried a wireless ad-hoc network because it's much more portable.
An ad-hoc network can be used to connect many devices together as shown below.

An ad-hoc network

Note: The diagram is taken from here.

After connecting phone to the PC, I will also be able to use my PCs internet connection and connect to internet as usual. First of all I needed to create a Wi-Fi ad-hoc network in my PC. Here are the steps I followed in doing so. I turned on Wi-Fi in my Android and waited until it detects my PC's ad-hoc network. Wow, my phone actually did NOT detect it. I sometimes wonder why some phones are so dumb!

It's the searching time now. Sneaking a peek through some web sites I was able to find out that Android does not support wireless ad-hoc yet! But still there's some hope left. Underlying hardware can detect Wi-Fi. Only the operating system resting upon the hardware does not allow the hardware to detect the wireless ad-hoc.
Android uses wpa_supplicant file as an interface to connect to Wi-Fi. Thus, we have to edit wpa_supplicant file to poke the Android and say, "hey here's an actual network you can try connecting to".

Okay, to edit wpa-supplicant file (which is a system file) I needed a shell prompt. In order to access Android through a shell prompt, you have to do the following steps in your PC.

  1. Install adb in to your PC. (This comes by default if you've installed Android-SDK)
  2. Connect your phone to PC via USB.
  3. "cd" to the directory where adb.exe is situated
  4. Type "adb devices" and see whether your device is listed.
  5. Type "adb shell". Voila! You just got a command prompt for Android.

When I tried to change directory (cd) to where my wpa_supplicant file is located in, it said that I needed root permission to proceed further. Well, my Galaxy S5570 does not give root access by default (If you already have a rooted phone you will be able to change the wpa_supplicant fiile). I would have to root my phone and grab the root permission for my self. Going through lot of articles I found out that rooting may harm your phone. So I went on searching for a new answer, and would later come back to rooting if it leaves me no choice.

For the folks with rooted phones, you can try downloading a patch for wpa_supplicant file which can be found here. Then you can follow the steps I'm gonna describe now.

  1. In the shell prompt you obtained by typing "adb shell", type "locate wpa_supplicant"
  2. Copy the path (which indicates the directory inside which lies your wpa_supplicant). Usually the path would be /system/bin
  3. Type the following in cmd.
    • "adb push <source file> <destination directory>"
    • Eg: If the wpa_supplicant patch is located in "C:\Users",
      • "adb push C:\Users\wpa_supplicant /system/bin"
Now you can turn on Wi-Fi and check whether your Droid detects the ad-hoc network created by you. If yes, mission accomplished!
Note: I wasn't permitted to do this in my unrooted phone. Hence I cannot guarantee the output of the above method.

Since my phone cannot detect a wireless ad-hoc connection, my second attempt was to make my PC act as a wireless access point (Wi-Fi hospot). That means, I wanted my computer to act as a virtual wireless router. In doing so, you just have to install some software which makes your wireless network adapter a wireless access point.
Diagram above shows how a wireless router act as a wireless access point. Each device connected to the access point becomes a part of one local area network. Virtual router software makes your computer act like the wireless router shown above.
Note: The diagram is taken from here.

Following are some of the software I found out by Googling.

After installing the software I tried to create an access point but the software didn't allow me to create one. So I tried one of their official websites, which included the unsupported wireless cards. Yep, my wireless card, Intel PRO/Wireless 3945 AGB, was one of them. Why me!!!
Check the list here to see whether your wireless adapter is in the victims list.

If it's not included in the list, you can consider your self lucky. You can install virtual router software given above, and create a Wi-Fi access point as illustrated here. Voila, your machine is a Wi-Fi hot spot now. Go ahead, connect your phone to that access point, and ENJOY!

3. Tether Android to the PC

Since none of the wireless methods worked for me I thought of switching in to traditional wired mode. Tethering is another method to bring the phone and computer in to one local area network.
But there's one problem. Computer becomes the client there and my phone becomes the server. It means that my PC will be able to use my phone's network connection, but my phone will not be able to use the PC's internet  connection. Okay, this isn't exactly what I wanted. But lets explore it anyway.

Tethering is super easy. Follow these steps,

  1. Connect your phone to PC via USB.
  2. Make sure your phone is been detected by your PC. If it's not, you have to install the drivers which is normally shipped with the phone. (For Samsung they distribute a software called "Kies".)
  3. Go to Settings --> Wireless and Networks --> Tethering --> Tick "USB Tethering"
And you are done!

Tethering helped me later on, for one of my projects where I wanted to network the phone and PC locally.

Anyway, after all these effort, the next day my router got hit by thunder and I got a brand new wireless router from my ISP. How cool is that? My cat got to know about ways of connecting Droid to PC (my Curious Cat of course), and I was able to download all the apps available in the app store from anywhere inside my house. Yoo hoo :)

Thursday, December 1, 2011

What's this cat business?

Hello to all the curious cats out there, Welcome Home!

There is a saying among people, "curiosity killed the cat, but satisfaction brought it back"!  (I presume all of you have heard about it, about nosy cats.) Yesterday while having a chat with a friend I came across this, and the idea hit my mind, "why not I name my blog after this? It's all gonna be about curious stuff I'm coming across in my day-to-day life". So here I am, sharing my knowledge I've gained through curiosity, and to remind you that curiosity will not always kill the cat. :)