简体   繁体   English

增强现实,叠加3D模型

[英]Augmented Reality, superimposing 3d models

How would I use a library like this https://code.google.com/p/js-handtracking/ with a 3D model in order to superimpose over a hand tracking? 如何将像https://code.google.com/p/js-handtracking/这样的库与3D模型结合使用,以便叠加在手部跟踪上?

How would you use a 3d model file with such a thing? 您如何将3D模型文件用于此类用途?

What format would the model need to be? 该模型需要采用什么格式? I've never dealt with 3D model superimposition. 我从未处理过3D模型叠加。

The 3D object you want to superimpose may be any 3D object (eg obj, 3ds, ply, vrml). 您要叠加的3D对象可以是任何3D对象(例如obj,3ds,ply,vrml)。 Actually the model representation is not an issue as you can convert a 3d representation to any other 3d representation (usually). 实际上,模型表示不是问题,因为您可以将3d表示转换为任何其他3d表示(通常)。 It is up to your browser/player doing the rendering of the scene. 由您的浏览器/播放器执行场景渲染。

In order to overlay a 3d model on your detected hand you need to know the position of the hand (relative to your scene of course). 为了在检测到的手上叠加3D模型,您需要知道手上的位置(当然是相对于您的场景)。 The detection algorithm should give you some kind of a transformation matrix which can be translated to rotation, translation and scale. 检测算法应为您提供某种转换矩阵,可以转换为旋转,平移和缩放。 Then you can use these values to place your 3d object at the right position in the 3d scene. 然后,您可以使用这些值将3d对象放置在3d场景中的正确位置。

You should first check if there is an API of the handtracking algorithm, or at least how can you intercept the output data (if any). 您首先应该检查是否有手动跟踪算法的API,或者至少如何截获输出数据(如果有)。 Otherwise you would have to search through the algorithm (source code..) where the detection is made and get the transformation matrix and apply it on your 3d object. 否则,您将必须搜索进行检测的算法(源代码..),并获取转换矩阵并将其应用于3d对象。

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

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