Problem with getting the Camera to work on Away3DLite
Asked Answered
M

1

7

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

Mashie answered 7/2, 2011 at 15:40 Comment(6)
Have you tried to add listener for error events when you load your collada? BTW, I would rather use Away3D instead of Papervision3D. Away3D is more optimized with a lower memory footprintPerchance
@Florian F Thank you for your advice. Do i need FLARManager in order to use Away3D? I found Away3D Lite is that better u think?Mashie
I've never used FLARToolkit so I don't know is there is dependencies with Papervision classes. Yes Away3D Lite is what I was talking aboutPerchance
@Florian F Thank you very much i hope it will help!Mashie
@Florian Can you please help me of how to set the camera on away3dLite in order to be working outside flash. For example on my Android mobile (HTC Nexus One). Thank youMashie
@Mashie Too see something you do realise that you need a view? I am at my company @ internship now,, but I'll take a closer look when I get home.Estradiol
E
3

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:

Estradiol answered 10/3, 2011 at 11:34 Comment(5)
@Estradiol Thank you for your answer. I have wathed all the previous videos but even that my application doesn't work on my Android phone. I have implemented the application using papervision3D and the camera works fine but the application was too slow and it crashes. The problem that I have is to mix all this staff with Away3DLite in order to get it work on the Android phone. I couldn't find any application or tutorial for Augmented reality that uses Away3DLite for Android and I'm thinking if that is coincidence or there is an other reason.Mashie
@Mashie sorry but I don't know any much more. I don't have a android phone myself so I can't start programming and test things. But if you have any flash related errors or exceptions I think I can help you. (Wanna have a droid phone as my next phone)Estradiol
@Estradiol I would like to ask you if you can help me of how to combine both cameras like the video you posted in order to implement the application for the android phone. I have watched the previous videos but i'm getting two cameras on my swf and where the flash camera is behind Camera3D. Do you know any online tutorial that will help me on this situation?Mashie
@Mashie As I here it the view and the webcam feed are in the wrong order (or I am not understanding your problem right) To fix this you need to find the place where you add your webcamfeed and view to the stage. First add the webcamfeed then the view. If this is not correct then plz edit your question and post some code so I can understand your problem. (or a screenshot or something so I can understand it)Estradiol
@Estradiol I have posted the question again with some code explanation. You can check this out on the following link: #5286949 I will really appreciate if you can help me on this situation since the last two weeks I'm trying to solve it by my self without any luck.Mashie

© 2022 - 2024 — McMap. All rights reserved.