Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problem with getting the Camera to work on Away3DLite

I have implemented Augmented Reality application for android using Adobe Air for Android, FLARManager, Away3DLite. The program works fine on flash, However when i publish it on my mobile phone (HTC Nexus One) or run it on the emulator my camera doesn’t activate and all i can see is the colour of my background and the framerate display.

I think that the problem is the Camera3D that i have used which is the FLARCamera_Away3DLite from FLARManager.

This is how I set my camera

import com.transmote.flar.camera.FLARCamera_Away3DLite;

private var camera3D:FLARCamera_Away3DLite;

this.camera3D = new FLARCamera_Away3DLite(this.flarManager, new Rectangle(0, 0, this.stage.stageWidth, this.stage.stageHeight));

I will really appreciate any advice i can get from you.

Thank you George

like image 606
Apollon1954 Avatar asked Feb 07 '11 15:02

Apollon1954


1 Answers

I think that you think wrong of the camera class. The camera class you use is the camera in your "virtual" 3d world and it is filming your 3d world. The "film" it then makes goes to the View class which can show your 3d world to 2d. Your screen is a 2d screen and is not capable of showing 3d. The camera class in combination with the view converts your 3D scene to a 2D image what is shows on your screen.

But since you want to make an AR app you mean the camera of the phone. You cant use the Away 3d camera class for this. This tutorial shows how to use the camera of your andriod phone in flash.

The steps you want to take is that you get your phonecamera feed, and past this on the screen. Then use the FLARtoolkit to determine the position of your marker. And then adjust the 3D model to the position of the marker. And last but not least show the 3d model on the screen (using the away3d/papervision camera and view). So basically you got 2 layers in you flash app. 1 background layer which is the feed of your phonecamera and the other layer (on top of it) is your view from away3d or papervision.

I think if you combine those tutorials you can make your application:

  • Use your phone camera
  • Augmented Reality with FLARManager
  • AR basics
like image 139
SynerCoder Avatar answered Sep 27 '22 17:09

SynerCoder