Unity粒子系统
Posted Jason_c
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Unity粒子系统相关的知识,希望对你有一定的参考价值。
最近比较清闲,就重新看了一遍例子系统,感觉能把效果做的炫酷对于初学者来说并不是一件容易的事,但是回头想想,最重要的原因可能还是没有把Particle Systems组件研究透吧,温故而知新,一起复习一下粒子系统吧。
下面是Unity5.5.0版本的粒子系统官方文档的翻译
- Main module//主要模块
- Emission//发射
- Shape//形状
- Velocity Over Lifetime//粒子在生命周期内的速度
- Limit Velocity Over Lifetime//粒子在生命周期内的极限速度
- Inherit Velocity//速度继承
- Force Over Lifetime//粒子在生命周期内的受力
- Color Over Lifetime//粒子在生命周期内的颜色
- Color By Speed//颜色随速度变化
- Size over Lifetime//粒子在生命周期内的大小
- Size by Speed//大小随速度变化
- Rotation Over Lifetime//粒子在生命周期内的旋转
- Rotation By Speed//旋转随速度变化
- External Forces//外力
- Noise//噪声
- Collision//碰撞器
- Triggers//触发器
- Sub Emitters//物体发射源
- Texture Sheet Animation//纹理动画
- Lights//灯光
- Trails//拖尾
- Renderer//渲染
- Resimulate
- Selection
- Bounds
这个模块包含全局属性,影响全局系统。
Property: | Function: |
---|---|
Duration//持续 |
整个粒子系统运行的时间 |
Looping//循环 |
如果启用,系统将在其持续时间结束时再次启动并继续重复循环 |
Prewarm//预热 |
如果启用,系统将被初始化,好像它已经完成了一个完整的循环(only works if Looping is also enabled). |
Start Delay//延迟启动 |
Delay in seconds before the system starts emitting once enabled. |
Start Lifetime//生命周期 |
The initial lifetime for particles. |
Start Speed |
每个粒子在适当方向上的初始速度 |
3D Start Size | 控制各个轴的尺寸 |
Start Size | The initial size of each particle.//initial初始 |
3D Start Rotation | Enable this if you want to control the rotation of each axis seperately. |
Start Rotation | The initial rotation angle of each particle. |
Randomize Rotation Direction//随机旋转方向 |
导致一些粒子在相反方向旋转 |
Start Color | The initial color of each particle. |
Gravity Modifier//重力修改 |
Scales the gravity value set in the physics manager. A value of zero will switch gravity off. |
Simulation Space//模拟空间 |
Toggles whether particles are animated in the parent object’s local space (therefore moving with the parent object) or in the world space. |
Scaling Mode//扩展模式 |
Use the scale from the transform. Set to Hierarchy, Local or Shape. Local applies only the particle system transform scale. Shape mode applies only the scale to the start position of the particles. |
Play on Awake | If enabled, the particle system starts automatically when the object is created. |
Max Particles//最大粒子数 |
The maximum number of particles in the system at once. Older particles will be removed when the limit is reached.委婉 |
【Emission module】
这个模块的属性影响粒子系统发射的速度和时间。
Property | Function |
---|---|
Rate over Time | 单位的时间发出的粒子数。 |
Rate over Distance | 单位的移动距离发出的粒子数。 |
Bursts//爆发,爆炸 | 粒子爆炸事件。这些设置允许粒子在指定的时间发出。 |
Time | 粒子爆发的时间,单位秒。 |
Min | 爆发粒子数最小值。 |
Max | 爆发粒子数最大值。 |
Cycles | 爆发多少次。 |
Interval | 每一次爆发的时间间隔,单位秒。 |
【Particle System Shape Module】
这个模块定义了粒子可以从什么形状中发射以及起始速度的方向。
Property | Function |
---|---|
Shape//形状 | 发射体的形状 |
Sphere | 各个方向均匀发射 |
Hemisphere//半球 | 在一个面的一侧,各个方向均匀发射 |
Cone//锥体 | 以锥体的形式发射 |
Box | 以箱体的形式发射,粒子沿着发射器的Z轴移动 |
Mesh | 以网格的形式发射。选这个模式有一个额外的菜单,用于选择是从网格顶点、三角形、或者边缘发射粒子 |
MeshRenderer | Emission from a reference to a GameObject’s Mesh Renderer. |
SkinnedMeshRenderer | Emission from a reference to a GameObject’s Skinned Mesh Renderer. |
Circle | Uniform emission from the centre of edge of a circle. The particles move only in the plane of the circle. |
Edge | Emission from a line segment. The particles move in the emitter object’s upward (Y) direction. |
Angle (Cone only) |
The angle of the cone at its point. An angle of 0 produces a cylinder while an angle of 90 gives a flat disc. |
Radius (Sphere, Hemisphere, Cone, Circle and Edgeonly) |
The radius of the circular aspect of the shape. |
Length (Cone only, when using one of the volume Emit from modes) |
The length of the cone. |
Box X, Y, Z (Box only) |
Width, height and depth of the box shape. |
Mesh (Mesh, MeshRenderer and SkinnedMeshRenderer only) |
The Mesh that provides the emitter’s shape. |
Emit from Shell (Sphere and Hemisphere only) |
Enable this to make particles be emitted from the outer surface rather than the inner volume of the shape. |
Emit from (Cone only) |
Selects the part of the cone to emit from: Base, Volume, Base Shell or Volume Shell. |
Arc (Circle only) |
The angular portion of a full circle that forms the emitter’s shape. |
Emit From Edge (Circle only) |
Enable this to make particles be emitted from the edge of the circle rather than the centre. |
Single Material | Should the particles be emitted from a particular sub-Mesh (identified by the material index number). If enabled, a numeric field is shown allowing you to specify the material index number. |
Use Mesh Colors | Use, or disregard, Mesh colors. |
Normal Offset | Distance away from the surface of the Mesh to emit particles (in the direction of the surface normal) |
Align to Direction | This will cause particles to be rotated based on their initial direction of travel. To apply a custom rotation direction on top of this setting, configure the Start Rotation setting in the Main module. |
Random Direction | When enabled, the particles’ initial direction will be chosen randomly. |
以上是关于Unity粒子系统的主要内容,如果未能解决你的问题,请参考以下文章