闭塞在AR [英] Occlusion in AR

查看:118
本文介绍了闭塞在AR的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将真实对象放置在虚拟对象前面时将其隐藏,但是没有运气,我一直在统一使用遮挡设置,但是虚拟对象不会变成隐藏吗?

I'm trying make virtual objects be hidden when a real world object is positioned in front of it, but not having any luck with it, i've been playing with the occlusion settings in unity but the virtual objects do not become hidden?

推荐答案

您可以通过启用实验性网格划分来构建增强现实场景来解决此问题.

You could fix this problem by building your augmented reality scene with the experimental meshing enabled.

这里是这个概念的一个例子 https://www.youtube.com/watch?v=sn3bhnPlfcw

Here is an example of the concept https://www.youtube.com/watch?v=sn3bhnPlfcw

然后,如果网格物体阻挡了射线投射,则可以将射线从摄影机投射到虚拟对象,然后关闭该对象.

You then could ray cast from camera to the virtual object and turn off the object if a mesh blocks the raycast.

这篇关于闭塞在AR的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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