Planet Manipal

September 01, 2010

Playing Pong on a Laptop Using Mobile Phones as Paddles

About a week back (while getting bored sitting in a java lab) me and Mudit were thinking of some simple project ideas to do over the weekend.So after some very wacky (when i say wacky i mean really over the top stupid) ideas we finally settled down on making pong but with a twist. We decided that instead of running it on one screen as it is usually done we will make the game area a lot larger buy using screens from various networked computers to make a very long but very awesome pong table.Next we decided to control the paddles not by using traditional keyboard keys but by making use of the accelerometer commonly available on most phones now-a-days.The idea was to control each paddle with separate phone by using the accelerometer on the phone to detect the motion of the phone and sending the data via a TCP socket over a wireless network to the computer running the game.

So we started working on the idea and after some time Mudit lost interest and gave up the idea so i went and asked Ankur (a.k.a OS) if he was interested in doing the project. He seemed pretty into the idea and so we stared first trying to narrow the choice of mobile OS we were going to use. We wanted to use android but left that as none of us actually had an android device (me having a Samsung Wave S8500 running bada OS, and Ankur having a Nokia E61i). As the E61i did not have a accelerometer we went for bada OS as the platform of development.I wrote the bada OS app part and ankur did the coding for the game running on the computer.

After some really silly mistakes like trying to load a x86 binary on an ARM architecture phone and trying to connect to a socket on another system without turning on the network we finally got something running.We were able to make a basic ping pong game using C++ and get some sort of rudimentary physics running on it.Also we were able to read the sensor values on the phone and device a simple algorithm to calculate on how to move the paddle using these values.Obviously this is in no way complete and loads still needs to be done like providing multiple monitor support and improving the paddle motion algorithm and making the sensor data error free.Here is are a few videos of the first demo.








August 31, 2010

Experiments with Sanity

Mind and Body, Body and Soul (Part I) There was something off about it all. But he couldn’t point his finger at what it was exactly. His eyes blinked too slowly and sights rushed by in the seconds they stayed open. Anxious faces, stern expressions, closed doors, noisy corridors. People stared down at a body, whispering to themselves furtively, as if to keep a secret from the person sleeping on

August 30, 2010

Weekend Project II

In march i posted about a weekend project which involved controlling a small toy car using my cell phone, this is a similar one again implemented in few hours, here we are trying to play the awesome game of pong using the tilt sensor on Samsung Wave. The pong application running on Laptop is written in Qt (C++) and the application on the Phone is written using the Bada SDK.
The working is simple, the pong application running on Laptop requires phones to make a TCP connection to it. Phones just create a TCP connection to the application on PC and sends tilt sensor data to it, movement of paddles is done by the PC application based on the value it receives from the phones. It still requires better calibration and we will work on it after the exams are over (Education prevents you from doing cool things!!), there are a lot of ideas buzzing in our empty heads (according to our teachers!!) , the original idea was by Abhimanyu which we implemented.

if you cannot see the above video here and here are short demo of how it works.

PS – code and proper working for the previous and this weekend project will be posted soon!

Abhimanyu Kumar (BE2k7)

Character Animation

Character animation done in 3Ds max. Model of a soldier downloaded form the web. Rigged using biped and Physique Modifier.Applied some .bip (motion capture) files to it. Then and rendered it out in using mental ray with daylight system for shadows and lighting.


August 25, 2010

Understanding Kaizen and 5S : Japan’s widely acclaimed Key to Competitive success

This Article covers understanding what Kaizen and 5S basically mean, how and when they are supposed to be practiced, how they are instrumental in the success of an organisation and the importance this receives from the management. After going through this, you might feel that it is very basic and similar to its other English counterparts but on further dissection it would be clear that these are simply varied derivations of each other.

New Rupee symbol : Re-branding the Indian currency

This article covers the importance of symbol as highlighted by the government, how we zeroed-in on this symbol, what it means, where will we see the new symbol and how long will the transformation take. Additionally, this article also covers why the government decided to use the symbol now, what this symbol means for Brand India and how it would have to be achieved.

Commonwealth Games – Really worth it?

Hosting the Commonwealth Games in Delhi is not just about portraying the country's image to the world but much beyond. Also its success not only depends on the preparations but also how the investment is tackled with after the games are over. Read all about it and much more.

August 24, 2010

August 24, 2010

It was 1st of August, 2007, I joined Manipal Institute of Technology. I still vividly remember that day. Heavy rains and long walks to the lecture halls used to be as cohesive in our lives as the same daily menu of egg curry and 'coconut' chicken! I had heard so much about college life and here I was experiencing it first hand.

Days passed quickly, we were hoping from one set of sessionals to another; jumping between end semester exams and lab tests and before we could even realize; I am done with three years of my course. All of us used to ask ourselves the same question everyday, "How will we manage surviving for four years in this boring dull place?", and yet here I am, today, a student of final year, telling you that 1st August 2007 looks like yesterday.

I was sitting in one of my lectures, listening to everyone around me, of course professor excluded, when the idea for this entry struck me. I am not writing today to tell you about how much fun we had or to complain about college life coming to an end. I guess I have already done that in my last post. Today I am here to write about something different. Something that I have noticed over the past few weeks and something thats got me thinking!

I see my friends, my classmates, even people I do not know, and I feel that they have all somehow woken up from deep slumber! There is something about all of them that tells me that reality has caught up with all of them. Maybe this is what they mean when they say, "the rat race makes us a rat!". All of them have a look of fear and tense on their face. The topic of girls, crushes and alcohol seems to be a thing of past and have been replaced by what few would say, much more serious things like GRE, GMAT etc.

Everyone is either busy with their word lists or trying to configure routers on a simulation. Few have already aced the tests they took scoring 1550 in GRE while others have become Cisco Certified Network Associates (sounds pretty heavy)! Few of them are happy for being certified by Sun as Java programmers; while I sit here in front of my laptop singing praises for them!

I was always under the impression that the last year of college is meant for fun; after all it is supposed to be the last year of your life when you can sit and chat with your friends (or few with their girlfriends/boyfriends) till you pass out on their couch without worrying that you have to wake up early tomorrow or report to your boss. Well chats still happen, but now its mostly about placements, grades, scores and certificates.

All this has got me thinking about where I stand. I have not done any word list or any certification course; I was not even eligible for first few companies that visited my campus for recruitment. I sit back and I think. Where do I fit in? Looking back, these three years have been wonderful. There is nothing about them that i would want to change. Of course I would'nt mind a higher GPA or a few more certificates; but if I had to do it all over again; I would probably do it the same way. 

Was I too casual in my approach? Did I drift away? Did I go wrong somewhere? These are probably the questions that will haunt me and few others like me for sometime. I agree that there have been times when I could have probably been more serious but tomorrow when I look back, I am sure it will bring a smile to my face.

Cheers!!

PS I could not think of an apt title.

August 21, 2010

Mines in the ocean

Found a really good tutorial on mental ray lighting system (link).I changed the Torus Knot with a few mines designed by me as they look a lot better.

Here are my renders :

Sunset:


Night:


How much of rendering can HP 6515b take?

I set up this scene of a few virus like things floating in 3Ds max, put on some textures on them and added some depth of field effects(9 passes) and rendered it out.

The specifics of the scene are:
Faces:5566720
Lights: 6 (Ray Traced Shadows)
Image Resolution: 1920x1080
Renderer: Default scanline
3Ds Max Version:2009

Here is the system config:



It took about 54mins 52sec to render 1 image.


The System performance while rendering:




The Final Render :


Note:There have been images that have taken much longer to render on HP 6515B(some taking as long as 2hrs to render at 1920x1080). But this is the 1st that an image crossed 30mis using a the scanline renderer. All other images that took longer than that were done using mental ray.


Simple Cloth Simulation Using 3Ds Max

Cloth simulations is one of the coolest features of any 3D program.It is very simple to create basic cloth animations but it takes a lot of time to simulate cloth due to the huge amounts of processing power required.Here is a simple cloth simulation tutorial.

Step 1: Create a sphere (Position(X,Y,Z)=(0.00,0.00,0.00),Radius=20)



Step 2: Create a plane (Position(X,Y,Z)=(0.00,0.00,40.00),Length=50,Width=50,Length Segments=50,Width Segments=50)



Step 3:Select the plane(Plane01) and go to the modifier stack and add cloth modifier to it



Step 4:Click on "Object Properties" and using the dialogue box add Sphere01 to the Objects in simulation list.


Step 5:Select Plane01 and Sphere01 one by one change their properties as shown in the screenshots below.Click OK



Step 6:Click on "Simulate" to start the simulation.Change parameters like gravity and end frame to get result.(I used -4000 for gravity [earth's gravity being -980] and 500 frames.)This will create key-frames for the cloth (in this care Plane01) falling on the sphere and colliding.This has to be done only once and will take time depending on your system config.



Step 7:Put some materials and render out the result.



Note:You can increase the length and width segments to make it cloth smoother and more realistic but this will make the simulation process slower.

I used this same technique for this picture of the cloth covering a car.The cloth was a plane with 300 length segments and 400 width segments. The car and the ground were collision objects.