arcore_ARCore如何使您创建全新的用户交互类型

arcore_ARCore如何使您创建全新的用户交互类型

arcore

AR frameworks unlock new types of gameplay and user interaction. Here are some practical ideas to inspire you to start building. We encourage you to share your own creations with the community – we’ll be actively looking for great examples!

AR框架解锁了新型的游戏玩法和用户交互。 这里有一些实用的想法可以激发您的灵感。 我们鼓励您与社区分享您自己的创作-我们将积极寻找出色的例子!

Back in 2003, Konami released the Game Boy Advance title, Boktai: The sun is in your hands. The physical cartridge included a light sensor that you needed to expose to sunlight in order to charge your in-game weapon. Now, using light estimation in mobile AR frameworks like ARCore 1.0 for Unity, it’s possible to create gameplay just like that without the need of additional hardware — giving you access to millions of users with AR-enabled devices!

早在2003年,Konami发行了Game Boy Advance游戏名称Boktai:太阳在您的手中 。 物理弹药箱包含一个光传感器,您需要将其暴露在阳光下才能为游戏中的武器充电。 现在,在AR的移动AR框架(如ARCore 1.0 for Unity)中使用光照估算,就可以像这样创建游戏玩法,而无需其他硬件-使您能够使用支持AR的设备访问数百万用户!

Today, Unity developers can bring new forms of user interaction to life leveraging not only light-estimation, but features like motion tracking and environmental understanding.

今天,Unity开发人员不仅可以利用光线估计,还可以利用运动跟踪和环境理解等功能,将新的用户交互形式带入生活。

ARCore 1.0 for Unity makes it so much easier for you to create mobile AR experiences for Android by leveraging Unity’s tools and community.

利用ARCore 1.0 for Unity ,您可以利用Unity的工具和社区轻松地为Android创建移动AR体验。

We want to share some functional ideas that demonstrate the capabilities of ARCore 1.0 for Unity SDK, which we hope will inspire you to create your own use-cases and share them with our community. Start building today to reach millions of users with Android AR-enabled devices and unleash the creative potential of AR gameplay and user interaction.

我们想分享一些功能性思想,以证明ARCore 1.0 for Unity SDK的功能,希望它们能激发您创建自己的用例并与我们的社区共享。 立即开始构建,以使用支持Android AR的设备吸引数百万用户,并释放AR游戏玩法和用户互动的创造潜力。

How will you leverage Unity and ARCore to unleash your creative potential? Join the Unity Connect Mobile AR channel and share what you’ve been working on with a gif or video. Mobile AR is still very new and there’s lots of room to explore and build unique applications. We’ll be watching for the best ideas!

您将如何利用Unity和ARCore释放您的创造潜能? 加入Unity Connect移动AR频道并分享您正在处理的gif或视频。 移动AR仍然是一个非常新的领域,还有很多空间可以探索和构建独特的应用程序。 我们将寻找最好的主意!

The following are some of the features that help you get creative with AR.

以下是一些可帮助您增强AR创意的功能。

环境理解 (Environmental Understanding)

ARCore 1.0 for Unity provides a default grid that changes color for each new plane that it finds. You can easily modify the plane rendering by swapping out the TriGrid material texture.

ARCore 1.0 for Unity提供了一个默认网格,该网格会为找到的每个新飞机改变颜色。 您可以通过换出TriGrid材质轻松地修改平面渲染。

arcore_ARCore如何使您创建全新的用户交互类型

Default plane with new tiling heart texture

具有新平铺心形纹理的默认平面

If you want to modify the rendering further, you can change a single line of code in the PlaneGrid shader, you can also change the texture to one with transparency by returning the _GridColor * col. The colors are chosen randomly from an array in TrackedPlaneVisualizer.cs, so check that out if you have specific colors you want to use.

如果要进一步修改渲染,可以在PlaneGrid着色器中更改一行代码,还可以通过返回_GridColor * col将纹理更改为具有透明性的纹理。 颜色是从TrackedPlaneVisualizer.cs中的数组中随机选择的,因此请检查是否有要使用的特定颜色。

arcore_ARCore如何使您创建全新的用户交互类型

Modified shader and texture with transparency

修改的着色器和纹理具有透明度

1
2
3
4
5
6
fixed4 frag (v2f i) : SV_Target
{
    fixed4 col = tex2D(_MainTex, i.uv);
    //return fixed4(_GridColor.rgb, col.r * i.color.a);
    return _GridColor * col;
}
1
2
3
4
5
6
fixed4 frag ( v2f i ) : SV_Target
{
     fixed4 col = tex2D ( _MainTex , i . uv ) ;
     //return fixed4(_GridColor.rgb, col.r * i.color.a);
     return _GridColor * col ;
}

Don’t only superimpose digital objects, modify and change the planes to give your app a unique look!

不仅要叠加数字对象,还要修改和更改平面以使您的应用具有独特的外观!

定向点 (Oriented points)

With oriented points, objects can be stuck to all different types of surfaces at any angle. You can take ARCore outside and start to liven up the world.

通过定向点,可以将对象以任何角度粘贴到所有不同类型的表面上。 您可以将ARCore带到外面,并开始生活。

arcore_ARCore如何使您创建全新的用户交互类型

Android mascot stuck to a tree using oriented feature points.

Android吉祥物使用面向的特征点固定在树上。

Another unique use-case takes advantage of the way we render AR by lining up objects on either side of a wall to create an x-ray effect.

另一个独特的用例利用了我们渲染AR的方式,即将墙壁两侧的对象对齐以创建X射线效果。

arcore_ARCore如何使您创建全新的用户交互类型

Two virtual studs places on the wall then viewed from the opposite side

从墙的另一侧观察两个虚拟钉在墙上的位置

光线估算 (Light Estimation)

ARCore returns an ambient light value based on overall intensity of the pixels in the current camera frame. The SDK has special shaders that allow you to easily make any object’s shading adjust to its current environment. You can use take advantage of this to create a unique effect in which characters react to their current environment, as shown below.

ARCore根据当前相机帧中像素的整体强度返回环境光值。 SDK具有特殊的着色器,可让您轻松地将任何对象的阴影调整为适合其当前环境。 您可以利用这一点来创造独特的效果,使角色对当前环境做出React,如下所示。

arcore_ARCore如何使您创建全新的用户交互类型

The flower is sad because the ambient light-value is low.

这朵花很难过,因为环境光值低。

arcore_ARCore如何使您创建全新的用户交互类型

The flower becomes happy when the ambient light value increases.

当环境光值增加时,花朵就会变得快乐。

运动追踪 (Motion Tracking)

Motion tracking will play an increasingly important role in mobile AR apps. Imagine using proximity and motion as key drivers for minor interactions in your application, as demonstrated below.

运动跟踪将在移动AR应用程序中扮演越来越重要的角色。 想象一下,将接近度和运动用作应用程序中次要交互的关键驱动力,如下所示。

arcore_ARCore如何使您创建全新的用户交互类型

When the user gets close enough to a Cutie, it will trigger the wink animation.

当用户足够接近可爱时,它将触发眨眼动画。

Motion tracking is not limited to a small space, either. The device moves through the world understanding its own orientation and position. You can allows users to record motion paths simply drop markers behind them to retrace their path (as shown below).

运动跟踪也不限于很小的空间。 该设备在世界范围内移动,了解其自身的方向和位置。 您可以允许用户记录运动路径,只需在其后面放置标记即可追溯其路径(如下所示)。

arcore_ARCore如何使您创建全新的用户交互类型

Every meter a marker is dropped allowing a user to retrace their steps later.

每米都会放下一个标记,允许用户稍后追溯其步伐。

ARCore资源以及如何分享您的想法 (ARCore resources and how to share your ideas)

Share your ideas with the community and use ARCore 1.0 for Unity to create high quality AR apps for more than 100 million Android devices on Google Play! Here’s how.

与社区分享您的想法,并使用ARCore 1.0 for Unity在Google Play上为超过1亿个Android设备创建高质量的AR应用程序! 这是如何做。

  1. Setup ARCore 1.0 for Unity.

    为Unity设置ARCore 1.0

  2. Join the Unity Connect Mobile AR channel for an opportunity to meet, chat, and learn from other community creators working on AR apps.

    加入Unity Connect移动AR频道 ,有机会与其他使用AR应用程序的社区创建者见面,聊天和学习。

  3. Share a short use-case video or a gif with a description on the channel.

    在频道上分享简短的用例视频或带有说明的gif。
  4. Unity will be actively engaging in the channel and watching for the most creative ideas!

    Unity将积极参与该渠道并关注最具创意的想法!

GDC期间在旧金山? (In San Francisco during GDC?)

Attend one of our ARCore for Unity free hands-on workshops to learn how to master the SDK (Pixel devices will be provided/BYO Laptop). For more information, visit Unity at GDC.

参加我们的ARCore for Unity免费动手研讨会之一,学习如何掌握SDK(将提供Pixel设备/ BYO Laptop)。 有关更多信息,请访问GDC的Unity

Article Contributors: Brad Weiers, XR Technical Product Manager, Mauricio Vergara, Partner Marketing Manager

文章贡献者:XR技术产品经理Brad Weiers,合作伙伴营销经理Mauricio Vergara

翻译自: https://blogs.unity3d.com/2018/03/07/how-arcore-enables-you-to-create-brand-new-types-of-user-interaction/

arcore