Animation Clips && Animation from External Sources

来源:互联网 发布:java程序员项目经验 编辑:程序博客网 时间:2024/06/08 19:55
Animation Clips
Animation Clips are one of the core elements to Unity’s animation system. Unity supports importing animation from external sources, and offers the ability to create animation clips from scratch within the editor using the Animation window.
动画片段是unity动画系统的核心元素之一。untiy支持外部来源的导入动画,也提供在动画窗口用拖的方式创建动画。
Animation from External Sources 外部来源的动画
Animation clips imported from external sources could include:
外部导入的动画片段包括:
  • Humanoid animations captured at a motion capture studio
动作捕捉平台上捕获的人形动画。
  • Animations created from scratch by an artist in an external 3D application (such as 3DS Max or Maya)
美术人员在3D软件(比如Maya,3D Max)中创建的动画。
  • Animation sets from 3rd-party libraries (eg, from Unity’s asset store)
第三方库导入的动画(比如 unity的资源商店)
  • Multiple clips cut and sliced from a single imported timeline.
从导入的动画上剪切出来的多个片段。
An example of an imported animation clip, viewed in Unity’s inspector window
Animation Created and Edited Within Unity(untiy内部创建和编辑动画)
Unity’s Animation Window also allows you to create and edit animation clips. These clips can animate:
uniuty的动画窗口也允许你创建和编辑动画片段。这些片段可以动画 
  • The position, rotation and scale of GameObjects
物体的位置旋转和大小
  • Component properties such as material colour, the intensity of a light, the volume of a sound
组件属性比如材质的颜色,光照的密度,声音的音量等
  • Properties within your own scripts including float, int, Vector and boolean variables
你自己的脚本中的属性比如float int vector bool
  • The timing of calling functions within your own scripts
调用你的脚本中函数的时间
An example of Unity’s Animation window being used to animate parameters of a component - in this case, the intensity and range of a point light
Animation from External Sources
Overview of Imported Animation
Animation from external sources is imported into Unity in the same way as regular 3D files. These files, whether they’re generic FBX files or native formats from 3D software such as Maya, Cinema 4D, 3D Studio Max, can contain animation data in the form of a linear recording of the movements of objects within the file.
外部的动画都是以同样的3D文件的格式导入unity.无论这些文件是通用的FBX文件或者3D软件例如Maya,Cinema4D,3D StudioMax中的原始文件,都以线性的方式包含着物体移动的动画数据。
In some situations the object to be animated (eg, a character) and the animations to go with it can be present in the same file. In other cases, the animations may exist in a separate file to the model to be animated.
It may be that animations are specific to a particular model, and cannot be reused on other models. For example, a giant octopus endboss in your game might have a unique arrangement of limbs and bones, and its own set of animations.
在一些情况下,含有动画的物体和它跟随的动画可能在同一个文件中。在其他的情况下,一个含有的动画的物体的动画可能存在另一个单独的文件中。那些动画可能只针对一个特定的模型,并且不能被其他的模型复用。例如,在你的游戏中一个巨大的章鱼最终BOSS可能拥有唯一的四肢和骨骼,和它自己的一套动画。
In other situations, it may be that you have a library of animations which are to be used on various different models in your scene. For example, a number of different humanoid characters might all use the same walk and run animations. In these situations, it’s common to have a simple placeholder model in your animation files for the purposes of previewing them. Alternatively, it is possible to use animation files even if they have no geometry at all, just the animation data.
在其他情况下,也有可能你用一个动画的库,这些动画可以被应用到你场景中各种不同的模型上。例如,许多人形的角色全部都使用相同的走和跑步的动画。在这种情况下,非常普遍的是在你的动画文件中有一个简单的占位模型去为了预览动画。或者,也可能用那些只有动画数据而没有任何几何数据的动画文件。
When importing multiple animations, the animations can each exist as separate files within your project folder, or you can extract multiple animation clips from a single FBX file if exported as takes from Motion builder or with a plugin / script for Maya, Max or other 3D packages. You might want to do this if your file contains multiple separate animations arranged on a single timeline. For example, a long motion captured timeline might contain the animation for a few different jump motions, and you may want to cut out certain sections of this to use as individual clips and discard the rest. Unity provides animation cutting tools to achieve this when you import all animations in one timeline by allowing you to select the frame range for each clip.
当导入多个动画的时候,在你的文件中动画可以以单独的文件存在,或者如果你需要从动作创建器或者使用maya,max或其他3d包中导出的单独的FBX,你可以从这个FBX抽取出多个动画片段。你可能想要做动画的分离,如果你的文件包含了几个在一个单独的时间线上排列的动画。例如,一个长的动画捕捉时间线可能包含了几个不同的跳跃动作的动画,你也许想要切出这个动画的特定的部分去用作单独的片段,然后丢弃掉剩下的部分。当你在一个时间线上导入所有的动画时,Unity通过允许你选择每个片段的帧的范围来提供动画剪切工具去达到这个目。
Importing Animation Files
Before any animation can be used in Unity, it must first be imported into your project. Unity can import native Maya (.mb or .ma), 3D Studio Max (.max) and Cinema 4D (.c4d) files, and also generic FBX files which can be exported from most animation packages (see this page for further details on exporting). To import an animation, simply drag the file to the Assets folder of your project. When you select the file in the Project View you can edit the Import Settings in the inspector:
The Import Settings Dialog for a mesh
See the FBX importer page for a full description of the available import options.



0 0
原创粉丝点击