如何在Unity中使用Google Tango进行遮挡? [英] How to do occlusion with Google Tango in Unity?

查看:125
本文介绍了如何在Unity中使用Google Tango进行遮挡?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我打算在Unity中使用Google Tango进行遮挡.

I am tring to do occlusion with Google Tango in Unity.

我想要的东西很容易理解:当虚拟对象前面有真实对象时,该虚拟对象被隐藏(或以不同的方式呈现)

What I want is pretty simple to understand: when there is a real object in front of a virtual object, the virtual object is hidden (or rendered differently)

完美的结果就像是在我发现的这段令人印象深刻的视频中一样: https://www.youtube.com/watch?v=EpDhaM7ZhZs .

The perfect result would be like it is in this impressive video I found: https://www.youtube.com/watch?v=EpDhaM7ZhZs .

我已经尝试过Tango Camera的启用遮挡"选项,但我对结果不满意(因为它基于点云的网格重建,因此不准确且不实时).

I already tried the "Enable occlusion" option of the Tango Camera and I am not so happy with the results (it is not accurate and not real time as it is based on mesh reconstruction from the point cloud).

如果您有关于如何实现此目标的提示,技巧或想法(如视频中所示),那就太棒了!

If you have hints, tips or ideas about how to achieve this (like in the video), that would be awesome!

推荐答案

遮挡仍然是Tango的一项非常实验性的功能.问题在于,很难以高保真度和高性能进行遮挡,以下是一些有关如何使用不同方法实现遮挡的想法:

Occlusion is still a very experimental feature on Tango. The problem is that it's very hard to do occlusion with high fidelity and high performance, here's couple of ideas on how to achieve it using different method:

  1. 使用3D重建.

Tango确实提供了从点云构造3D网格的功能,您可以从Tango示例代码存储库中找到示例代码( Java

Tango does provide functionalities to construct 3D meshes from point cloud, you can find sample code from Tango sample code repository (C, Java, Unity). If you have a world that is pre-scanned, you can essentially use that mesh data to occluded virtual object.

  1. 运行时向上采样深度图像.

还可以将所有点云投影到图像平面上,对其进行升采样,然后将图像用作深度缓冲区进行渲染.这就是TangoUnitySDK中使用的ARScreen遮挡.由于Tango深度感应硬件的局限性,结果质量不是很理想,并且如果所有物理对象都距离设备较远(超过4米),它将无法正常工作.

You can also project all point clouds on to an image plane, up-sample it, and use the image as a depth buffer for rendering. This is what ARScreen occlusion is using in TangoUnitySDK. Due to the limitation of Tango depth sensing hardware, the result quality is not very ideal, and it will not work if all physical objects are far away(beyond 4 meters) from the device.

这篇关于如何在Unity中使用Google Tango进行遮挡?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆