Tuesday, August 31, 2010

AR on Android

I was tinkering with this last week, thought i'd finally share it here..
for now there are two AR apps that load up 3d models(there are other AR apps on the market place, but they usually just super-impose text boxes and pics..(Layar, Wikitude, etc) Anyway, as part of my job is to develop crazy content for the web, i had been developing AR content based in papervision and flash for the past 4-6 months now.. so naturally i wanted to know how to do it for android :)

Here are the two apps-

AR App 1- UnifeyeDemo by Metaio
If you've read my previous posts on AR you might have come across the Mini Cooper AR experience, well that was done with Metaio's proprietery AR tools. so no surprise that they would have an android solution too :rolleyes:
anyway to get the app,
search for "unifeye demo" on the market,
or use this QR code

this will get you the app , but you'l also need to printout a few ar markers from their site here
This is what you get to see:

the model is fully textured, animated and has sounds too!

AR App 2- AndAR Model Viewer by tdomhan and suzyque
This is the only app i found that let you load your own 3d models on your phone..
you can search for "Andar Model Viewer" on the market,or click here

it comes preloaded with a few models of its own, and also lets you navigate the sd card to select your own 3d models(currently only supports OBJ files, but recognises most textures).. just remember to export your model with triangular faces.. it has issues with polygons of more than 3 sides.

i modelled this low-poly mech tank a while back,

and loaded it up successfully. converting it to obj took some work though.. a direct export from max doesn't work, inspite of selecting the "triangles" option

finally ended up exporting as 3ds and converting that file to Obj using Meshlab..

anyway heres what that looks like:

like i said it comes with a few models preloaded.. for some reason the textures were not loading on some of them. anyway it worked with my models..
to load your own obj files scroll down to the "select a model file" option

when you click it will use "OI File Manager" to navigate your file system, if you don't have it installed it will send you to the marketplace to get it..

after you install it just navigate to the file you want to load.. in my case its called "walker_phn_.obj"
note: the texture file should not have any special characters in the file name or it won't load.. hence mine is just called "walkeruv.jpg"

once selected, click ok, and then wait as it loads the file.. takes 10-15sec
and then
tadaa! of course my models alignment appears to be a bit off center.. but its loaded with textures nonetheless..



i know by now most people find AR to be quite gimmicky, but for me its always amazing to see :)
the downside for now is that OBJ files don't support animation.. :( so will have to wait for froyo.. then flash.. then will have to see if flash on android will support papervision or not..

blurry video of it in action - in video mode my point and shoot can't maintain focus on the screen.. keeps auto focusing on the shiny phone and reflections and stuff

UPDATE (April13 2011) :

as per request, ive added the 3d models and texture maps i used, for you all to try out. remember to put all three (.obj , obj.mtl and .jpg files)onto the root directory of your sd card
right click and save this link -
for phone.zip

Thursday, August 19, 2010