使用仿真器为HoloLens开发

This is a guest blog post

这是访客博客文章

嗨,我是 IdentityMine / Valorem的 René,是 一位热情洋溢的开发人员,致力于3D计算机图形学的研究。 我已经从事VR和AR多年了。 随着所有令人惊叹的VR和AR / MR设备问世,这是成为使用Unity在身临其境的空间工作的开发人员的绝佳时机。 作为 Microsoft HoloLens代理就绪计划的一部分 ,我很幸运自去年以来一直从事HoloLens的工作,在这篇文章中,我想分享一些我们已经做的事情和我们学到的东西。 (Hi, I’m René from IdentityMine/Valorem and a passionate developer working with 3D computer graphics. I’ve been in VR and AR for many years now. With all the amazing VR and AR/MR devices coming out, it’s a great time to be a developer working in that immersive space using Unity. As part of Microsoft’s HoloLens Agency Readiness Program, I was lucky enough to have been working on HoloLens experiences since last year and in this post I’d like to share some of the stuff we’ve done and things we learned. )

My team and I are developing lots of different HoloLens apps and games for many different use cases. I can’t share all the projects we are working on but this video and the screenshots below give you a glimpse of the things we have been working on.

我和我的团队正在为许多不同的用例开发许多不同的HoloLens应用程序和游戏。 我无法分享我们正在从事的所有项目,但是此视频和下面的屏幕快照使您可以窥见我们正在从事的工作。

image03

We also recently released a little game for HoloLens called Tower Blocks. Tower Blocks was actually created by experimenting with two-handed interactions where we tried out new ways to transform holograms. We had so much fun playing it that we released it for free in the Microsoft Store.

我们最近还为HoloLens发布了一款名为Tower Blocks的小游戏。 实际上,Tower Blocks是通过实验双手交互作用而创建的,在其中我们尝试了变换全息图的新方法。 我们玩起来非常有趣,因此我们免费在Microsoft Store中发布了它

I also shared what I’ve learned in recent talks presented and recorded at Unity’s Unite Europe event and Microsoft’s //build conference as well as a few blog posts like Getting Started with HoloLens Development and Top 10 HoloLens Development Recommendations.

我还分享了我在Unity的Unite Europe 活动和 Microsoft // build会议上介绍并记录的最近演讲中所学到的知识, 以及一些博客文章,例如 HoloLens开发入门HoloLens开发建议十大建议

A good portion of the talks and posts covered best practices and other things I learned while working on a project called HoloFlight which is a near real-time flight data visualization for HoloLens using real-world topographic and flight data showing the data in 3D as holograms instead of flat 2D plots.

大部分演讲和帖子都涵盖了最佳实践以及我在HoloFlight项目中学习到的其他知识,该项目是HoloLens的近实时飞行数据可视化,使用真实的地形和飞行数据以3D全息图形式显示数据而不是平面2D图。

HoloLens仿真器 (The HoloLens Emulator)

At IdentityMine, we had access to some HoloLens devices but not all of our team had access to them, therefore most of HoloFlight was actually developed using the HoloLens emulator and the special Unity build for HoloLens, which everyone can download for free.

在IdentityMine,我们可以使用某些HoloLens设备,但并不是我们所有的团队都可以使用它们,因此,大多数HoloFlight实际上是使用HoloLens模拟器和特殊的Unity构建的HoloLens开发的,每个人都可以 免费下载

HoloLens is a Windows 10 device and the HoloLens emulator runs as a Hyper-V virtual machine. You can learn more about system requirements here. The human input like gestures and other sensors are simulated using the PC’s keyboard, mouse, or Xbox controller.

HoloLens是Windows 10设备,HoloLens模拟器可作为Hyper-V虚拟机运行。 您可以 在此处 了解有关系统要求的更多信息 。 使用PC的键盘,鼠标或Xbox控制器模拟手势和其他传感器等人类输入。

部署方式 (Deployment)

It is really easy to deploy a Unity game / app to the emulator. It just has to be built like a regular Unity app for HoloLens. Then from the Visual Studio output solution the right Platform and Target Device have to be selected from the dropdown:

将Unity游戏/应用程序部署到仿真器真的很容易。 它只需要 像HoloLens的常规Unity应用程序那样构建即可 。 然后从Visual Studio输出解决方案中 ,必须 从下拉列表中 选择 正确的 平台和目标设备

image06

仿真器输入 (Emulator Input)

The emulator can simulate positional changes (user walking), as well as rotational changes (user head rotating), gestures, hands and even voice commands.

该仿真器可以模拟位置更改(用户行走)以及旋转更改(用户头部旋转),手势,手甚至语音命令。

位置和旋转 (Position and Rotation)

The rotation can be simulated by pressing the left mouse button and moving the mouse. Positional changes can be simulated using the keyboard’s W, S, A, D and Page Up/Down keys.

可以通过按下鼠标左键并移动鼠标来模拟旋转。 可以使用键盘的W,S,A,D和Page Up / Down键来模拟位置变化。

手势和手 (Gestures and Hands)

The air-tap gesture can be simulated with a right mouse button click; if the Alt key is pressed while pressing the right mouse button, the tap+hold gesture for hand scrolling movement can be simulated. The built-in bloom gestures which brings up the Windows start menu is mapped to the keyboard Windows key.

可以用鼠标右键单击来模拟轻敲手势。 如果在按住鼠标右键的同时按下Alt键,则可以模拟手滚动动作的敲击+保持手势。 弹出Windows开始菜单的内置Bloom手势映射到键盘Windows键。

语音和语音识别 (Voice and Speech Recognition )

HoloLens is a Windows 10 device so it supports Microsoft’s voice-controlled assistant Cortana for speech recognition. This works well with the HoloLens emulator.

HoloLens是Windows 10设备,因此它支持Microsoft的语音控制助手Cortana进行语音识别。 这与HoloLens仿真器很好地配合。

还有更多 (There’s More)

Hand and head rotation and much more emulation features can be controlled even further. A detailed list of all simulated emulator inputs can be found here.

手和头的旋转以及更多的仿真功能可以进一步控制。 可以在 此处 找到所有仿真的仿真器输入的详细列表 。

空间映射 (Spatial Mapping)

Besides the fact that HoloLens is a fully untethered device, which can render holograms, another unique feature is that it constantly scans surroundings and performs a surface reconstruction providing a spatial map of the environment to your application. This feature alone is very impressive as you can see in this demo video when the virtual balls roll down in the real garden. Of course the emulator also supports spatial mapping and, even better, it can actually load different environments / rooms to test. These rooms can be extracted from a HoloLens device as .xef files, so you could use a HoloLens device, scan an environment, save it and then load into the emulator. For example the screenshot below shows a spatial mesh of a real-world staircase loaded into the emulator:

除了HoloLens是完全不受束缚的设备(可以渲染全息图)外,另一个独特的功能是它可以不断扫描周围环境并执行表面重建,从而为您的应用程序提供环境的空间图。 当虚拟球在真实花园中滚落时 ,您可以在 此演示视频中 看到,仅此功能就令人印象深刻 。 当然,仿真器还支持空间映射,甚至更好的是,它实际上可以加载不同的环境/房间进行测试。 这些房间可以作为.xef文件从HoloLens设备中提取,因此您可以使用HoloLens设备,扫描环境,保存环境然后将其加载到仿真器中。 例如,以下屏幕截图显示了加载到模拟器中的真实世界楼梯的空间网格:

image01

Which is similar to this when seen through the HoloLens device:

通过HoloLens设备查看时类似于以下内容:

image00

More details about the emulator and its Room feature can be found here.

有关仿真器及其“房间”功能的更多详细信息,请参见 此处

结论 (Conclusion)

The HoloLens toolset provides you with everything you need to get started for HoloLens development, including an amazing emulator, which is close to the real device. All of these tools are free of charge! Of course nothing comes as close to the behavior of a real device and in the end it is needed for a professional app to tune performance and UX but the emulator can provide a very good starting point. We leveraged the emulator in a distributed team to speed up development and to not be constrained by device availability, which worked out very well for us.

工具集HoloLens 你需要开始为HoloLens发展提供了你的一切,包括一个惊人的模拟器,这是接近真实的设备。 所有这些工具都是免费的! 当然,没有什么比真实设备的行为更接近了,最终,专业应用程序需要它来调整性能和用户体验,但仿真器可以提供一个很好的起点。 我们在分散的团队中利用仿真器来加快开发速度,并且不受设备可用性的限制,这对我们来说非常好。

By the way, if you are interested in working with VR, AR and real-world HoloLens development, IdentityMine and Valorem are always looking for talented developers, designers and artists.

顺便说一句,如果您对使用VR,AR和现实世界的HoloLens开发感兴趣,IdentityMine和Valorem一直 在寻找有才华的开发人员,设计师和艺术家

rzed portrait
About author: René Schulte is the Director of Immersive Experiences at IdentityMine / Valorem Consulting. He has experience with VR, AR, MR development and 3D programming for more than 10 years and has been developing for HoloLens since 2015.

关于作者:RenéSchulte是IdentityMine / Valorem Consulting的沉浸式体验总监。 他在VR,AR,MR开发和3D编程方面拥有超过10年的经验,自2015年以来一直为HoloLens开发。

He is a frequent speaker at conferences like //build, Unite, NDC and writer of blogs about many developer topics.

他经常在// buildUniteNDC等会议上演讲,并撰写有关许多开发人员主题的博客。

René Schulte also created and maintains a few popular Windows open source libraries like WriteableBitmapEx or the Augmented Reality library SLARToolKit.  For all his community work, René Schulte was honored with the Microsoft MVP Award.

RenéSchulte还创建并维护了一些流行的Windows开放源代码库,例如WriteableBitmapEx或Augmented Reality库SLARToolKit RenéSchulte所做的所有社区工作均获得了Microsoft MVP奖

翻译自: https://blogs.unity3d.com/2016/08/18/developing-for-hololens-with-the-emulator/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值