Augmented Reality using Flartoolkit with Away3D 4.0 (broomstick) and Flash 11

Software: Away3D 4.x

The Aryeh, Newbie
Posted: 03 October 2011 07:38 PM   Total Posts: 3

Hey Guys,

I’ve done some searching on these forums and Google with no results.  I’m looking to update my augmented reality application and I’d like to know if anyone has any insight into how I could get Flartoolkit up and running in Away3D 4.0 and Flash 11.  Currently I’m using Papervision and I’m experiencing considerable performance lag.  I was hoping with the advent of Flash 11 I could switch to Away3D and get some huge performance improvements.  Let me know if you guys have any input at all, and maybe you can point me in the right direction.  Thanks in advance for any help you could provide.

The Aryeh

   

Animaleante, Newbie
Posted: 04 October 2011 02:47 PM   Total Posts: 5   [ # 1 ]

I’ve done the exact thing you are trying to do yesterday.
I just wrote a Detector Class which is an almost exact copy of the FlarManager Example class that uses Away3D 3.6 to display models.
Stripped it of the 3d elements, and only used it to get the transformMatrix.

I can send it to you if you still have problems to understand it.

   

The Aryeh, Newbie
Posted: 13 October 2011 08:30 PM   Total Posts: 3   [ # 2 ]

Hey Animaleante,

I gave it a shot and I was having a little trouble sorting it out.  If you wouldn’t mind sending it or elaborating I’d really appreciate it.  Thanks for your help!

The Aryeh

   

Mr Margaret Scratcher, Sr. Member
Posted: 29 October 2011 03:44 PM   Total Posts: 344   [ # 3 ]

I was going to go throught and convert for Away3d 4 too, but if you;ve already done it…

   

Alan G., Newbie
Posted: 30 October 2011 09:01 AM   Total Posts: 1   [ # 4 ]

Hi guys,

If someone has some working code for Away3D 4.x I’d be gratified to see/get it.  The transformation code is completely unusable from the Away3D 3.4 version of the FLAR library.  I could see this working quite nicely if that part can be repaired; I’ve tried unsuccessfully so far to get it to work.

Thanks,
Alan

   

manuelbujes, Newbie
Posted: 04 November 2011 11:12 AM   Total Posts: 10   [ # 5 ]

Hi! i am trying to make it work too. All is right except this error:
not defined zoom on //this.zoom = 0.01 * this.flarProjectionMatrix.rawData[0];
how i can make it works??

   

manuelbujes, Newbie
Posted: 04 November 2011 11:43 AM   Total Posts: 10   [ # 6 ]

I have remplaced in FLARCamera_Away3D.as
this.lens = new PerspectiveLens();
this.zoom = 0.01 * this.flarProjectionMatrix.rawData[0];

for this

this.lens = new PerspectiveLens(0.01 * this.flarProjectionMatrix.rawData[0]);

//this.zoom = 0.01 * this.flarProjectionMatrix.rawData[0];

and run, but the FlarSource (Webcam Capture) appears above the 3D Object so its overlapping it,

this is the code that add to stage the camera view, but above the 3d object, I want it below it!!

stage.addChildAt(Sprite(_flarManager.flarSource), 0);

What i can do??

Thanks

   

Samuel Girardin, Member
Posted: 04 November 2011 12:56 PM   Total Posts: 74   [ # 7 ]

Hi,

I’m working on too… ! I was just wondering how you deal with the stage3d and displaying cam capture. As you know the stage3d is behind the stage. The only way I found, it ‘s to display the cam capture on a 3d plane(like a movie material).

We can now use cam capture in stagevideo(fp11.2 beta) (stagevideo is behind stage3d) , but no way to have a background alpha (molehill 2 ???).

I will post my source, when I will have something working !


Samuel

   

Samuel Girardin, Member
Posted: 04 November 2011 10:38 PM   Total Posts: 74   [ # 8 ]

Here is something working (not to bad) but still in dev :

http://www.visualiser.fr/blog/index.php?q=content/away3d-4-flartoolkit

It use FP11.2 beta with the new feature Camera.drawToBitmapData.

Samuel

   

Samuel Girardin, Member
Posted: 06 November 2011 11:15 PM   Total Posts: 74   [ # 9 ]

a test using asfeat : http://away3d.com/forum/viewthread/1292/

   

manuelbujes, Newbie
Posted: 07 November 2011 07:45 AM   Total Posts: 10   [ # 10 ]

Please i need the code source!! a lot of thanks!!

   

manuelbujes, Newbie
Posted: 10 November 2011 08:18 AM   Total Posts: 10   [ # 11 ]

I cant make view.backgroundImage works!! It’s correct?

myBitmapData.draw(Sprite(_flarManager.flarSource));
view.backgroundImage = myBitmapData;

Thanks!! How do you it?

   

manuelbujes, Newbie
Posted: 10 November 2011 10:08 AM   Total Posts: 10   [ # 12 ]

I try this too but don’t work, when i put a embed image as background works but when i try to pass each frame of the webcam i only see a blank screen. PLEASE HELP!!!

private var webcam:Camera = new Camera();
private var video:Video = new Video(640, 480);
private var snapshot:BitmapData=new BitmapData(640,480);

webcam = Camera.getCamera();
webcam.setMode(640, 480, 30);
video.attachCamera(webcam);

OnEnterFrame
snapshot.draw(video);
view.backgroundImage = snapshot;
view.backgroundImageFitToViewPort = true;

THANKS!!

   

manuelbujes, Newbie
Posted: 10 November 2011 11:05 AM   Total Posts: 10   [ # 13 ]

I try also to creat a bitmap material with the flar source for a plane but doesnt work (BLANK SCREEN):

myBitmapData.draw(Sprite(_flarManager.flarSource));
plano.material = new BitmapMaterial(myBitmapData);

THANKSS

   

Samuel Girardin, Member
Posted: 17 November 2011 03:29 PM   Total Posts: 74   [ # 14 ]

I ve uploaded my code for flar :

http://www.visualiser.fr/blog/index.php?q=content/away3d-4-flartoolkit

Samuel

   

caiodv, Newbie
Posted: 18 November 2011 06:34 PM   Total Posts: 2   [ # 15 ]

Samuel,

I’m trying to use your code with flash player 11, normal video instead of stageVideo, I’ve got everything working but the fps is really low, around 10-11.

I saw your video and yours was about 14-15, have you managed to improve it?

From what I can tell, it starts to slow down here:
detected = false;
  try {
  detected = View.ar.detector.detectMarkerLite(View.ar.raster, View.ar._threshold) && View.ar.detector.getConfidence() > 0.5;
  } catch (e:Error) {}

Does anyone have an idea to improve this?

Thanks!

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X