简体   繁体   English

从深度图渲染表面的 3D

[英]3d rendering of a surface from a depthmap

Using stereovision, I am producing depthmaps representing the 3d environment as viewed from a camera.使用立体视觉,我正在生成表示从相机观看的 3d 环境的深度图。 There is one depthmap per "keyframe" associated with a camera position.每个“关键帧”有一个与相机位置相关联的深度图。 The goal is to translate those 2d depthmaps into the 3d space (and later merge them to reconstruct the whole environment).目标是将这些 2d 深度图转换为 3d 空间(然后将它们合并以重建整个环境)。

What would be the best (efficient) way to translate those depthmaps in 3d?在 3d 中转换这些深度图的最佳(有效)方法是什么? Each depthmap is 752x480 large, so the number of triangles can grow quite fast.每个深度图都是 752x480 大,因此三角形的数量可以快速增长。 I would like an automatic system to manage the level of detail of the objects.我想要一个自动系统来管理对象的详细程度。

My team uses Ogre3d so it would be great to find a solution with it.我的团队使用 Ogre3d,所以找到它的解决方案会很棒。 What I am looking for is very similar to what Terrain do, except that I want to be able to put the resulting objects wherever I want (translation, rotation) and I think Terrain can't do that.我正在寻找的与 Terrain 所做的非常相似,除了我希望能够将结果对象放在我想要的任何地方(平移、旋转),而且我认为 Terrain 无法做到这一点。

I am quite new to Ogre3d so please forgive me if there is a straightforward solution I should know.我对 Ogre3d 很陌生,所以如果有我应该知道的简单解决方案,请原谅我。 If another tool than Ogre3d is more appropriate to my problem, I'd be happy to learn about it!如果 Ogre3d 以外的其他工具更适合我的问题,我很乐意了解它!

Not clear what you want to do "merge depahtmap with envirronement" ?不清楚你想做什么“将 depahtmap 与环境合并”?

Anyway, in your case, you seems stuck to make them 3d using terrain heightmap techniques.无论如何,在您的情况下,您似乎坚持使用地形高度图技术使它们成为 3d。 In you case, as the depthmap is screen aligned, use a screen space simple raycasting technique.在您的情况下,由于深度图与屏幕对齐,请使用屏幕空间简单的光线投射技术。 So you must do a compositor in ogre3D that takes that depth map and transform it on the pixel you want.因此,您必须在 ogre3D 中执行一个合成器,该合成器获取该深度图并将其转换为您想要的像素。

Translation and rotation from a depth map may be limited to xy on screen, as like terrain heightmap (you cannot have caves using heightmaps), you do miss a dimension.深度图的平移和旋转可能仅限于屏幕上的 xy,就像地形高度图(使用高度图不能有洞穴)一样,您确实会错过一个维度。

Not directly related but might help: in pure screen space, there is a technique "position reconstruction" that help getting object world space positions, but only if you have a load of infos on the camera used to generate the depthmap you're using, for example: http://www.gamerendering.com/2009/12/07/position-reconstruction/不直接相关但可能会有所帮助:在纯屏幕空间中,有一种“位置重建”技术可以帮助获取对象世界空间位置,但前提是您在用于生成您正在使用的深度图的相机上有大量信息,例如: http : //www.gamerendering.com/2009/12/07/position-reconstruction/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM