
上QQ阅读APP看书,第一时间看更新
2.2.3 创建粒子及体积曲线
单击“曲线/曲面”工具架上的“EP曲线工具”图标,如图2-27所示,在场景中绘制一条曲线,如图2-28所示。

图2-27

图2-28
选择曲线,执行“场/解算器”|“体积曲线”命令,如图2-29所示,即可根据曲线的形态创建一个体积曲线场,如图2-30所示。

图2-29

图2-30
在“属性编辑器”面板中,展开“体积控制属性”卷展栏,设置“截面半径”的值为3,如图2-31所示。

图2-31
设置完成后,体积场的显示效果如图2-32所示。

图2-32
单击FX工具架上的“发射器”图标,如图2-33所示,在场景中创建粒子系统。

图2-33
在“属性编辑器”面板中,展开“基本发射器属性”卷展栏,设置“发射器类型”的选项为“体积”,如图2-34所示。

图2-34
在视图中,将发射器的位置移动至曲线的起始点位置处,如图2-35所示。

图2-35
在“大纲视图”面板中选择粒子和体积曲线场,如图2-36所示。

图2-36
执行“场/解算器”|“指定给选定对象”命令,如图2-37所示,使得体积曲线场开始对场景中的粒子产生影响。

图2-37
选择粒子对象,在“属性编辑器”面板中,展开“动力学特性”卷展栏,勾选“忽略解算器重力”选项,如图2-38所示。设置完成后,播放动画,粒子的动画效果如图2-39所示。

图2-38

图2-39
为了使粒子显示得清楚一些,现在可以先将场景中的蝴蝶模型设置为粒子的形状。在“大纲视图”面板中选择蝴蝶模型组合,如图2-40所示。

图2-40
单击菜单栏nParticle|“实例化器”命令后面的方形按钮,如图2-41所示。

图2-41
在弹出的“粒子实例化器选项”面板中,单击“创建”按钮,如图2-42所示,即可将每个粒子的形态都设置为蝴蝶模型,如图2-43所示。

图2-42

图2-43
在场景中选择体积曲线场,展开“体积速率属性”卷展栏,设置“远离轴”的值为-10,如图2-44所示。
设置完成后,再次播放场景动画,可以看到现在场景中生成的n粒子基本上都在体积曲线场的内部进行移动,如图2-45所示。

图2-44

图2-45
在“大纲视图”面板中选择粒子对象,展开“基本发射器属性”卷展栏,设置“速率(粒子/秒)”的值为3,降低发射器在场景中生成的粒子数量,如图2-46所示。

图2-46
设置完成后,播放场景动画,现在看到场景中生成的粒子数量已经大幅减少了,如图2-47所示。仔细观察场景,可以看到现在每个蝴蝶的方向都是一样的,没有跟随路径的弧度而发生改变,看起来不太自然。
展开“实例化器(几何体替换)”卷展栏中的“旋转选项”卷展栏,设置“目标方向”的选项为“速度”,如图2-48所示。

图2-47

图2-48
设置完成后,观察场景,可以看到现在蝴蝶的方向随着曲线的弧度产生了相应的变化,但是蝴蝶的方向与其运动的方向相反,感觉蝴蝶是一边飞舞一边在后退,如图2-49所示。

图2-49
这时,只需要选择最初创建的蝴蝶模型,如图2-50所示。

图2-50
对其进行“缩放”操作,这样就可以更改蝴蝶的方向,如图2-51所示。

图2-51