I was fooling around with the FLAR library yesterday and pulled together a simple proof of concept of integrating Flash and Unity to provide augmented reality.
Mac users, if you are having problems accessing your webcam, right click on flash, go to settings…camera. The built in camera is usually called USB Video device or something like that.
This is an initial approach. Now I intend to pass the video feed into a video texture. Any ideas are welcome. I was thinking pushing bitmap data though an external interface into unity, but I don’t know if the browser javascript is up to the task, or if the SendMessage() supports arrays at all.
My printer hasn’t been used for a while and I’m almost out of ink apparently, so the print out was pretty ugly. But it seemed to track it okay sometimes. And when it did, the scene moved and rotated very nicely.
I was trying to think of what this could be used for, when I remembered this video:
Yes, I would be geeky enough to glue your logo to my forehead to see a scene in 3d
Very coool! Been playing with AR in Director a little too… would be great if you could connect to camera with unity. Processing video images for AR should be faster than using Flash I think…
I remember w while back someone had something similar, but just Flash. Had a little green guy that jiggled around when you moved the camera.
But now, with Unity integration, it opens up worlds of possibilities.
Very cool man! I hope we see something more than a camera control tool out of this, though. What about taking the 3D model from Unity, and blue screening it into the flash video? That would be really cool!
(Oh, and lame computer framerate issues. I think it was the Unity scene you used. My Web R/C, right?)
Dakata. I´m using the exact same library as the green guy. I believe we can get full integration in two different directions:
by integrating the flash video feed into unity as a video texture. I´m scribbling on that one. This way I could overlay the 3d content on the video feed.
by developing through opencv ways to feed the video into unity plus building the AR libraries there. This one should be much more efficient, but I believe wonk work on the web, would it?
As for it being a camera tool it should be far from that. In the demo the camera is actually still. I´m transforming actually the object. I think some kick ass things can grow from here.
MacBookPro (Safari and Firefox), can’t change the flash camera setting to Built-In as the dropdown list of Cameras is cropped within the webpage frame.
Would love to check this out though… can you change the page layout?
I’m stuck in transferring the webcam image from flash to unity on the fly, nor unity supports a wmode = transparent to simply overly unity on top of flash, so I’m now looking at building a Artoolkit based plugin for the stand alone unity projects :S
Hi there.
Could you please tell me what are you camera settings in Unity and if you are adjusting the values coming from flash in any way ? I’m trying to set up something similar but having problems matching the position.
Really appreciate you help !
Thanks !
AR in Flash is indeed possible but not that fast and its an extra step.
I have heard of a library called OpenCV which should make this kind of stuff possible too.
The easiest way to do it is of course to use a WiiMote (be it an original or a wiimote where you desoldered the sensor and made your own electronics project with.
Wiimote can go 200fps for 4 blob tracking.
Unfortunately, it involves more work then printing out a tracker page.
I was allready investigating this WiiMote sensor to do for example motion capture. If it can capture 4 blobs at 200 fps, then with clever tricks it should be possible to track 4x4=16 markers at 50fps or 32markers at 25fps.