您的位置:首页 > 其它

Configuring the Avatar

2016-09-14 15:44 375 查看
Since the Avatar is such an important aspect of the Mecanim system, it is important that it is configured properly for your model. So, whether the automatic Avatar creation fails or succeeds, you need to go into the Configure Avatar mode to ensure your Avatar is valid and properly set up. It is important that your character’s bone structure matches Mecanim’s predefined bone structure and that the model is in T-pose.
由于Avatar是Mecanim系统中那么重要的一方面,所以对于你的模型配置Avatar的正确配置很重要。所以,无论自动创建Avatar成功与否,你应该进入配置Avatar模式下确保你的Avatar是有效的并且正确的被建立。你的角色的骨骼结构喝Mecanim预定义的骨骼结构相匹配是很重要的,并且模型是T姿势。
If the automatic Avatar creation fails, you will see a cross next to the Configure button.
如果自动创建Avatar失败了,你将看到Configure按钮旁边有一个叉号。

If it succeeds, you will see a check/tick mark:

Here, success simply means all of the required bones have been matched but for better results, you might want to match the optional bones as well and get the model into a proper T-pose.
在这里,成功意味着所有需要的骨头都映射成功,但是为了更好地映射,你也许想把一些可选择的骨头映射更好然后把模型变成T型。
When you go to the Configure … menu, the editor will ask you to save your scene. The reason for this is that in Configure mode, the Scene View is used to display bone, muscle and animation information for the selected model alone, without displaying the rest of the scene.
当你去Configure菜单时,编辑器将会问你是否保存当前的场景。因为在Configure模式下,场景的视野是仅仅是为了展示骨骼肌肉和动画信息,没有展示场景中其他的东西。

Once you have saved the scene, you will see a new Avatar Configuration inspector, with a bone mapping.
一旦你保存了场景,你将看到一个新的有骨骼映射的Avatar Configuraion视图。

The inspector shows which of the bones are required and which are optional - the optional ones can have their movements interpolated automatically. For Mecanim to produce a valid match, your skeleton needs to have at least the required bones in place. In order to improve your chances for finding a match to the Avatar, name your bones in a way that reflects the body parts they represent (names like “LeftArm”, “RightForearm” are suitable here).
If the model does NOT yield a valid match, you can manually follow a similar process to the one used internally by Mecanim:-
上面的视图显示了那些骨头是需要的和哪些骨头是可选择的-可选择的骨骼点自动的修改他们的运动。为了Mecanim提供一个有效的匹配,你的骨架至少需要必须的骨骼点的正确位置。为了提高匹配Avatar的几率,你的骨骼点应该以它表示的身体部位的名称来命名(比如左手,右臂都很合适)如果模型没有产生一个有效的匹配,你可以手动随着在Mecanim内部使用的操作过程。

1.Sample Bindpose (try to get the model closer to the pose with which it was modelled, a sensible initial pose)采样绑定姿势(尝试把模型姿势变得和最初建模的时候接近的姿势,一个可以感知的初始的姿势)

Automap (create a bone-mapping from an initial pose)自动映射(从初始的姿势创建一个骨骼映射)

Enforce T-pose (force the model closer to T-pose, which is the default pose used by Mecanim animations)强制T字形姿势(强制模型接近Mecanim动画默认的T姿势)

If the auto-mapping (Mapping->Automap) fails completely or partially, you can assign bones by either draging them from the Scene or from the Hierarchy. If Mecanim thinks a bone fits, it will show up as green in the Avatar Inspector, otherwise it shows up in red.
如果自动映射失败了或者只映射了部分部分,你可以通过从场景或者视图中拖拽的方式来指定骨骼。如果Mecnim认为骨骼合适,它将会在Avatar视图中显示绿色,否则就是红色。
Finally, if the bone assignment is correct, but the character is not in the correct pose, you will see the message “Character not in T-Pose”. You can try to fix that with Enforce T-Pose or rotate the remaining bones into T-pose.
最后,如果骨骼指定正确,但是角色不在正确的姿势,你可以尝试用Enforce TPose或者把剩余的骨骼旋转T姿势。

Avatar Body Masks Avatar身体遮罩
Sometimes it is useful to restrict an animation to specific body parts. For example, an walking animation might involve the character swaying their arms, but if they pick up a torch, they should hold it up to cast light. You can use an Avatar Body Mask to specify which parts of a character an animation should be restricted to - see this page page for further details.
有时候把一个动画限制在特定的身体部位是有用的。例如,一个移动动画可能涉及到角色摆动他们的手臂,但是如果角色捡起了一个火把,他们应该举着火把照明。你可以用Avatar身体遮罩去指定动画限制在身体的哪个部位。

有些动画文件里面带有骨骼位移动画。例如3D Max Biped里面的第一块脊柱带有位移动画的情况。这些模型的 humanoid avatar里的位移自由度(translation DoF)将会被激活,并且将位移动画转换成可重定向的位移自由度。位移自由度影响脊柱、肩膀、大腿和颈骨。位移自由度通常代表能够提升重定向质量的小范围移动。当一个动画里有两个以上的脊柱动画时,位移自由度也能够提升重定向质量。位移自由度能够在Humanoid配置窗口的Muscle & Setting设置里面激活。
当设置一个Avatar动画类型为Humanoid时,Unity会尝试自动检测该模型是否为Biped。如果发现“Biped”这一层级或命名,就会使用默认的骨骼映射绑定以及t-pose。该模型的位移自由度也会被自动激活。模型仍然能够被重新配置,不过通常使用默认配置会产生最好效果。要注意当骨骼不使用 “Triangle Pelvis” 并且使用默认命名时自动配置才会生效

Muscle setup 肌肉建立
Mecanim allows you to control the range of motion of different bones using Muscles.
Once the Avatar has been properly
configured, Mecanim will “understand” the bone structure and allow you to start working in theMuscles tab
of the Avatar Inspector. Here, it is very easy to tweak the character’s range of motion and
ensure the character deforms in a convincing way, free from visual artifacts or self-overlaps.
Mecanim允许利用Muscle你不同骨骼上动作的范围。
一旦你配置好Avatar,Mecanim将理解骨骼的结构并且允许你开始在肌肉的视图上工作。在这里,很容易调整角色的动作尺度并且确保角色使用逼真的方式扭曲,避免过度造作和自我重叠。

You can either adjust individual bones in the body (lower part of the view) or manipulate the character using predefined deformations
which operate on several bones at once (upper part of the view).
你既可以调整单独的身体上的骨骼也可以用预先定义好的操作来操纵很多的骨骼。
The “Translate DoF” option shown at the bottom of the Additional Settings section allows you to enable the use of translation
animations for the humanoid. With this option disabled, the bones are animated using only rotations. You would only want to enable this option if you know your animation contains animated tranlations of some of the bones in your character. Enabling translation
DoF comes with some performance cost as the animation system needs to do an extra step to retarget humanoid animation.
在额外的设置选项底部显示的Translate DoF选项允许你为人形动画开启动画转移的使用。这个选项关闭之后,含有动画的骨骼只能旋转。你应该只在了解到你的角色的骨骼动画中含有带位移的动画才打开这个选项。由于动画系统需要做额外的步骤去重定向人形动画,打开这个选项会造成一定的性能消耗
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: