unity做个unity 位移动画画怎么弄

【unity人形动画介绍(完整)】
我的图书馆
【unity人形动画介绍(完整)】
As with mostskeleton rigs (it is even more often the case for games), the Mecanim HumanoidRig only supports rotation animation. The bones are not allowed to change theirlocal translation relative to their parent. Some 3D packages induce a certainamount of translation on bones to simulate elasticity of articulations orsquash and stretch animation. We are currently looking at adding translationDoF as it is a relatively cheap way in term of computation performance tocompensate for animation quality on less detailed skeleton rigs. It would alsoallow users to create retargetable squash and stretch animation.& && & 在大多数的骨骼中(游戏中这种情况更常见),Mecanim Humanoid Rig只支持旋转动画。我们不能使用骨骼来改变它们相对于父级对象的位移。在一些3D包中包括了骨头上的某些位移量,可以用来模仿关节的弹性或者压缩、伸长的动画。目前,我们正查找并添加旋转自由度,这是因为它是一种在性能上耗费相对较低的方法,它可在对骨骼的细节要求不是特别高的动画中弥补质量的不足。此外,用户还能用它创建可重新命中目标的压缩及伸长动画。
No twist bones
4.& &没有旋转骨骼
Twist bones are often added to skeleton rigs to prevent skin deformation problems on arms and legs when they are in extreme twist configuration.
& && & 通常,旋转骨骼添加到骨骼中,是为了防止胳膊和腿部在极端扭曲状态下的皮肤变形。
Twist bones help to distribute the deformation induced by twist from start to end of the limb.
& && & 当肢体的头部到肢体的尾部之间发生旋转时,旋转骨骼可用来防止变形。
In the Muscle Space, the amount of twist is represented by a Muscle and it is always associated with the parent bone of a limb. Ex: The twist on the forearm happens at the elbow and not on the wrist.
& && & 在Muscle Space(肌肉区域)中,由肌肉表示旋转量,旋转量总是与父级的肢体骨骼关联。例如:在前臂的肘部发生弯曲时,手腕是不弯曲的。
Humanoid Rigs don’t support twist bones, but Mecanim solver let you specify a percentage of twist to be taken out of the parent and put onto the child of the limb. It is defaulted at 50% and greatly helps to prevent skin deformation problem.
& && & Humanoid Rigs(人形绑定)并不支持旋转骨骼,但Mecanim(人形动画)解决了该。它可以让用户从父级中指定弯曲的百分比数,并放在子代的肢体上。它的初始化值是50%,很大程度上帮助解决了皮肤变形。
Humanoid Root and Center of mass
C.& &人形根部和质心
Now, what would be the best way to represent the position and orientation of human body in world space?
& && & 目前,在世界空间坐标中用来表示人形身体的位置和方向的最好方法是什么呢?
The top most bone in hierarchy (usually hips, pelvis or whatever it is called) is where lies the world space position and orientation curves in a standard skeleton rig. While this works fine for a specific character, it becomes inappropriate when doing retargeting since from one skeleton rig to another the top most bone usually have a different position and rotation relative to the rest of the skeleton.
& && &&&在层次结构中的大多数骨骼(通常是臀部和骨盆),在世界空间坐标中弯曲在标准的骨骼上。虽然它对特定人物很有效,但当我们从一个骨骼到另一个骨骼重新定位时,它变得很不管用。相对于其他骨骼,这样的重新定位就会产生不同的位置和偏移量。
The Muscle Space uses the humanoid center of mass to represent its position in world space. The center of mass is approximated using a human average body parts mass distribution. We do the assumption that, after scale adjustments, the center of mass for a humanoid pose is the same for any humanoid character. It is a big assumption, but it has shown to work very well for a wide set of animations and humanoid characters.
& && & Muscle Space使用人形质心来表示它在世界空间坐标中的位置。质心粗略地使用平均值来完成质量分布。我们假设调整规模之后,人形姿势的质心对任何一个人物都是相同的。虽然这是一个很大的假设,但它都可从大量的动画和人形角色上得到验证。
It is true that for standing up or walking animations, the centre of mass lies around hips, but for more dynamic motion like a back flip, you can see how body moves away from the centre of mass and how the centre of mass feels like the most stable point over the animation.
& && & 在站立和行走的动画中,人物质心确实在臀部周围。但更多激烈运动,比如后空翻,你可以看到身体质心的移动,并可通过动画感受到其中最稳定的点。
Body orientation
1.& &身体方向
Similar to what the centre of mass does for Muscle Space world space position, we use an average body orientation for world space orientation. The average body orientation up vector is computed out of the hips and shoulders middle points. The front vector is then the cross product of the up vector and average left/right hips/shoulders vectors. It is also assumed that this average body orientation for a humanoid pose is the same for all humanoid rigs. As for the centre of mass, an average body orientation tends to be a stable referential as lower and upper body orientation naturally compensates when walking, running, etc.
& && & 类似于在Muscle Space的世界空间坐标中的质心,我们使用平均身体方向。它的向量计算出臀部和肩部中心点的位置。随后,前向量与上向量做差积运算,再求出前/后臀部或肩部向量的平均值。这里面有个假设:平均身体方向在所有人形动画中都是一样的。这是因为一个平均身体方向中的质心,有可能作为身体方向的底部和上部的稳定参考,并很自然地在步行和跑步运动时表现出来。
Root Motion
2.& &根运动
A more in depth paper about root motion will follow, but as an introduction, the projection of the centre of mass and average body orientation is used to automatically create root motion. The fact that the centre of mass and average body orientation are stable properties of humanoid animation leads to a stable root motion that can be used for navigation or motion prediction.
& && & 目前已有许多关于根运动的文章,我们在这里只是稍微做个介绍。质心和平均身体方向的项目用来自动创建根运动。事实上,质心和平均方向是人形动画的稳定属性,它们应用到稳定的根运动中,用来导航或运动预测。
One thing is still missing in Muscle Space to be a completely normalized humanoid pose… the overall size of it. Again we are looking for a way to describe the size of a humanoid that does not rely on a specific point like head bone position since it is not consistent from rig to rig. The center of mass height for a humanoid character in T-Stance is directly used as its scale. The center of mass position of the Muscle Space is divided by this scale to produce the final normalized humanoid pose. Said in another way, the Muscle Space is normalized for a humanoid that has a centre of mass height of 1 when in T-Stance. All the positions in the Muscle Space are said to be in normalized meters.
& && & 在Muscle Space中一个错过的事是未完成标准化的人形姿势…它的整体大小。我们再次探寻方法来描述人形的大小。但其并不依赖特定点,譬如头骨位置,因为在骨骼上它不是连续的。在T形姿势中人形人物的质心高度可直接使用,无需调整。Muscle Space的质心位置除以这个高度,将产生最终的标准化人形。换一种说法,Muscle Space用来给人形标准化,它在T形姿势中的质心高度数值为1。在Muscle Space中所有的位置都用米这个计量单位来规范。
Original hands and feet positionD.& &原始的手脚位置When applying a Muscle Space to a Humanoid Rig, hands and feet may end up in different position and orientation from the original animation, due to the difference in proportions of Humanoid Rigs. This may result in feet sliding or hands not reaching properly.&&This is why Muscle Space optionally contains the original position and orientation of hands and feet. The hands and feet position and orientation are normalized relative to Humanoid Root (center of mass, average body rotation and humanoid scale) in the Muscle Space. Those original positions and orientations can be used to fix the retargeted skeleton pose to match the original world space position using an IK pass.& && & 当在Humanoid Rig(人形绑定)上应用Muscle Space(肌肉区域)后,人形的手脚可能会放在不同的位置和方向上,并有别于起初的位置,这是由于Humanoid Rig的比例不同。这可能导致脚的滑动,手也不能正常到达。这就是为什么Muscle Space有选择性地包含了手与脚的最初位置和方向的原因。手与脚的位置和方向是Muscle Space中的标准化人形根部(质心,平均身体旋转和人形规模)。那些初始的位置和方向可用来修正重定向的骨骼,并应用IK(反向动力)原理与原始世界空间位置匹配。
IK SolverIK Solver(解决反向动力)
The main goal of IK Solver on arms and legs is to reach the original hands and feet position and orientation optionally found in the Muscle Space.&&This is what happens under the hood for feet when “Foot IK” toggle is enabled in a Mecanim Controller State.& && & 胳膊和腿部的IK Solver的主要目标是在Muscle Space中探寻到原始的手与脚的位置及方向。这就是当“Foot IK”关节在一个Mecanim控制器状态下启动时,腿部将要发生的事情。In these cases, the retargeted skeleton pose is never very far from the original IK goals. The IK error to fix is small since it is only induced by difference in proportion of humanoid rigs. The IK solver will only modify the retargeted skeleton pose slightly to produce the final pose that matches original positions and orientations.& && & 在这种情况下,重定位的骨骼从不偏离原始的IK目标。要修改的IK错误是很少的,这是因为它包含在不同比例的humanoid rigs中。IK solver(解决者)稍微修改重定位骨骼的姿势,从而形成最终姿态,可以与原始的位置和方向匹配。Since the IK only modifies slightly the retargeted skeleton pose, it will rarely induce animation artefacts like knee or elbow popping. Even then, there is a Squash and Stretch solver, part of IK solver, that is there to prevent popping when arms or legs come close to maximum extension. By default the amount of squash and stretch allowed is limited to 5% of the total length of the arm or leg. An elbow or knee popping is more noticeable (and ugly) than a 5% or less stretch on arm or leg. Note that squash and stretch solve can be turned off by setting it to 0%.& && & 因为IK只是稍微调整重定位的骨骼姿势,它不太会使得膝盖和手掌爆开。即便如此,也可用要压缩伸展Solver。它是IK solver的一部分,当手臂和大腿接近最大伸展值时,可停止伸展。初始化的压缩伸展值限定在手臂和大腿的全部长度的5%。当肘部和膝盖的增加超过5%,或都伸展到胳膊、大腿处时,是很容易观察到的(很难看)。注意:当我们把数值设定成0%时,不会有任何压缩伸展效果。A more in depth paper about IK rigs will follow. It will explain how to handle props, use multiple IK passes, interaction with environment or between humanoid characters, etc.& && & 更多关于IK rigs的内容,将继续报告。IK rigs解释了如何操作道具,使用多个IK passes,以及情景或人形人物之间的交互。
Optional BonesE.& &可选择的骨骼The Humanoid Rig has some bones that are optional. This is the case for Chest, Neck, Left Shoulder, Right Shoulder, Left Toes and Right Toes. Many existing skeleton rigs don’t have some of the optional bones, but we still wanted to created valid humanoids with those.& && & Humanoid Rig有一些可供选择的骨骼。这些是胸骨、颈椎骨、左肩关节、右肩关节、左脚趾骨、右脚趾骨。许多当前的skeleton rigs并没有可选骨骼,但我们仍想用这些骨头创建出有效人形。The Humanoid Rig also supports LeftEye and RightEye optional bones.&&Eye bones have two Muscles each, one that goes up and down and one to move in and out. The Eye bones also work with Humanoid Rig LookAt solver that can distribute look at adjustments on Spine, Chest, Neck, Head and Eyes. There will be more about LookAt solver in the upcoming Humanoid IK rig paper.& && & Humanoid Rig也支持可选的左眼和右眼骨骼。眼睛有两块骨骼,当眼睛上下摆动时,其骨骼也跟着移动。Humanoid Rig的LookAt(观察) solver掌管眼睛骨骼,它也可以在脊椎、胸部、脖子、头和眼睛之间做出调整。在之后的Humanoid IK rig主页中,我们将给大家介绍更多的LookAt solver。
Fingers手指Finally, the Humanoid Rig supports fingers. Each finger may have 0 to 3 digits. 0 digit simply means that this finger is not defined. They are two Muscles (Stretch and Spread) for the first digit and one Muscle (Stretch) for 2nd and last digit. Note that there is no solver overhead for fingers when no fingers are defined for a hand.& && & 最后,Humanoid Rig还支持手指。每个手指可能有0到3位数字。数字0仅代表这只手指未定义。数字1表示两块肌肉,分别是Stretch和Spread。数字2还可表示Stretch(伸展)肌肉。备注:当手没有定义手指时,就没有相应的Solver。
Skeleton rig requirementsF.& &骨骼绑定要求In-between bones1.& &中间骨骼In many case, skeleton rigs will have more bones than the ones defined by the Humanoid Rig. In-between bones are bones that are between humanoid defined bones. For example, a 3rd spine bone in a 3DSMAX Biped will be treated as an in-between bone. Those are supported by Humanoid Rig, but keep in mind that in-between bones won’t get animated. They will stay at their default position and orientation relative to their parent defined in the Humanoid Rig.& && & 多数情况下,相比Humanoid Rig(人形绑定)中定义的骨骼,skeleton rigs(骨骼绑定)有更多的骨头。在人形骨骼中定义了中间骨骼。例如,我们将3DSMAX中两足动物的第三块脊椎骨定义成中间骨。这些中间骨骼由Humanoid Rig支持。但请记住中间骨骼并不会动画。相当于父级中定义的Humanoid Rig,它们将保持初始化的位置和方向。
Standard Hierarchy2.& &标准层级The skeleton rig must respect a standard hierarchy to be compatible with our Humanoid Rig. The skeleton may have any number of in-between bones between humanoid bones, but it must respect the following pattern:& && & Skeleton rig须重视标准层级可在Humanoid Rig上兼容。人形骨骼中可能有很多中间骨骼。但它必须注意以下几种模式:Hips – Upper Leg – Lower Leg – Foot – Toes臀部–大腿–小腿–脚–脚趾Hips – Spine – Chest – Neck – Head臀部–脊椎–胸部–颈椎–头部Chest – Shoulder – Arm – Forearm – Hand胸部–肩部–胳膊–前臂–手Hand – Proximal – Intermediate – Distal手–近节指骨–媒介–末梢
The T-Stance3.& &T形姿势
The T-Stance is the most important step of Humanoid Rig creation since muscles setup is based on it. The T-Stance pose was chosen as reference pose since it is easy conceptualize and that there is not that much room for interpretation of what it should be:& && &&&T形姿势是创建Humanoid Rig中最重要的一个步骤了,因为肌肉创建是在它的基础之上完成。我们选T形姿势作为参考,是因为它很容易概念化,我们对T形姿势也不必过多解释:- Standing straight facing z axis- 身体直立面向z轴- Head and eyes facing z axis- 头部和眼睛面向z轴- Feet on the ground parallel to z axis- 双脚落地并与z轴平行- Arms open parallel to the ground along x axis- 张开的手臂沿着x轴与地面平行- Hands flat, palm down parallel to the ground along x axis- 把手展平,掌心向下沿着x轴与地面平行- Fingers straight parallel to the ground along x axis- 手指沿着x轴与地面平行-Thumbs straight parallel to the ground half way (45 degrees) between x and z axis- 拇指与地面的一半(即45°)平行,在x轴和z轴之间When saying “straight”, it does not mean bones necessarily need to be perfectly aligned. It depends on how skin attaches to skeleton. Some rig may have the skin that looks straight, but underneath skeleton is not.& && & 当我们说道“笔直”时,它不代表骨骼一定要与坐标轴百分之百对齐。它还依赖于皮肤如何附着在骨骼上。有些绑定可能带有皮肤,并看上去很笔直,但骨骼却不笔直。So it is important that the T-Stance be set for final skinned character. In the case you are creating a Humanoid Rig to retarget MOCAP data, it is good practice to capture at least of few frames of a T-Stance done by the actor in the MOCAP suite.& && & 因此,我们把T形姿势设定成最终的带有皮肤的人物是相当重要的。在这种情况下,你正创建的一个Humanoid Rig可重定位MOCAP(动作捕捉)数据。通过动作捕捉中的人物,至少捕获几种重要的T形姿态的框架。
Retargeting and Animation Clip4.& &重定位和动画片段Mecanim retargeting is split into two phases. The first phase consists of converting a standard skeleton transforms animation to a normalized humanoid animation clip (or Muscle Clip). This phase happens in the editor when the animation file is imported. It is internally called “RetargetFrom”. The second phase happens in play mode when Muscle Clip is evaluated and applied to the skeleton bones of a Humanoid Rig.& && & Mecanim的重定位分为两阶段。第一阶段包括标准骨骼从动画转换成规范化的人形动画片段(或者是肌肉片段)。当动画文件引入后,这个过程将在编辑器中执行。我们称它为“RetargetFrom”。当我们评估肌肉片段,并把它应用到Humanoid Rig(人形绑定)的骨骼时,第二阶段将在播放模式中执行。
It is internally called “RetargetTo”.There are two big advantages of splitting retargeting into two phases. The first one is solving speed. Half of the retargeting process is done offline, only the other half is done at runtime. The other advantage is scene complexity and memory usage. Since the Muscle Clip is completely abstracted for its original skeleton, the source skeleton does not need to be included in runtime to perform the retargeting.& && &&&内部把它称作“RetargetTo”。我们把重定位划为两个阶段,它有两大优势。第一大优势是其解决了速度。半数的重定位过程是在线下完成的。只有很少的一部分是在运行时完成的。此外,重定位还减少了场景的复杂性以及内存使用量。由于Muscle Clip(肌肉剪切)是它原始骨骼的完全抽象化,源骨骼不需要在运行时执行重定位功能。
The second phase is straight forward. Once you have a valid Humanoid Rig, you simply apply Muscle Clip to it with RetargetTo solver. This is done automatically under the hood.& && & 第二阶段是开门见山的。一旦你有了有效的Humanoid Rig,你仅需用到Muscle Clip中的RetargetTo solver。它是自动完成的。The first phase, converting a skeleton animation to a Muscle Clip, may be a bit trickier. The skeleton animation clip is sampled at a fixed rate. For each sample, the skeleton pose is converted to a muscle space pose and a key is added to the Muscle Clip. Not all the skeleton rig will fit, there are so many different ways a skeleton rig can be built and animated. Some skeleton rig will produce a valid output, but with possible loss of information. We will now review what is needed to create a lossless normalized humanoid animation… the Muscle Clip.& && & 首个阶段要把骨骼动画转换成Muscle Clip,这可能有些棘手。这个骨骼动画是以固定速率进行采样的。对于每个样本,骨骼姿势转换成muscle space姿势,并加入到Muscle Clip中。并不是所有的骨骼绑定都合适,有太多不同的方法来构建并进行动画骨骼绑定。一些骨骼绑定将生成一个有效输出,但有可能丢失一些信息。目前,我们要做的事是创建无损的标准化人形动画——Muscle Clip。
Note: By lossless we mean that retargeting from a skeleton rig to Muscle Clip and then retargeting back to the same skeleton rig will preserve the animation intact. In fact, it will be almost intact. The original twist on arms and legs will be lost and replaced by what the Twist solver computes. As explained earlier in this document, there is no representation of twist repartition in Muscle Space.& && & 注意:关于无损的人形动画,我们的意思是从骨骼绑定到Muscle Clip(肌肉剪切)并重心定位相同的骨骼绑定上,将保存这些过程的完整动画。实际上,它几乎就是完整的。胳膊和腿部的原始旋转将丢失并被Twist solver取代来进行编译。正如在这篇文章之前所解释的,在Muscle Space中并没有twist repartition(旋转再分配)。
·& && &&&The local position of bones must be the same in the humanoid rig and in the animation file. It happens that the skeleton used to create the Humanoid Rig differs from the one in the animation file. Be sure to use exactly the same skeleton. Warnings will be sent to the console at import, if it is not the case.·& && &&&在人形绑定和动画文件中骨骼的本地位置必须是一样的。骨骼过去经常创建出人形绑定,但有别于动画文件。一定要使用完全相同的骨骼。否则,将会在控制台中出现警告。·& && &&&In-between bones must have no animation. This often happen for a 3DSMAX skeleton where the 3rd spine bone has both translation and rotation animation on it. It also happens when Bip001 is used as Hips and that Pelvis has some animation on it. Warnings will be sent to console at import if it is not the case.·& && &&&中间骨骼没有动画。这通常发生在3DSMAX的骨骼中,第三块脊椎骨骼同时拥有位移和旋转动画。当Bip001作为臀部使用时,骨盆就有动画了。否则,将会在控制台中出现警告。·& && &&&The local orientation of the in-between bone must be the same in the Humanoid Rig and in the animation file. This may happen when using Humanoid Auto Configure that relies on Skin Bind Pose to create T-Stance. Make sure that Skin Bind Pose rotation for in-between bones is the same that one found in the animation file. Warnings will be sent to console at import if it is not the case.·& && &&&在人形绑定和动画文件之中的中间骨骼的本地方向必须是相同的。当使用依赖于皮肤绑定姿势的人形动画配置时,可以创建出T形姿势。·& && &&&Except for Hips, translation animation is not supported on bones. 3DSMAX Biped sometimes puts translation animation on spine bones. Warnings will be sent to console at imp or if it is not the case.·& && &&&除了臀部,骨骼不支持位移动画。有时,3DSMAX中的两足动物要在脊椎骨骼上加入位移动画。在导入时如果不符合的话,将会在控制台中出现警告。
The 3DSMAX Biped is pointed as a problematic rig here. It is probably because of its popularity and the fact that we had to support many cases of it being used with Mecanim. Note that if you are going to create new animations to be used with Mecanim Humanoid Rig, you should follow the rules stated above from the start. If you want to use already existing animation that break some of the rules, it is still possible, the Mecanim retarget solver is robust and will produce valid output, but the lossless conversion can’t be guarantied.& && & 在此,我们将指出3DSMAX中的两足动物的绑定问题。可能是由于它的普及,以及我们不得不在很多情况下支持使用Mecanim吧。注意:如果你打算创建一个使用了Mecanim Humanoid Rig的动画,你应该遵循本文一开始提出的规则。如果你想使用有别于规则的一些动画,仍然能实现。这是因为Mecanim重定位solver(解算器)是功能强大,将生成有效输出,但它不能保证无损转换。
馆藏&20942
TA的推荐TA的最新馆藏[转]&[转]&[转]&[转]&[转]&[转]&[转]&[转]&

我要回帖

更多关于 unity 加速度位移 的文章

 

随机推荐