Very nice tutorial about this subject by David Kong:

http://vimeo.com/104554788