环境
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
物理环境
为众多不同的空间设计相同的体验
让用户清楚地了解您的应用需要多少空间。您能将它用在自己的大腿、餐桌或足球场上吗?向他们展示理想的使用条件。您可以在 Play 商店中添加预览图片,或在应用本身中添加说明。
考虑应用可能会使用的所有地方仍然很有帮助,从小公寓到大片田野,不一而足。准备好应对大大小小的空间、家具或交通等现实障碍,以及身体挑战。
公共空间也提供一系列自己的 AR 挑战。跟踪和遮挡变得困难,具体取决于周围物体和人员的数量。此外,手机移动和 AR 沉浸感可能会分散注意力或危险。
虚拟环境
增强环境结合了通过设备相机拍摄的真实图像与虚拟内容(例如数字对象或信息)。
当您的手机在现实世界中移动时,ARCore 会跟踪手机相对于周围环境的位置。此过程称为并发测距与映射 (COM)。
ARCore 会查看摄像头图像并检测视觉上的显著特征(称为特征点)。然后,它会利用这些点来确定自己在位置上的变化。这些视觉信息会与设备的惯性测量数据结合,从而估测随时间推移相机相对于周围环境的姿态(位置和方向)。
通过将呈现 3D 内容的虚拟摄像头的位置与设备摄像头的方向对齐,ARCore 可以从正确的视角渲染虚拟内容。这种虚拟图像叠加在实时拍摄的图像上,使虚拟内容看起来如实呈现。
持续发现
ARCore 一直在不断提高它对现实世界环境的理解。
它会构建您的空间模型,随着手机四处移动,相机捕捉空间的新部分以及关于该空间的新细节,从而为所填信息添加内容。ARCore 会识别并聚类看起来位于常见水平和倾斜表面上的特征点,并将这些表面作为平面提供给您的应用。

环境限制
目前,以下限制可能会妨碍对 Surface 的准确理解:
- 没有纹理的平坦表面,例如白色桌子
- 光线昏暗的环境
- 极其明亮的环境
- 透明或反光表面,如玻璃
- 动态或动态表面,如草叶或水中的涟漪
在用户遇到环境限制时,请说明问题所在,并引导用户正确采取行动。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eAR app experiences should be designed to adapt to various physical spaces, from small rooms to large, open areas, and consider real-world obstacles and challenges.\u003c/p\u003e\n"],["\u003cp\u003eAR technology uses the device's camera to combine real-world images with virtual content, tracking the phone's position and rendering virtual objects in the correct perspective.\u003c/p\u003e\n"],["\u003cp\u003eARCore continuously learns and maps the environment, recognizing surfaces and updating its understanding as the device moves; however, certain environmental conditions can limit its accuracy.\u003c/p\u003e\n"],["\u003cp\u003eWhen environmental limitations affect the AR experience, provide users with clear feedback and guidance.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers need to consider the ideal conditions for using their AR apps and provide users with clear instructions or preview graphics to set expectations.\u003c/p\u003e\n"]]],["Developers should design AR apps adaptable to various physical spaces, from small rooms to large areas, accounting for obstacles and potential public space challenges like tracking issues and user safety. ARCore tracks a device's position using feature points, creating a model of the space, and identifying surfaces (planes). It renders virtual content from the correct perspective, combining the real and virtual world. However, limitations such as featureless, dim, reflective, or dynamic surfaces can affect tracking accuracy and the model's quality.\n"],null,["# Environment\n\nPhysical environments\n---------------------\n\n### Design one experience for many different spaces\n\nGive users a clear understanding of the amount of space they'll need for your app. Can you use it on your lap, a kitchen table, or a football stadium? Show them the ideal conditions for using it. You can include preview graphics in the Play Store, or instructions in the app itself.\n\nIt's still helpful to consider all the places that your app might be used, from a small apartment to a vast field. Prepare for large and small spaces, real-world obstacles like furniture or traffic, and physical challenges.\n\nPublic spaces provide their own set of challenges for AR. Tracking and occlusion become difficult, depending on the number of objects and people around. Also, phone movement and AR immersion can be distracting or dangerous.\n\nVirtual environments\n--------------------\n\nAn augmented environment combines a real-world image captured from a device's camera with virtual content, such as digital objects or information.\n\nAs your phone moves through the world, ARCore tracks the phone's position relative to the world around it. This process is called concurrent odometry and mapping, or COM.\n\nARCore looks at a camera image and detects visually distinct features, called feature points. Then it uses these points to figure out its change in position. The visual information is combined with inertial measurements from the device to estimate the pose (position and orientation) of the camera relative to the world over time.\n\nBy aligning the pose of the virtual camera that renders 3D content with the pose of the device's camera, ARCore renders virtual content from the correct perspective. That virtual image is overlaid on top of a live camera image, making the virtual content appear as part of the real world.\n\nContinuous discovery\n--------------------\n\nARCore is constantly improving its understanding of the real-world environment.\n\nIt builds a model of your space, adding to that information as the phone moves around and the camera picks up new parts of the space, and new details about it. ARCore recognizes and clusters feature points that appear to lie on common horizontal and angled surfaces, and makes these surfaces available to your app as planes.\n\nEnvironmental limitations\n-------------------------\n\nFor now, limitations that may hinder accurate understanding of surfaces include:\n\n- Flat surfaces without texture, such as a white desk\n- Environments with dim lighting\n- Extremely bright environments\n- Transparent or reflective surfaces like glass\n- Dynamic or moving surfaces, such as blades of grass or ripples in water\n\nWhen users encounter environmental limitations, indicate what went wrong and point them in the right direction."]]