Rhzhi.Net 主页 | 访问新版
rhzhi.net
网站首页 | 软件新闻 | 操作系统 | 工具软件 | 办公软件 | 网站设计 | 组网专栏 | 平面设计 | 多 媒 体 | 程序开发 | 硬件资料 | 聊天软件
栏 目 索 引
首页 -> 媒体动画-> 3DMax-->文章正文
3DS Max 7.0 PF Source粒子全攻略(9):汽车溅起的水花
太平洋
2005-6-8 文/顾金海




  14、在仓库中将“Position Object”操作符添加到新事件当中,然后选择Position Object对象,在其右侧的参数命令面板中单击By List按钮,在弹出的对话框中选择车体对象,然后勾选“Lock on Emitter(锁定发射器)”选项,这样该粒子就与汽车一起运动了,现在在整个动画过程中,只有一个锁定到汽车的粒子,如图1-14所示。

图1-14

  15、返回到“Event 02”事件当中,从仓库中拖动“Script Operator(脚本操作器)”放在Event02事件的下方,然后使用“Script Operator”控件中的“编辑脚本”按钮编辑脚本,由于脚本操作符提供了默认的脚本,所以我们不需要重新输入脚本,只需要运用其中的自带的一段即可,在这个实例当中我们只保留以下内容即可,将其余的脚本都删除,如图1-15所示。

on ChannelsUsed pCont do
(
pCont.useTime = true
pCont.useSpeed = true
pcont.useInteger = true
)

on Init pCont do
(

)

on Proceed pCont do
(
count = pCont.NumParticles()
timeEnd = pCont.getTimeEnd()
$PFCarSpeedCheck.updateParticles $PFCarSpeedCheck timeEnd
carSpeed = $PFCarSpeedCheck.particleSpeed
for i in 1 to count do
(
pCont.particleIndex = i
if pcont.particleInteger != 1 do -- subtract the motion of the car only once
(
pcont.particlespeed -= 0.8 * carSpeed -- leave 80 percent of the motion
-- now to introduce a little variation in the particle speed to randomize things a little:
pcont.particleSpeed *= 1 - (pcont.rand11() * 0.3)
-- pcont.rand55() is a built in Particle Flow function that generates a random number between -0.5 and 0.5,
-- I then turn that into a -0.3 to 0.3 multiplier, or 30% variation
-- 这样可以对渲染采取更大的积分步长,并仍然避免喷出。
pcont.particleInteger = 1 -- 设置此项以便其在后面循环测试的叠代中会被忽略
)
)
)

on Release pCont do
(

)

图1-15


 

文章页数:[1] [2] [3] [4] [5] [6] 



相关文章
打印此页 投稿与建议 返回顶部
关于我们 - 联系方式 - 合作伙伴 - 网站大事记 - 网站地图 - 我要投稿
Copyright © 1997-2008 先创网 All Rights Reserved.
先创科技 版权所有