Occlusion in AR

倾然丶 夕夏残阳落幕 提交于 2020-01-02 08:33:02

问题


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?


回答1:


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

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.




回答2:


+1 on AndrewNakas's solution.

Another solution is to do the screen space depth buffer test. That means taking a depth image from the point cloud Tango provides, and compare it with the virtual camera's depth buffer.

Tango Unity SDK implemented this feature on the Tango AR Camera prefab. There's a checkbox named Enable Occlusion.



来源:https://stackoverflow.com/questions/34957433/occlusion-in-ar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!