深度图three.js [英] Depth Map three.js

查看:406
本文介绍了深度图three.js的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在three.js中获得深度图?



我有兴趣生产类似于Kinect为给定场景而产生的东西。



我遇到了一种使用没有颜色和灰雾来模仿它的黑客方式,但它不会是理想的,因为它会使用两个不同的场景,并且将变成照明。另一种做法我相信是访问深度缓冲区,但似乎这不能通过three.js访问。

解决方案

没错。尝试使用 MeshDepthMaterial


Is there any way to obtain a depth map in three.js?

I am interested in producing something similar to what a Kinect would produce for a given scene.

I have come across a hacky way of using no colors and fog to mimic this but it would not be ideal because it would use two different scenes and would be variant to lighting. Another way to do this I believe would be to access the depth buffer but it appears this cannot be accessed through three.js.

解决方案

Yep. Try using MeshDepthMaterial.

这篇关于深度图three.js的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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