一名热爱体感技术的
业余专业开发人员

【转】【VR】Leap Motion 官网文档 手型资源

文章来自子兮.空的csdn博客,感谢她同意我转载,转到这里希望对学习VR的人有用。注意这个系列的文章地址从 leapmotion-vr-0开始,一直往后数。如果有人有相关问题,请跳转到她的文章进行询问:本篇文章对应原地址:【VR】Leap Motion 官网文档 手型资源

前言:

Leap Motion的官网文档已经有不少的热心网友参与了翻译,但没有覆盖官网文档的全部。

为迎合Unity VR的热潮与大家的学习需要,推出的针对Unity方向的官方文档翻译系列。

第三篇 《手型资源》 介绍了Leap Motion为Unity提供的资源包种的手型预设体资源。

英文原文网址:https://developer.leapmotion.com/documentation/unity/unity/Unity_Hand_Assets.html

译文首发&持续更新:http://blog.csdn.net/duzixi

Hand Assets  手型资源

The Leap Motion core assets for Unity include a number of pre-made hand prefabs assets. You can use these prefabs as-is, modify them, or create your own.

Leap Motion 为Unity提供的核心资源包含一系列实现做好的手型预设体资源。你可以直接使用这些预设,或者对其进行修改,也可以创建自己的手型预设体。

There are a few different approaches to creating hands, including creating discrete components for the parts of the hands and moving these parts individually, creating mesh hands rigged with bone armatures and deforming the mesh by rotating the bones, and even creating code-driven hands that procedurally create their own graphics. The existing prefabs use all three of these approaches.

创建手型的方式有多种,你可以分别创建手型的各个部分并分别移动,也可以创建有骨骼绑定的手型网格通过旋转骨骼控制手部移动,甚至可以创建代码驱动的手型由计算机渲染出其图形。资源包中提供的预设体包含了以上三种创建方式。

The HandController class orchestrates the acquisition and application of tracking data to the hands and fingers. The HandModel and FingerModel classes serves as the base for animating the hand and fingers. There are several classes extending HandModel and FingerModel to implement the specific types of animation. These specific classes, like SkeletalHand/Finger and RiggedHand/Finger, can be used for multiple hand designs as long as the objects to which they are attached follow the same basic structure.

HandController类用于组织手部和手指追踪数据的获取和应用。HandModel类 和 FingerModel类是手部和手指动画的基础模型类。HandModel类和FingerModel类在均有一些派生类,用于特定动画类型。这些特殊的类,比如SkeletalHand/Finger(骨骼手/手指),可以用于多种手型和其他具有相同基础结构的物体设计。

The graphics and physics hands are separated into two different prefabs. You can use whichever physics hand prefab best fits your hand graphics model. For example. RigidFullHand includes a rigid body and collider for the arm, so you can use it with graphics models that include an arm – when you want the arm to collide with other objects in the scene.

(译者注:以下表格是资源包中的名字,应按英文名查找,中文译文仅供语义参考)

Hand Type  手型类型 Prefabs 预设体 Scripts  对应脚本 Example  图例
Procedural Hands

程序生成手型

PolyHand1/2/3, DebugHand

多边形手1/2/3, 调试手

PolyHand/Finger, DebugHand/Finger
Component Hands
组件构成手型
MinimalHand, CleanRobotHand, GlowRobotHand

最小手,普通机器手,光晕机器手

SkeletalHand/Finger
Rigged Hands
骨骼驱动手型
All the human models
所有的人类模型
RiggedHand/Finger
Physics Hands
物理手型
RigidHand, RigidFullHand, RigidRoundHand, ThickRigidHand

刚体手,刚体完整手,刚体旋绕手,厚的刚体手

RigidHand/Finger

Setting Up Hand Assets in the Hand Controller 在Hand Controller中设置手资源

After adding a HandController to a scene, you can set the graphics model by dragging the desired hand prefab to the Hand Graphics Model slots.

向场景中添加HandController之后,你可以拖拽想使用的手型预设体到组件的Hand Graphics Model属性槽当中,用于显示不同的图像模型。

If the Separate Left/Right setting is checked, you can use different prefabs for the right and left hands. Otherwise, the HandController mirrors a single model for both hands. The existing hand prefabs are all labeled “right” or “left” where it makes a difference (if you use the wrong hand model, the error will be obvious).

如果勾选了脚本组件中的 Separate Left/Right 选项,那么你就可以对左右手分别使用不同的预设体了。否则HandController会从一个模型映射出两个手型。资源包种的预设体均标明了左右以示区分(如果添加错误,会出现奇怪的结果)

Change the size of the hands using the HandController Scale value. A scale of 1.0 is life-size, but that is often too small. It really depends on your scene. The edges of the default Unity cube, for example, are 1 meter long and would dwarf a life-size hand. Scaling the hands larger also increases their range of motion. You can further increase the range of motion without making the hands larger by increasing the HandController Hand Movement Scale values.

你可以通过修改HangController 的Scale 属性值来改变手型的大小。当scale值为1时表示实际大小,但是通常看上去会很小。这取决于你的场景。例如Unity中的Cube默认的边缘长度是1米,相比之下实际大小的手型会显得很小。缩放手型同样也会缩放运动范围。你也可以通过增加HandController Hand Movement Scale 的值只能加运动的范围而不让手型变大。

Setting the Is Head Mounted will provide a hint to the Leap Motion service that hands are viewed from the head-mounted position and improve hand recognition. The setting does not automatically rotate the hands in the game to appear in front of the HandController rather than above it. To do that, you can set the HandController rotation values to {x=270, y=180, z=0}.

勾选Is Head Mounted可以将Leap Motion 服务设置为头戴模式。这个设定不会在游戏中自动旋转HandController前的手型。为使其发生旋转,你可以设置HandController 的 rotation值为 {x=270, y=180, z=0}。

(版权声明:本篇为Leap Motion 官网文档译文,版权归Leap Motion 官网所有,图文内容仅供学习使用。)

赞(0)
转载请附上原文链接 (^ ^)延陵明天 » 【转】【VR】Leap Motion 官网文档 手型资源

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址