PDA

View Full Version : Augmented Reality in Flash




polar-blair
Aug 13, 2009, 07:34 AM
I hope this is the right place to put this thread.

I have been looking at the new augmented reality flash sites that have been popping up at the moment and decided into having a look about making my own.

I had an idea that it would be cool to put a marker onto the back of a business card so the receiver of the card can be directed to a website and with a webcam the recipient of the business card can hold it up to the webcam and see a virtual image on the screen, but it looks like others have had the idea already.

http://blog.makezine.com/archive/2009/07/augmented_reality_businesscard.html

Well I decided to go and see if I could do something similar but the more I looked into it the more frustrated I became. First of all as far as I can tell you have to use papervision 3D which isnt compatible at the moment with CS4 (which I am using) then all the tutorials I can find use flex builder which I dont have.

I wasnt bothered having a 3D model, I would be happy just having a 2D image/movie on a 3D plane and thought I could just use flash's new basic 3D features for this instead of using papervision.

Does anyone know if it is possible to create an AR app just using Flash and the FLARtoolkit? or can they point me in the way of a tutorial I cant seem to find an appropriate one.



Ride9650
Aug 13, 2009, 08:51 AM
?
It may just be my laziness in fully executing what I've been meaning to do, but from what I can tell, Papervision works in CS4. I haven't put anything into my scene but I think it works cause the "Papervision 2.0" statement pops into my output screen

Assuming though, that it really doesn't
here is a tutorial

http://www.gotoandlearn.com/play?id=105

polar-blair
Aug 13, 2009, 09:03 AM
Appears I got confused by papervisons site and that the latest build dosnt work. I did some more hunting and found a tutorial and have got a AR working pretty well now, very excited. Only problem I am having is with the 3D model, I made a 3D model in photoshop CS4 and exported it as a .dae and it loads up in flash when in link the file but its only a wireframe. How would I get the textures to load?

I get this in the output message in flash when I run the SWF

INFO: Papervision3D Public Beta 2.0 - Great White (December 3rd, 2008)

Can't handle profiles other then profile_COMMON!
INFO: DisplayObject3D: COLLADA_Scene
INFO: DisplayObject3D: global_ambient_light
INFO: DisplayObject3D: Layer_3_copy_0

Ride9650
Aug 13, 2009, 10:25 AM
Appears I got confused by papervisons site and that the latest build dosnt work. I did some more hunting and found a tutorial and have got a AR working pretty well now, very excited. Only problem I am having is with the 3D model, I made a 3D model in photoshop CS4 and exported it as a .dae and it loads up in flash when in link the file but its only a wireframe. How would I get the textures to load?

I get this in the output message in flash when I run the SWF

I don't work with importing models at all, so I can't say with any certainty that this applies to your situation, but to the best of my knowledge, materials/textures have to be declared separately.

You then pass in the name of the material as a parameter to an object you're loading. For instance for a plane itd be something like

var plane:Plane = new Plane("materialName",200,400,2,2)

Maybe someone will come along that knows more than I do and will be able to help you out. In the meantime, I'd read up on the API and see if this is the case.

As to the output message, I don't know whats going on there.