这是个人看视频学习时所做笔记,现在分享给大家,希望大家喜欢!!
1:创建一节skin骨骼(即绑定骨骼),命名;
《1》选绑定骨骼,复制出一节IK骨骼和一节FK骨骼,修改命名;
《2》给三节骨骼各都创建一个图层,分别设置成:
(1)绑定骨骼为蓝色;
(2)IK骨骼为黄色;
(3)FK为红色;
如图所示:
2:关闭绑定和FK的图层;
如图所示:
3:使用“IK控制柄工具”创建IK(使用“旋转平面解算器”);
(1)命名为:leg_IK;
如图所示:
4:创建2个控制器;
《1》
(1)脚踝控制器,命名为IK_crv;
(2)膝盖控制器,命名为:pole_crv;成组,命名为:pole_crv_grp;
(3)将创建的控制器“冻结变换”和删除历史;
《2》
(1)将IK:Leg_IK按“P”键给控制器IK_crv当子物体;
(2)选控制器pole_crv和IK:ikhandle1,“极向量”约束;
如图所示:
5:关闭IK图层,显示FK图层;
(1)按“ctrl_H”键隐藏给IK骨骼创建的控制器和IK;
如图所示:
6:创建3个FK控制器,命名,成组;
(1)将控制器组按“V”键吸附在对应骨骼上;
如图所示:
7:“方向”约束:
《1》
(1)选骨骼FK_thigh和控制器组FK_thigh_crv_grp;
(2)选骨骼FK_knee和控制器组FK_knee_crv_grp;
(3)选骨骼FK_ankle和控制器组FK_ankle_crv_grp;
《2》
(1)在“大纲视图”删除方向约束节点;
(2)选控制器FK1_con,FK2_con,;旋转轴Z轴90度;
(3)选创建的FK控制器“冻结变换”和删除历史;
(4)将控制器组按“P”键组成层级关系;
如图所示:
8:“父对象”约束:
(1)控制器FK_thigh_crv和骨骼FK_thigh;
(2)控制器FK_knee_crv和骨骼FK_knee;
(3)控制器FK_ankle_crv和骨骼FK_ankle;
如图所示:
9:显示所有图层;
如图所示:
10:“父对象”约束:
《1》IK:
(1)骨骼IK_thigh和骨骼skin_thigh;
(2)骨骼IK_knee和骨骼skin_knee;
(3)骨骼IK_ankle和骨骼skin_ankle;
《2》FK:
(1)骨骼FK_thigh和骨骼skin_thigh;
(2)骨骼FK_knee和骨骼skin_knee;
(3)骨骼FK_ankle和骨骼skin_ankle;
如图所示:
11:创建一个总控制器,命名为IKFK;
(1)鼠标右键选“点”,调整控制器的形状;
(2)将控制器“冻结变换”和删除历史;
(3)按“P”键,将控制器IKFK给骨骼skin_ankle当子物体;
如图所示:
12:给总控制器IKFK“添加属性”switch;
如图所示:
13:打开“表达式编辑器”,编写“显示的是IK,还是FK”的脚本;
编写:
if(IKFK.switch == 0)
{
FK_thigh.visibility = FK_knee.visibility = FK_ankle.visibility = 0;
IK_thigh.visibility = IK_knee.visibility = IK_ankle.visibility = 1;
FK_thigh_crv.visibility = FK_knee_crv.visibility = FK_ankle_crv.visibility = 0;
IK_crv.visibility = 1;
pole_crv.visibility = 1;
}
if(IKFK.switch == 1)
{
FK_thigh.visibility = FK_knee.visibility = FK_ankle.visibility = 1;
IK_thigh.visibility = IK_knee.visibility = IK_ankle.visibility = 0;
FK_thigh_crv.visibility = FK_knee_crv.visibility = FK_ankle_crv.visibility = 1;
IK_crv.visibility = 0;
pole_crv.visibility = 0;
}
skin_ankle_parentConstraint1.FK_ankleW1 = skin_knee_parentConstraint1.FK_kneeW1 = skin_thigh_parentConstraint1.FK_thighW1 = IKFK.switch;
skin_ankle_parentConstraint1.IK_ankleW0 = skin_knee_parentConstraint1.IK_kneeW0 = skin_thigh_parentConstraint1.IK_thighW0 = 1-IKFK.switch;
点击“创建”;
如图所示:
14:关闭IK和FK的图层;
如图所示:
15:选总控制器IKFK,切换它的属性switch的值;
(1)当switch的值为0时,显示的是IK;
(2)当switch的值为1时,显示的是FK;
如图所示: