Hololens 学习摘要及翻译记录 二 World coordinates
来源:互联网 发布:易语言盗号源码2016 编辑:程序博客网 时间:2024/06/08 00:31
阅朗微软官方文档并作出简要记录:
https://developer.microsoft.com/zh-cn/windows/holographic/documentation
个人学习记录,有错误欢迎指出。
HoloLens的六个基本概念之一
Building blocks of Holographic apps :
一、Coordinate systems : https://developer.microsoft.com/zh-cn/windows/holographic/coordinate_systems
A.Spatial coordinate Systems : 空间坐标系
1.All 3D graphics applications use Cartesian coordinate systems.
所有的3D图形应用都采用笛卡尔积坐标系。
2.Spatial coordinate systems express their coordinate values in meters.
空间坐标系统以真实世界米为一个单位。
3.Spatial coordinate systems on Windows Holographic are always right-handed, which means that the positive X-axis points right, the positive Y-axis points up (aligned to gravity) and the positive Z-axis points backwards.
坐标系采用右手定则,X向右为正,Y向上为正,Z向内为正。
B.Stationary frame of reference : 固定参照系
1.Describing the position of a hologram in the real-world requires a reference point that remains stationary as the device moves through the environment. The system provides a simple affordance for this purpose which is called a "stationary frame of reference". The coordinate system provided by this frame of reference works to keep the positions of objects near the user as stable as possible, relative to the world.
当戴着设备在周围环境中移动时,为了描述一个全息影像在真实世界中的位置,需要一个固定的参照点。系统提供了一个简单的功能达到这个目的叫做固定参照系。固定参照系提供的坐标系让使用者周围的全息影像位置尽可能的保持在自己原本的位置上不发生改变。固定参照系其本身对世界来说是会变化的。
2.In a game engine such as Unity, a stationary frame of reference is what defines the engine's "world origin". Objects that are placed at a specific world coordinate use the stationary frame of reference to define their position in the real-world using those same coordinates. An app will typically create one stationary frame of reference on startup and use its coordinate system throughout the app's lifetime.
像在Untiy这样的游戏引擎里,固定参照系定义了引擎的世界坐标原点。被放置在特定世界坐标的对象,用同样的坐标数据在固定参照系中定义他们在真实世界中的位置。一个应用最典型的就是在启动的时候创建一个固定参照系并用这个坐标系贯穿整个应用的生命周期。
3.Over time, as the system learns more about the user's environment it may determine that distances between various points in the real-world are shorter or longer than the system previously believed. Therefore, the system adjusts as the user walks around a larger area resulting in holograms that you've placed in a stationary coordinate system may be seen to drift off their original position.
随着时间的推移,系统会自动识别更多的环境信息。而识别的依据取决于各个点在真实世界中的距离与系统预先之前所确定的距离是否存在差距。因此,系统会随着使用者在区域内反复游走而不断的调整结果(因为点之间距离变化了)告诉那些你放置在固定坐标系中的全息影像,其结果就好像这些全息影像渐渐的偏离了他们原来所在的位置(原本系统认知为4米的距离,实际上为3.9米,当系统了解到这一事实后将会改变固定参照系为真实的状态,这个时候原本放在4米位置的对象,在坐标系修改后就放在了3.9米的位置,就看起来好像偏离了他原来所在的位置)。
C.Spatial anchors :空间锚点
1.To avoid drift and ensure that a hologram remains exactly at a specific spot in the world, even as the system discovers more about the world, you can place that hologram using a spatial anchor.
为了解决静止参照系中出现的偏移问题,你放置的全息影像就可以采用空间锚点。
2.A spatial anchor represents an important point in the world that the system should keep track of over time. Each anchor has a coordinate system that adjusts as needed, relative to other spatial anchors or frames of reference, in order to ensure that anchored holograms stay precisely in place.
每一个空间锚点都代表着世界中的一个点,用以被系统追踪。每一个锚点都有着一个相对于其他空间锚点或固定参照系可调整的坐标系,以确保全息影像准确的呆在它的位置上。
Why a single rigid coordinate system cannot be used for the whole scene :
为什么不能用一个不变的坐标系描述整个场景:
1.Today, when writing games, data visualization apps, or virtual reality apps, the typical approach is to establish one absolute world coordinate system that all other coordinates can reliably map back to. In that environment, you can always find a stable transform that defines a relationship between any two objects in that world. If you didn't move those objects their relative transform would always remain the same. This kind of global coordinate system works well when rendering a purely virtual world where you know all of the geometry in advance.
如今,我们在写一个可视化数据的应用或虚拟现实应用,最典型的方式是建立一个绝对的世界坐标系,其他所有的坐标系都依赖其映射。在这个环境下,你总是能够找到一个固定的变换矩阵定义两个对象在世界中的关系。如果你不去移动这些对象,他们的相对的变化矩阵总是保持不变的。这类型的全局坐标系总是能够在一个纯粹的并且能够提前知道所有几何结构(是指的位置,形状等几何关系永远不会发生变化的情况下)的虚拟世界中得到完美的应用。
2.In contrast, as a mixed-reality device, HoloLens has a dynamic sensor-driven understanding of the world -- continuously adjusting its knowledge over time of the spatial anchors you create. As a result, your app must be prepared for the spatial anchors you create to change their relationships to each other over time.
与其相对的,作为一个混合现实的设备。HoloLens有着动态的传感器来理解世界,并随着时间的推移,持续的调整着你所创建的空间锚点的认知。其结果就是,你的应用必须随时准备好为你所创建的空间锚点改变它们之间的相对关系。
3.For example, the device may currently believe two locations in the world to be 4 meters apart, and then later refine that understanding, learning that the locations are in fact 3.9 meters apart. If those holograms had initially been placed 4 meters apart in a single rigid coordinate system, one of them would then always appear 0.1 meters off from the real-world.
举例来说,设备当前认为两个点之间的距离为4米。然后设备学习并认知到实际上他们之间只有3.9米,那么这两个被初始化相距为4米的全息影像如果是放在一个不变的坐标系下,那么这个时候在真实世界中它们之间总会有一个出现0.1米的误差。(因为不变的坐标系下初始化的4米,其在真实世界中是3.9米,因为是不变坐标系,所以不会再改变他们的真实距离)
The solution : Spatial anchors : 解决办法:空间锚点
1.HoloLens solves this issue by letting you create spatial anchors to mark important points in the world where the user has placed holograms. As the device learns about the world, these spatial anchors can adjust their position relative to one another as needed to ensure that each anchor stays precisely where it was placed relative to the real-world. By placing a hologram in the coordinate systems of a nearby spatial anchor, you can ensure that this hologram maintains optimal stability.
HoloLens解决这个问题的方式就是用空间锚点在你放置全息影像的位置标记为重要的点。随着设备对世界的认知,这些空间锚点会调整它们在真实世界中的相对位置,保持在坐标系上的不变(会随着坐标系的改变而改变)。把全息影像放在空间锚点的坐标系上,确保全息影像保持稳定。
2.This continuous adjustment of spatial anchors relative to one another is the key difference between coordinate systems from spatial anchors and stationary frames of reference:
持续的调整空间锚点 对 其他空间锚点 和 固定参照系 上有两个关键的不同点:
- Holograms placed in the stationary frame of reference all retain a rigid relationship to one another. However, that frame's coordinate system may drift relative to the world over time to ensure that holograms next to the user appear stable.
- 放置在固定参照系中的全息影像相对于其他对象都是保持不变的。然而,固定参照系本身的坐标系会随着对世界的认知而发生改变,这样才能保证下一个在使用者周围会出现的全息影像是稳定的。
- Holograms placed using one spatial anchor may drift relative to holograms placed using another spatial anchor. This allows Windows to improve its understanding of the position of each spatial anchor, even if, for example, one anchor needs to adjust itself left and another anchor needs to adjust right.
- 放置在空间锚点中的全息影像会相对于放置在其他空间锚点中的影像发生漂移。系统能够提高对各个锚点位置的认知,比如一个锚点需要左移而另一个锚点需要右移
一些时候,设备的传感器无法计算出设备在哪。可能的原因是,房间太黑,或者传感器被头发或手挡住,或者周围没有足够的纹理。
2。When this happens, the device will be unable to track its position with enough accuracy to render world-locked holograms. You won't be able to figure out where a spatial anchor or the stationary coordinate frame is relative to the device, but you can still render body-locked content in the attached frame of reference.
当这个情况发生时,设备没有足够准确的信息去追踪在世界中全息影像的位置。你不能计算出空间锚或固定参照系与设备的相对位置。但是你能渲染那些在附加参照系中的主体锁定的内容。
3.Your app should tell the user how to get positional tracking back, rendering some fallback body-locked content that describes some tips, such as uncovering the sensors and turning on more lights.
应用需要告诉使用者,怎么获取追踪位置。使用主体锁定的内容来做提示,如:不要挡住传感器和把光调亮一点。
Device tracks incorrectly due to dynamic changes in the environment : 设备追踪不正确是由于环境中动态变化的东西
1.Sometimes, the device cannot track properly if there are lot of dynamic changes in the environment. For example, many people walking around in the room. In this case, the holograms may seem to jump or drift as the device tries to track itself in this dynamic environment. We recommend using the device in a less dynamic environment if you hit this scenario.
一些时候,设备无法正确的追踪是因为在环境中动态改变的东西太多了,比如,一些人在房间中走动。因此,在设备试图追踪他们的时候全息影像可能看上去像跳或漂移。我们使用设备时应在尽量少的动态坏境中使用。
Device tracks incorrectly because the environment has changed significantly over time : 随着时间的推移,环境有了显著的变化,会导致设备追踪不正确。
Sometimes, when you start using a device in an environment which has undergone lot of changes (e.g. significant movement of furniture, wall hangings etc.), it is possible that some holograms may appear shifted from their original locations. The earlier holograms may also jump around as the user moves around in this new space. This is because the device's understanding of your space no longer holds and it tries to remap the environment while trying to reconcile the hologram positions. In this scenario, it is advised to remove the original holograms. If the newly placed holograms also seem to shift and jump, please ask the user to remove the current space on the device by going to Settings > System > Spaces. Please note that removing a space leads to loss of all the holograms.
一些时候,当你在一个环境中使用设备时,会扫描到很多会变化的物体,比如明显移动过的家具或壁挂。可能出现一些全息影像从他们原来的位置发生了移动。早一些的全息影像也许会随着使用者移动到一个新的地方而产生跳跃。因为设备知道你的空间已经换了,所以设备在尝试重新定位全息影像位置时,会试图重新扫描环境。在这个情况下,建议清除原来的全息影像。如果新的全息影像位置看起来像移动或跳跃,可以请求使用者在设备上移除当前的空间。步骤:Settings>System>Spaces。记住,移除一个空间会导致所有的全息图像丢失。
Device track incorrectly due to identical spaces in an environment : 在环境中具有相同的空间,会导致设备追踪不正确。
Sometimes, a home/space may have two identical portions. For example, two identical rooms in a home, two identical corner areas, two large identical posters that cover the device's field of view. In such scenarios, the device may, at times, get confused between the identical parts and mark them as the same in its internal representation. This may cause the holograms from some areas to appear in other locations. The device may start to lose tracking often since its internal representation of the environment has been corrupted. In this case, it is advised to remove the current space by going to Settings > System > Spaces. Please note that removing a space leads to loss of all the holograms. This will cause the device to track well in the unique areas of the environment. However, the problem may re-occur if the device gets confused between the identical areas again.
一些时候,在房子或者空间中有两个相同的部分。比如,两个一样的房间,两个一样的角落,两个一样的大海报覆盖了设备的FOV。在这个情况下,设备有可能混淆两个部分,并在内部把他们标记成一个东西。这可能导致全息影像应该这个位置出现的确在另一个位置出现了。经常由于设备的内部环境标识出了问题,设备开始丢失追踪。建议清除当前空间。步骤:Settings>System>Spaces。记住,移除一个空间会导致所有的全息图像丢失。在唯一的环境中设备会追踪的很好,然后如果还是在有相同区域的空间中,设备依然有可能出现这个问题。
See also
- Spatial anchors
- Shared holographic experiences
- World anchor in Unity
- Coordinate systems in DirectX
- Shared spatial anchors in DirectX
- Case study - Looking through holes in your reality
- Hololens 学习摘要及翻译记录 二 World coordinates
- Hololens 学习摘要及翻译记录 一 Understanding HoloLens
- Hololens 学习摘要及翻译记录 三 Gaze
- Hololens 学习摘要及翻译记录 四 Gestures
- Hololens 学习摘要及翻译记录 五 Voice
- Hololens 学习摘要及翻译记录 六 Spatial sound
- Hololens 学习摘要及翻译记录 七 Spatial mapping
- Hololens 学习摘要及翻译记录 八 Development overview
- Transforming between image coordinates and world coordinates
- Hololens学习
- C++学习摘要记录(1)
- C++学习摘要记录(2)
- C++学习摘要记录(3)
- 微软Hololens应用及开发——HoloLens介绍篇(二)硬件介绍
- HoloLens开发学习笔记(二):学习资源整理
- 【转载】HoloLens开发学习笔记(二):学习资源整理
- cloudstack学习记录--------翻译
- 3.1参考手册学习摘要(二)
- c++ Mutable
- error: command 'gcc' failed with exit status when installing psycopg2
- C++ Built-in Operators, Precedence and Associativity
- android开发桌面控件之液晶时钟
- 通俗的解释进程和线程
- Hololens 学习摘要及翻译记录 二 World coordinates
- Android学习日记(yzy):集成布局和滑动效果的实现
- 图片格式转换
- android 相对布局属性
- IOS 嵌入 u3d 的步骤
- centos6.8安装PHP 7.0.10
- Javascript学习笔记
- Eclipse中最有用的快捷键组合
- Python的虚拟环境virtualenv