__粒子__是由粒子系统大量呈现或移动的简单小型图像或网格。每个粒子代表一小部分流体或无定形实体,而众多粒子将共同营造出完整的实物感。以烟幕云团为例,每个粒子都具备细小烟雾的质感,自身形态类似于微型云团。在场景内,大量的这些微型云团通过排列组合,营造出体积更大的整体云团效果。
每个粒子都有预设的_生命周期_,通常为几秒钟,期间会经历各种变化。粒子由粒子系统产生或者_发射_时,即开始生命周期。该系统在球体、半球体、圆锥体、盒体或任意网格之类的空间区域内随机发射粒子。生命周期结束之后,粒子便不再显示,并被移出系统。系统的_发射速率_表示每秒大约发射的粒子数,不过具体发射次数随机微调。处于“稳定”状态(即,粒子的发射速率和死亡速率相同)的粒子数以及系统达到该状态所需时长取决于粒子的发射速率和平均生命周期。
发射和生命周期设置会影响系统的整体行为,不过粒子个体也会随时间变化。每个粒子都有其__速度__矢量,该矢量决定了粒子在每一帧更新期间移动的方向和距离。系统自身采用的__作用力__和__重力__或者地形 (Terrain) 上将粒子吹散的__风区__都可以改变该速度。每个粒子的颜色、大小和旋转方式也可能在其生命周期内变化,或与其当前的移动速度成比例。粒子的颜色包括 Alpha(透明度)分量,因此粒子可逐渐淡入和淡出,而非突然出现和消失。
多种粒子动态性混合运用时,可以将多种流体效果模拟得栩栩如生。例如,利用稀薄的发射形状,使水粒子单纯受重力下落并逐渐加速,即可模拟瀑布。火堆冒出的烟雾往往会上升、扩散并最终消逝,所以系统应为烟雾粒子设置升力,并随时间的推移增大其体积和透明度。
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.