Sunil's Blog

Icon

Oh My Bosh! Design Your Very Own Chris Bosh Paper-Robo in Augmented Reality – Adding Interactivity to Your AR Apps

bosh_lbj

With Chris Bosh’s  contract with the Raptors expiring soon, there’s been a lot of talk of him being shopped around next season. Sources say that the Cleveland Cavaliers have targeted Bosh to play along side King James.

While I don’t want to see Chris leave Toronto, it wouldn’t surprise me to see him follow the path of other marquee players before him : Stoudemire (he was big back in the day), Carter, McGrady and Camby.

Where do you think Chris will go?

With this latest flar demo you can make your predictions by redesigning his jersey in AR, download the parts to your desktop, and print/assemble your own Paper-Robo! You can also upload your own custom skin to preview what the robo will look like in AR.

For anyone who designs a killer Bosh skin through this app or even better photoshop, please send them my way and I’ll post them here! I bet some of CB4′s twitter army could make some sick custom bots.

Here’s a link to the live demo to try yourself:

Bosh Demo

Direct your iphone here (don’t waste paper, if you can help it!!):

Download Bosh Marker

Download Bosh Paper-Robo Parts

CODE SNIPPETS:

Adding mouse events to collada models and manipulating materials

This functionality is simply an extension of the helloMouse3D example that ships with the Papervision3D libraries. The only difference here is that instead of manipulating the material of a Papervision3D primitive, you are manipulating the material of a 3D collada model.

One thing I discovered is that material lists for colladas are wonky, and in order to add interactivity to 3D models  you have to add listeners directly to the to the mesh associated with that material and only when the model has completely loaded. As you can see be the live demo, the focus of the mouse on the model sometimes gets lost. I suspect that this is due to the collada model I’m using which has been to hell and back to get it rendering properly in Papervision3D. I built the model 2 years ago in Sketchup when either Papervision 1.0 or 1.5 around! From Sketchup I exported it as a collada, and brought it into 3DS max to make a uv map. I exported from 3Ds max as a collada, only to import the result into Blender, to obtain a collada with settings the Papervision3d can render.

When I have time I will try the demo with a simpler collada to see if this loss of focus is still a problem. If you have any ideas why I’m losing focus on my model please let me know!

public function addMarker(marker : FLARMarker) : void
  1.   {
  2.    // store marker
  3.    var markerList : Vector. = this.markersByPatternId[marker.patternId];
  4.    markerList.push( marker );
  5.  
  6.    var container : DisplayObject3D = new DisplayObject3D( );
  7.    robo = new Collada( FLARManager._GATEWAY + "/resources/models/myrobo4flippedblender.xml" );
  8.    robo.scale = .07;
  9.    robo.rotationX = 90;
  10.    robo.rotationZ = 90;
  11.    robo.z = robo.z100;
  12.    robo.addEventListener( FileLoadEvent.LOAD_COMPLETE, daeCompleteHandler );
  13.    container.addChild( robo );
  14.    this.scene3D.addChild( container );
  15.  
  16.    // associate container with corresponding marker
  17.    this.containersByMarker[marker] = container;
  18.  
  19.   }
  20.  
  21.   public function daeCompleteHandler(event : Event) : void
  22.   {
  23.  
  24.    robo.getChildByName( "Model" ).addEventListener( InteractiveScene3DEvent.OBJECT_MOVE, handleMouseMove );
  25.    robo.getChildByName( "Model" ).addEventListener( InteractiveScene3DEvent.OBJECT_PRESS, handleMouseDown );
  26.  
  27.    surface = new Sprite( );
  28.  
  29.    textureContainer = new Sprite( );
  30.  
  31.    __boshSkin = new boshSkin_mc( );
  32.  
  33.    __boshSkin.addChild( textureContainer );
  34.  
  35.    __boshSkin.addChild( surface );
  36.  
  37.    var mat : MovieMaterial = new MovieMaterial( __boshSkin );
  38.    mat.interactive = true;
  39.    mat.animated = true;
  40.    mat.allowAutoResize = false;
  41.    mat.updateBitmap( )
  42.    robo.getChildByName( "Model" ).material = mat;
  43.   }
  44.  
  45. public function handleMouseDown(e : InteractiveScene3DEvent) : void
  46.   {
  47.    //Start Drawing
  48.    if(surface != null)
  49.    {
  50.     surface.graphics.beginFill( __activeColour, 1 );
  51.     surface.graphics.drawCircle( vMouse.x, vMouse.y, 3 )
  52.     surface.graphics.endFill( );
  53.    }
  54.   }
  55.  
  56. public function handleMouseMove(e : InteractiveScene3DEvent) : void
  57.   {
  58.    if(InteractiveSceneManager.MOUSE_IS_DOWN)
  59.    {
  60.     //Continue drawing when the mouse is down
  61.     if(surface != null)
  62.     {
  63.      surface.graphics.beginFill( __activeColour, 1 );
  64.      surface.graphics.drawCircle( vMouse.x, vMouse.y, 3 )
  65.      surface.graphics.endFill( );
  66.     }
  67.    }
  68.   }

Flash Player 10 JPEG encoding

A colleague at work pointed me towards a JPEG Async Encoder class that allows you to to merge large BitmapData objects to form a large JPEG, getting around Flash player 10 BitmapData size restrictions. I didn’t need to encode something beyond 4,095 x 4,095 for this particular demo, but it’s useful to know that there is a work around.

Flash Player 10 reading and writing files locally

This demo uses a some new features of Flash 10, reading and writing files locally between the browser and OS without the need to write any server side code.

Using the FileReference.load() method you can allow a user to select a file locally and load it directly into the Flash plugin without having to upload it to a server.

FLARManager v0.5 (for FLARToolkit)

This is my first demo to include the newest FLARManager update. Eric Socolofsky has updated his framework to include some new optimizations, one of which is adaptive thresholding, which allows markers to be detectable in low light conditions.

AR Musings…

Is the wow factor is still there AR apps? Most offerings simply involve displaying a model on a glyph, which captures the user’s attention for about 2 minutes. There are a few hoops to jump through, in order to get a user to interact with an AR app: you have to print out a marker, need a webcam or have to download a specific plugin to view AR content (not as big a deal these days with broadband connections). Also imagine all the sheets of paper used around the world for a website that promotes renewable energy resources! I’m not sure what the solution is for saving our trees, other than offering digital versions of as AR marker that could displayed on a mobile device…Alternately, AR websites could offer a keyboard shortcut that mimics a marker without having to print it out.

Here are some interesting examples of interactive AR apps that have popped up recently that have started to push AR beyond displaying simple models in 3d space:

Eminem’s 3d Graffiti Art App:


Unic8′s use of  Bartek Drozdz‘s AS3Dmod library to bend primitives based on marker proximity and angle:

http://www.unic8.com/labs/flarmagnet-full-interactive-experience

The dev(s) at unic8 Studios have also done some interesting interactive AR demos with sound and light.

BMW Z4 3D paintbrush

FITC Toronto 2009 Top Ten Round Up

I just got back from volunteering at FITC Toronto 2009. I HIGHLY recommend volunteering. It’s a great way to attend the sessions for free and meet amazing new/old talent in the interactive field. I’ve come away from the conference with a lot of new ideas that I can’t wait to try.

Here’s my list of things that were cool to me in no particular order:

1) Papervision X – Ralph Hauwert
- 3d renderer optimized for Flash Player 10
- Ralph used Alchemy and Pixel bender to run Quake in Flash at 60 FPS!!

2) Colin Mook – Your Phone is Your Controller

- http://www.playmegaphone.com/
- http://unionplatform.com/intro.html

3) Sourcebinder
- http://sourcebinder.org/
- drag and drop node based programming
- break out game built on the fly with audience interaction using a webcam

4) Gary Stasiuk – Visual PV3d
- Flash Visualization Application that provides a GUI interface to create and manipulate objects in 3D scenes using Papervision3D

Vizual PV3D from Juxt Interactive on Vimeo.

- http://www.juxtinteractive.com/_download/vizualpv3d.zip

5) Vector Vision
- allows you to use vectors in Papervision
- http://blog.barcinski-jeanjean.com/2008/05/16/vectorsvision-vectors-in-papervision3d/
- http://www.barcinski-jeanjean.com/entries/vectorvision/SvgExample.html

6) Golan Levin and Zach Lieberman
- Augmented Reality Magic 1.0

7) Jared Ficklin
- music visualization through physical objects
- nirvana songs visualized on paper show similarities between songs; verse – chorus – verse
- showed 4 patterns and asked which one was likely a nirvana song, the one most similar was actually a foo fighters song!

8) Mario Klingemann
- bitmap manipulation turning ordinary bitmaps into Van Gogh like paintings.
- http://www.aviary.com
- using Keith Peters minimal components

9) Pixel Bender Game
- http://www.kongregate.com/games/GlaielGamer/closure

10) The Spark Project – Japanese Flash Community
- http://www.libspark.org/wiki/WikiStart/en
Photorealistic AR

Me too (doing some AR stuff)! from Anatoly Zenkov on Vimeo.

Frocessing
- Processing like AS3 drawing library
- http://www.libspark.org/wiki/nutsu/Frocessing/en

BetweenAS3
- new tween engine that performs better than the major players tweener, tween max…
- http://www.libspark.org/svn/as3/BetweenAS3/trunk

SWFWheel
- support for mac scroll wheel no javascript required
- http://www.libspark.org/wiki/SWFWheel/en

Adidas Paris – 3D Shoe Designer with Gesture Tek Interface?

Welcome to my first blog post, in the post-IMM era! Right after the IMM Open house and volunteering at FITC 2008 Toronto, I parachuted out of Toronto with my girlfriend for a much needed vacation to Paris (France not Ontario). I had a relaxing vacation away from my computer for 8 days.

While I enjoyed the wine, crepes with nutella and croissants, I also stumbled across something neat at the Adidas Store on the Champs-Elysées while I was there. They had what looked like a Gesture Tek installation right in the middle of the store, where you could design your own shoe. These kids ran up to the screen thinking it was a touch screen, a la iphone. They were clearly lacking the appropriate training required to operate such a display! Having come across Gesture Tek displays before in our multimedia pioneering class, I decided to put on a clinic. It was funny seeing people stop in their tracks while I created my own personalized Toronto Raptors sneaker, using a user interface that screamed Minority Report. After you create your shoe, you could save it in a gallery and walk over to a “virtual mirror” and see what it looks like on your foot. Unfortunately, the “virtual mirror” was broken, so I only got to play with the interface. Thank you to my wonderful girlfriend Kerrie who filmed me looking like a dork.

Adidas Paris – Shoe Designer with Gesture Tek Interface from insultcomicdog on Vimeo.

I’m already thinking of ways to port this over to a Papervision 3D project using Dan Zen’s motion cursor classes as a user interface. You have already seen examples of the motion cursor classes used in Rock Revolution a project I built with my classmate Nick Poison. I don’t think motion cursors have been implemented with Papervision 3D yet, so hopefully I’ll come up with something neat.

Buzzwords and Social Media Sluts

Social Media is media that encourages conversation, community, and collaborative content creation. This fits IMM’s mandate, which is to create interactive content beyond navigation.

Wayne MacPhail, is a social media consultant who gave a talk on Mashing Up Social Media and the DIY Community.

Web 2.0
He presented Web 2.0 as a marketing term, which encompasses: community collaboration, shared content, single tasks, clean clear interface, tagging and social bookmarking.

Web 2.0 has also been referred to as the second bubble (the first being the Dot-Com bubble era of 1995-2001), where too many companies attempt to develop the same product without a business model.
I found this funny parody while researching Web 2.0: Here comes another bubble.

What is the target audience is of Twitter? I consider myself a tech geek, and I seem to have missed the Twitter bandwagon. I correlate Tweets to things like MSN personal messages or Facebook status updates, neither of which I have time to update.

You don’t use a social network, you become part of it:
A company can’t use a site like DIGG.com to promote their products. In order to get your content Dugg you must have a lot of Digg power, which comes from a high percentage of popular submissions. If a user tries to submit their own content, it’s usually buried by the community and labeled as blog spam.

Wayne presented us with a barrage of new Social Media services.

A global visualization of tweets using Google Maps.
http://twittervision.com/

Aggregates flakes of your existence from a variety of personal RSS feeds. It is a social life RSS feed that projects your footprint on the web.
http://jaiku.com/

Start your own live broadcast using content from around the web or your own webcam, and assemble a dream team of producers.
http://www.mogulus.com/

Sprout is the quick and easy way to build sophisticated multimedia content, including mini-sites, widgets, mashups…
http://sproutbuilder.com/

Share and discuss your news instantly.
http://www.utterz.com/

Stream live video fast to the world. Right from your phone.
http://qik.com/

From Analog to Digital: The Royal Ontario Museum and Steve Mann

Our field trip to the ROM brought back memories from grade 6, when our ancient civilizations class went on a field trip to look at various skulls of early humans. Clearly the ROM has changed a lot since grade school, the most dramatic of which is the addition of the Michael Lee-Chin Crystal . It’s somewhat sad to see that the shuttered McLaughlin Planetarium which has been slated for demolition, is currently being used to store furniture.

I expected to see some cool interactive displays not unlike ones we’ve see in class before by Zach Booth Simpson, where kids play with virtual butterflies or virtual calders. While the dinosaur exhibits did have some “touch” displays to present content, they were by no means pioneering. I understand the challenges the ROM faces when it comes to keeping up with changing needs of new media.

Our class met with Brian Porter, who is the senior director of new media at the ROM. He came to the ROM in 1999 with a journalism background, and helped transition the museum from analog to digital.

The ROM is a charity that receives funding from the government and private donations. The work environment is “cultural” as opposed to “corporate”.

Obstacles to developing leading edge interactive content:

- debt of the Crystal outweighs the support for the New Media Department

- no room or resources for research and development

- hard to do “cool” things with old technology

One of the ROM’s current projects is to create a digital photographic archive of their over 6 million specimens. Proposed business models would be licensing the photos like stock photography or using the archive for an e-learning extension where teachers to find curriculum materials.

After the ROM, we visited Steve Mann‘s workshop. While I had heard of him being billed as the “human cyborg,” it didn’t register with me until he open the door with his head gear on.

The Human Cyborg

I was interested to hear him explain what he was seeing/recording/filtering with his head gear, but it appears as though his current research focus is away from cyborgism.

Steve presented Nesse, a interactive multimedia flute that uses water instead of air. You get wet while playing and listening to this instrument!

Pachelbel’s canon

The tone of the instrument shifts when the user blocks one or more of the jets. The “soft” keys can be pressed in a multitude of different ways to produces subtle changes in volume, tone and timbre.

The largest of these installations can be found at the Ontario Science Centre:

FUNtain


About Me

I'm currently a Flash Developer in Toronto, Ontario. This blog is a resource library and journal, researching emerging new media and whatever else I see fit. Some of my personal and professional work.

Twitter