BlenderCN论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 2976|回复: 7

在Blender使用Rigify创建循环步行动画 Create an Animation Walk Cycle...

[复制链接]
发表于 2016-5-7 18:49:27 | 显示全部楼层 |阅读模式
在Blender使用Rigify创建循环步行动画 Create an Animation Walk Cycle in Blender using Rigify

In our latest Blender tutorial from Karan Shah, you'll learn how to generate a character rig using Blender's Rigify add-on, and how to skin the character using weight painting for precise control over mesh deformation. Finally Karan will walk you through the process of creating an animation walk cycle using keyframing and the dopesheet.
在我们的Karan Shah最新Blender教程,您将学习如何使用Blender的Rigify创建角色的绑定,以及如何使用皮肤权重绘制工具给角色植皮以精确控制网格变形的。最后Karan Shah将引导您通过使用关键帧和dopesheet创建循环步行动画的过程。
Step 1

Open a new file and import the base model (File > Import). You can use any other biped model as well. With the model selected, press Alt+G to clear its location, so that it's placed at the center. Make sure the center of the model (orange dot) is at the bottom of the mesh. If not, Press TAB to get into edit mode and select all vertices with the A key and then Press G and move the vertices up, so that the center point is at the base of the mesh. Press TAB to get out of edit mode.
打开一个新的文件,并导入基础模型(文件>导入) 。你也可以使用任何其他的两足动物模型。选择模型,按下Alt + G以清除它的位置,因此它被放置在中心。确保模型(橙色点)的中心位于网格的底部。如果不是,按TAB键进入编辑模式,A键选择所有的顶点,然后按G移动所有顶点向上,让中心点是在网格的基底。按TAB键离开编辑模式。

Step 2

Next we will enable the Rigify add-on. In the File menu select User Preferences.
下一步,我们将启用Rigify插件。在文件菜单(File)中选择用户首选项( User Preferences)。


Select the Add-on Tab and in the search box type Rigify and check the
tick box to enable it. You may press the "Save as default" button, so that Blender remembers the setting. You can now close the User Preferences Window.
选择插件(Add-on )选项卡在搜索框(search box )输入Rigify,并勾选它。你也许需要让Blender记住你的设置,可以点击"Save as default" 按钮,现在,您可以关闭该用户首选项( User Preferences)窗口。


Step 3

Make sure the 3D cursor is at the center point (bottom) of the mesh. If not, then select the object and press Shift+C and then select cursor to selected. Press Shift+A and select Armature, and now you will notice that there is a new item called Human Meta-Rig. Click on it and you will have a Human Rig.
确保3D光标是在网格的中心点(底部)。如果没有,那么请选择对象并按下Shift + C ,然后选择cursor to selected(光标到选择)。按Shift + A ,选择Armature,现在你会发现,有一个人新的菜单选项Meta-Rig。点击它,你就会有一个人的绑定。



Step 4

With the Human Rig selected, go to the Armature Properties and in the Display Panel, check X-Ray. This will enable us to see the armature through the mesh.
选择人类绑定,到属性面板的Armature选项卡。在Display面板,勾选X-Ray. 这将使我们能够透过网格看到骨架物体。

Step 5

With the Meta-Rig selected, press TAB to enter into edit mode. Scale the rig to match the mesh. Press . (period) to make the 3D cursor the pivot point for rotation and scale, and then Scale the bones. Press , (comma) to make the Median Point the center of rotations / scale.
选择Meta-Rig 物体,按TAB键进入编辑模式,缩放Meta-Rig 物体匹配网格。按.键确保3D光标为pivot point 旋转和缩放,然后缩放骨骼。按,键确保Median Point the center(中心点旋转/ 缩放.


Step 6

Press T to bring out the Tool Shelf and in the Armature Options, check "X axis mirror". This way any editing done on one side will be mirrored to the other.
按T键呼出出工具架,并在骨架(Armature Options)选项,选中“X镜像” ( "X axis mirror")。这种方式在一侧上的任何编辑完成将被镜像到另一个。

Step 7

Select and move the bone tips to match the mesh.
选择并移动骨骼以和网格相匹配。

Check from the Top view as well.
在顶视图都如此匹配网格。


Adjust the leg bones
调整腿部骨骼

Match the bones from the side view. Make sure to keep the knee bone a bit bent forward, i.e.
don't make the leg bones in a straight line. Once done, Save the file.
在侧视图匹配骨骼。确保膝盖骨有些向前弯曲,即不要使腿骨在一条直线上。一旦完成,保存文件。


Step 8

Press TAB to get out of edit mode. In the Armature Properties, under Rigify buttons, click on Generate to build the Rig.
按TAB键离开编辑模式。在Armature 属性,Rigify按钮下,点击Generate (生成)创建绑定系统。

After a few seconds the new Rig setup is generated.
几秒钟后,生成新的绑定系统设置。




 楼主| 发表于 2016-5-7 18:58:26 | 显示全部楼层
Step 9
Now we don't need the previous meta-rig, so move it to another layer. Select the meta-rig and press M and then select the layer in which you want to dump that meta-rig.
现在我们不需要以前的 meta-rig,所以将它移动到另一个图层。选择meta-rig 并按 M 键,然后选择要在其中转储那meta-rig 的层


Step 10

Now we will skin the mesh to the Armature. Select the Mesh first, and then the Generated Rig and press Ctrl+P and select Automatic weight. The mesh is now skinned to the new Armature Setup.
现在我们将为骨架蒙皮。首先选择网格,然后选择创建的绑定系统,然后按Ctrl + P ,然后选择自动权重(Automatic weight)。该网格已经被绑定到新的骨架系统了。


Press Ctrl+Tab or switch to Pose mode and play with the controllers.
按Ctrl + Tab键或切换到姿态模式( Pose ),移动控制器。



Step 11

You can find the deforming bones in the third to last Bone layer (see image). SHIFT+Left click to select it along with other layers. Shift+Left click again to make the bones under this layer invisible.
你可以在倒数的骨骼3层找到变形骨骼(看图)。SHIFT+左键可以加选其它的层,SHIFT+左键再次点击这些层使层不可见。

Make sure you are in Pose mode. Now select the Mesh object and Press Ctrl+Tab to enter into weight paint mode. Select the bones you would like to adjust the weight for by Right-clicking. Press T to bring out the tool shelf and under the Options panel, check X Mirror. This will mirror the weight painting for the left/right bones.
请确保你是在姿势模式。现在选择网格对象,然后按Ctrl + Tab键进入权重绘制模式。通过右键单击选择你想要调整权重的骨头。按T呼出工具架,选项(Options)面板下, 勾选Mirror. 将会镜像权重绘制。


Step 12

You can adjust the weight amount with the slider in the Tool Shelf. You can also adjust the other brush settings.
你可以在工具架滑块调节权重数量。您还可以调整其它画笔设置。

Select the bones and adjust the weight. Do this for any bone you find if the deformation is wrong. To rotate and move, use the controller bones and to adjust the weight paint, select the deforming bones. Check the weight painting for all major bones including the fingers. Painting with a higher weight value means that the vertices will be affected more with the movement of the bone. Similarly painting with a lower value means vertices with be less affected by the bone. Save the file.
选择骨骼和调整权重。如果你发现任何的变形是错误的做这个。旋转和移动,使用控制骨骼和调整权重绘制,选择变形骨骼。检查所有主要的骨头,包括手指的权重绘制。具有更高的权重值意味着顶点会受到骨骼移动的更多影响。类似地较低值意味着顶点受骨骼的影响较小。然后保存文件。


Step 13

Press Ctrl+TAB to exit Weight painting mode. Select the Armature and then Hold Shift+Left Mouse Button on the deforming bones layer to hide them.
按Ctrl + TAB退出权重绘制模式。选择Armature ,然后按住Shift +鼠标左键点击骨头变形层隐藏它们。



Step 14

In Pose mode, select any leg control. Press N to open up the properties shelf. In the Rig Main Properties, Slide up the FK/IK to full. This will enable IK controls for the legs. Do that same for the other leg too.
在姿态模式下,选择任何腿部的控制器。按N打开属性面板。在Rig Main Properties选项,向上滑动FK / IK到满格。这将使IK控制用于腿部。做相同的事情对另一条腿。


You can also toggle on/off the display of the bones layers with the shortcut on the Rig Layer Panel. Hide the bones you are not using. See my settings for an example. You can also
turn off X-ray. We can now start animating.
你也可以使用快捷键在Rig Layer面板打开/关闭骨头层的显示。隐藏不使用的骨头。看到一个例子我的设置。你也可以关闭X-ray.我们现在可以开始制作动画。


Step 15 - Animation

In the Screen Layout Menu, choose Animation. These are presets made for different layouts, best suited for a particular task.
在屏幕布局菜单,选择动画( Animation)。这些预制的不同布局,最适合特定的任务。


Step 16

You will see that the screen has an extra window for the Dope sheet (Top Left). This is where we can see and manipulate the keyframes. In the Dopesheet window, choose Action Editor Mode. Dope sheet mode will show the keyframes of all objects and Armature bones, where as the Action editor shows keyframes of a particular action of the armature.
你会看到屏幕上一个另外的摄影表窗口(左上)。在这里,我们可以查看和操作关键帧。在摄影表窗口(Dopesheet)。选择动作编辑器( Action Editor )模式。摄影表模式将显示所有物体的关键帧和骨架的骨头,其中的动作编辑器显示的骨架的特定动作的关键帧。


回复 支持 反对

使用道具 举报

 楼主| 发表于 2016-5-7 19:03:29 | 显示全部楼层
Step 17

Click on the Record Button. This will automatically add keyframe to the selected object whenever it is Moved, Rotated or Scaled.
点击录制(Record )按钮。这将自动添加关键帧到选定的物体,当它被移动,旋转或缩放时。


Step 18

Move the mouse over the 3D view and press 3 on the numpad to get into the side view. Make sure you are in Ortho view mode and not in Perspective. Press 5 on the numpad to toggle off/on perspective view. Also make sure you are at the First Frame. Press Shift+Left Arrow to get to the first frame. Select the Left Foot bone controller and move it forward. You will notice that a keyframe is automatically created in the Dopesheet/ Action Editor at the first frame mark.
将鼠标移动到3D视图,然后按数字键3就可以进入侧视图。确保你是在正交模式视图而不是在透视图。按数字键5可以打开/关闭透视图。另外,还要确保你在第一帧。按Shift +左箭头去到第一帧。选择左脚骨控制器和向前移动。你会发现,一个关键帧将被自动的创建在Dope sheet 摄影表/动作编辑器第一帧。

Achieve the following pose at the first frame. To move a bone, select it and then press G, and R to rotate. To move the whole torso, use the Torso bone.
在第一帧实现以下姿态。要移动骨骼,选择它,然后按G,和R旋转。移动整个躯干,用躯干骨。

Step 19

Now pose the arms. The arms swing oppose to the legs. i.e. if right legs is forwards, then left hand will be forward. Remember we are still at frame 1.
现在是手臂姿势。手臂摆动是和腿相反的。也就是说,如果右腿向前是,那么左手就会向前发展。请记住,我们仍处于第1帧。

Step 20

Twist the hip bone with the flow of the legs.
随着腿部的运动而扭转臀部骨骼。

Rotate the shoulders with the flow of arms. The shoulder and hips will rotate opposite to each other. We have completed the First Keyframe for the walkcycle.
随着手臂的运动而旋转肩部。肩部和臀部将彼此相对旋转。我们已经完成了步行周期的第一个关键帧。

Select the head and in the Bone Properties, Uncheck "Inherit Rotation". This will prevent the head from inheriting the rotation from the lower bones. Move the torso or chest and you will get the idea.
选择头部在Bone属性选项卡,取消选中“Inherit Rotation” 。这将防止头部继承来自较低的骨骼的旋转。移动躯干或胸部,你会得到的想法。

回复 支持 反对

使用道具 举报

 楼主| 发表于 2016-5-7 19:13:26 | 显示全部楼层
Step 21

Press A to select all bones. Although the keyframes are added to the bones which are changed, you can also add a key frame to all bones. Select all the bones with the A key and then Press I and select LocRot.

按A键选中所有的骨头。虽然关键帧被添加到该改变的骨头,但你还可以将关键帧添加到所有的骨头。A键选择所有的骨头,然后按I键并选择LocRot 。


Click on the Copy Pose button on the header of the 3D view.
点击在3D视图的标题(Copy Pose)复制姿势按钮。


Step 22

Drag the Timeline marker to frame number 21. You can see all the places in the image, where you can see the current frame number. You can also Press Shift+Up arrow to jump 10 frames at a time. Save the file.
拖动时间轴标记到21帧。当你查看当前帧时你可以在图像看到所有的位置。您也可以按Shift +向上箭头一次跳10帧。保存文件。

Step 23

On the 21st frame click on the Last button - Flip Paste. This will flip-paste or invert-paste the pose we copied, and will also insert the keyframes to the selected bones (all). Go to first frame (shift+Left arrow) and then press the play button to preview the animation. The keyboard shortcut to play the animation is Alt+A. To stop, press the Stop button or Alt+A again.
在21帧点击 最后一个按钮 - Flip Paste(翻转粘贴)。这将翻转粘贴我们所有复制的姿势,并且也将插入关键帧到所选择的骨头(全部) 。转到第一帧( SHIFT +左箭头),然后按播放键预览动画。键盘播放动画快捷键 Alt + A 。要停下来,再次按下停止按钮或按再次按Alt + A 快捷键。

Step 24

Go to frame 11. Pull up the torso, move the foot up. In short, have a pose similar to the one in the image. Now go to frame 1 and press play or press Alt+A to preview the animation. We now have a half step completed.
转到11帧 拉起躯干,向上移动脚。总之,具有类似于所述图像中的姿态。现在到第1帧,然后按播放按钮或按Alt + A来预览动画。我们现在完成有一半步。


Step 25

Now go to frame 11 where we have a keyframe. Select all bones with the A key and click on the Copy pose button.
现在去帧11 ,我们有一个关键帧。A键选择所有骨骼和点击复制姿势(Copy pose)按钮。

Step 26

Drag the timeline to frame 31 and click on the flip-paste button, as we want the pose to be inverted.
拖动时间轴到31帧 ,点击翻页粘贴( flip-paste )按钮,因为我们希望姿势反转。

回复 支持 反对

使用道具 举报

 楼主| 发表于 2016-5-7 19:27:28 | 显示全部楼层
Step 27

Now the cycle will end with the pose the same as the first pose, so we will copy that from frame one and then paste as is on frame 41. So go to frame one and select all the bones and copy the pose and paste it on frame 41. OR you can select the 1st keyframe in the dopesheet summery, and the press Shift+D to make a duplicate. Go to frame 41 and Left-click to confirm its position.
现在循环结束姿势和第一帧一样,所以我们将从第一帧复制并粘贴到41帧。所以到第一帧选择所有的骨骼复制姿势并粘贴到41帧。或者您也可以选择在dopesheet第一关键帧,然后按Shift键+ D进行复制。转至帧41和左键单击以确认其位置。



Press Play and preview the complete walk cycle.
按播放和预览完整的步行周期。
Step 28

To preview the animation in a loop, Type '40' in the End frame limit box. We are having the last keyframe on frame number 41, and this one is the same as the First frame. So in order to see a perfect loop, we will end the cycle at the 40th frame. So that it will go to frame one right after frame 40.
要循环预览动画,在End frame框输入'40' 。我们有最后的关键帧在41帧,这一帧和第一帧是一样的。因此,为了看到一个完美循环,我们将结束周期在第40帧中。因此,它会在40帧后跳至第一张帧。

Step 29

Now we will tweak the motion just a little bit in between the main key frames. Go to frame 4 and rotate the foot so that it rests completely on the ground. Also pull down the main torso bone a bit. Do the same for the other foot and torso on frame 24. You can copy and Flip-Paste the pose from frame 4.
现在,我们将一点点的调整主要关键帧之间的运动。转到帧4并旋转脚,使其完全落在地面上。也拉下主躯干骨。在帧24做同样在另一只脚和躯干上,可以从帧4复制然后翻转粘贴姿势。


Step 30

To make it walk faster, you can move the key frames closer to each other. Alternatively, go to frame 1, with the timeline on frame 1, in the dopesheet editor. Press A to select all keyframes. Press S to Scale, move the mouse towards the left and then Left-click to confirm. I have reduced the walk cycle from 41 to 28 frames, and so the End Frame to preview the animation is 27. The walk cycle is now ready for export. Of course you can add more details.
为了使它走得更快,你可以移近的相邻的关键帧。或者,也可以用时间轴到第1帧,在摄影表(dopesheet)编辑器到第1帧。按A键选中所有关键帧。按S键缩放,移动鼠标向左,然后左键点击确认。我已经减少了步行周期从41到28帧,所以帧结束预览动画在27帧.步行周期已经准备好用于输出了。当然,你可以添加更多的细节。


In the Dope sheet editor, You can name this action as Walk, or anything you like. Drag the header of the dopesheet window, with the middle mouse button if you don't see the name box. And finally Save the file.
在摄影表(Dopesheet)编辑器,你可以命名这个动作为Walk,或任何你喜欢的。如果你看不到的name(名称框), 用鼠标中键拖动摄影表(Dopesheet)窗口的标题。最后保存文件。


回复 支持 反对

使用道具 举报

发表于 2017-7-16 20:52:07 | 显示全部楼层
补充一句,使用rigify前,要先在 “用户设置面板—文件”处勾选“自动执行python脚本”。
回复 支持 反对

使用道具 举报

发表于 2017-7-17 12:35:43 | 显示全部楼层
rigify绑定之后,如果骨骼移动有问题,可以看看rigify的设置面板里面各个骨骼的值 0U4LASDR[G{[OJY6FE8~5YL.png
回复 支持 反对

使用道具 举报

发表于 2018-12-10 11:50:07 | 显示全部楼层
十分感谢楼主分享
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

站长推荐上一条 /1 下一条

Blender最新中文教学视频|Blender头条|小黑屋|手机版|Archiver|Blender中国 ( 蜀ICP备17002929号 )360网站安全检测平台

GMT+8, 2019-9-21 22:04 , Processed in 0.035208 second(s), 20 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表