unity动画入门_Unity 2D动画包入门

unity动画入门

Have you been looking for an easy way to create skeletal animation for your 2D sprites? We’re introducing our own 2D Animation package, which allows you to rig 2D sprites, paint bone weights, and create skeletal animation, all in-editor! On top of that, there is support for Inverse Kinematics as well. You can check the feature out right now – it’s been available as a package in preview since  2018.1. Read on to learn how to use it effectively in your projects right now.

您是否一直在寻找一种简便的方法来为2D精灵创建骨骼动画? 我们将介绍我们自己的2D动画包,它允许您在所有编辑器中装配2D精灵,绘制骨骼权重并创建骨骼动画! 最重要的是,还支持逆运动学。 您可以立即检出此功能-自2018.1起已作为预览包提供。 请继续阅读以了解如何立即在您的项目中有效使用它。

获取包装 (Getting the Package)

2D Animation is currently shipped as a preview package, which means you can use Unity’s Package Manager to install it for your project. The Package Manager is accessible from Unity 2018.1 or higher. Make sure to also grab the 2D IK package if you are planning on using Inverse Kinematics too – they will be covered in a separate blog post, coming out later this month.

2D动画目前作为预览包提供,这意味着您可以使用Unity的包管理器为您的项目安装它。 可从Unity 2018.1或更高版本访问软件包管理器。 如果您也打算使用Inverse Kinematics,也请确保也要获取2D IK软件包-它们将在本月晚些时候发布的单独博客文章中介绍。

资产导入注意事项 (Notes on Importing Assets)

In order to start animating, we’re going to need a couple of things: the first is, of course, the sprite that we wish to animate. It can be anything you want – a character, a monster, an object… you name it!

为了开始制作动画,我们需要做两件事:首先,当然是我们希望制作动画的精灵。 它可以是任何您想要的东西-角色,怪物,物体……随便命名!

There are a few things to keep in mind when importing your sprites for 2D Animation. First of all, there is currently no layer support. This means that if you wish your rig to use multiple disjointed sprite meshes, e.g. for arms and legs, you will need to space them out directly on one layer. Full layer support is planned to be included in a later release of the package – where it will support layer import from PSD and other file formats. In addition, there is currently no integration with Unity’s new Vector Graphics package, which includes SVG file import. Support for this is also in the works.

导入2D动画的精灵时,需要牢记一些注意事项。 首先,当前没有图层支持。 这意味着,如果您希望装备使用多个不连续的Sprite网格物体(例如,用于手臂和腿部),则需要将它们直接在一层上隔开。 计划在该软件包的更高版本中包括对全层的支持–在此版本中,它将支持从PSD和其他文件格式的层导入。 此外,当前没有与Unity的新Vector Graphics软件包集成,该软件包包括SVG文件导入。 也正在为此提供支持。

With all of that in mind, let’s import your sprite. The example we use in this article is Ríkr the Viking. We’ll make this character available for you to experiment soon. It has been divided into multiple sprites and re-arranged on one layer:

考虑到所有这些,让我们导入您的精灵。 我们在本文中使用的示例是维京海盗。 我们将使您可以尝试使用此角色。 它已被分成多个精灵,并在一层上重新排列:

建立2D骨架 (Building a 2D Skeleton)

All of the 2D rigging happens in the Sprite Editor. To access it, select your character sprite asset, and then in the Inspector window you will find the Sprite Editor button.

所有2D装配都在Sprite Editor中进行。 要访问它,请选择您的角色精灵资源,然后在“检查器”窗口中找到“精灵编辑器”按钮。

In the top left-hand corner of the Sprite Editor, you will see a dropdown with the Sprite Editor selected. Change that to the Bone Editor, and from here, we can start creating the first bones of our rig! In the bottom right-hand corner, you will see an array of bone-editing tools.

在Sprite Editor的左上角,您会看到一个下拉菜单,其中选择了Sprite Editor。 将其更改为Bone Editor,然后从这里开始创建装备的第一个骨骼! 在右下角&

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值