使相机在 Away3DLite 上工作时出现问题

发布于 2024-10-16 09:22:44 字数 543 浏览 1 评论 0原文

我使用 Adob​​e Air for Android、FLARManager、Away3DLite 为 Android 实现了增强现实应用程序。 该程序在闪光灯上运行良好,但是当我在手机(HTC Nexus One)上发布它或在模拟器上运行它时,我的相机没有激活,我只能看到背景的颜色和帧率显示。

我认为问题出在我使用的 Camera3D 上,它是 FLARManager 中的 FLARCamera_Away3DLite。

这就是我设置相机的方式,

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 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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

长梦不多时 2024-10-23 09:22:45

我认为你对相机类别的看法是错误的。您使用的相机类是“虚拟”3d 世界中的相机,它正在拍摄您的 3d 世界。然后它制作的“电影”进入 View 类,它可以将 3d 世界显示为 2d 世界。您的屏幕是 2d 屏幕,无法显示 3d。相机类与视图相结合,将 3D 场景转换为屏幕上显示的 2D 图像。

但既然你想做一个 AR 应用程序,你指的是手机的摄像头。您不能为此使用 Away 3d 相机类。 本教程展示了如何在Flash中使用andriod手机的相机。

您要采取的步骤是获取手机摄像头源,并将其显示在屏幕上。然后使用 FLARtoolkit 确定标记的位置。然后将3D模型调整到标记的位置。最后但并非最不重要的一点是在屏幕上显示 3D 模型(使用away3d/papervision 相机和视图)。所以基本上你的 Flash 应用程序中有 2 层。 1 个背景层是手机摄像头的源,另一层(在其顶部)是您从away3d 或papervision 看到的视图。

我认为如果您结合这些教程,您可以制作您的应用程序:

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:

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文