先从最简单的粒子特效做起,点击[GameObject]->[Create Other]->[Particle System],此时在场景中创建一个粒子系统。如下图所示:
选中场景中的粒子系统,点击[Component]->[Effects]->[Legacy Particles]->[Ellipsoid Particle Emitter] 以及 [Particle Animator] 为粒子系统实例分别添加粒子发射器和粒子动画器。
如下图:
以下是关于两个编辑器中属性的官方文档,在重要地方已经用中文简单标准了:
[Ellipsoid Particle Emitter]
Emit | If enabled, the emitter will emit particles. |
Min Size | The minimum size each particle can be at the time when it is spawned. 粒子尺寸Min |
Max Size | The maximum size each particle can be at the time when it is spawned. 粒子尺寸Max |
Min Energy | The minimum lifetime of each particle, measured in seconds. 粒子存活时间Min |
Max Energy | The maximum lifetime of each particle, measured in seconds. 粒子存活时间Max |
Min Emission | The minimum number of particles that will be spawned every second. 发射数量Min |
Max Emission | The maximum number of particles that will be spawned every second. 发射数量Max |
World Velocity | The starting speed of particles in world space, along X, Y, and Z. |
Local Velocity | The starting speed of particles along X, Y, and Z, measured in the object’s orientation. |
Rnd Velocity | A random speed along X, Y, and Z that is added to the velocity. |
Emitter Velocity Scale | The amount of the emitter’s speed that the particles inherit. |
Tangent Velocity | The starting speed of particles along X, Y, and Z, across the Emitter’s surface. |
Simulate In World Space | If enabled, the particles don’t move when the emitter moves. If false, when you move the emitter, the particles follow it around. |
One Shot | If enabled, the particle numbers specified by min & max emission is spawned all at once. If disabled, the particles are generated in a long stream. 勾选后只播放一次 |
Ellipsoid | Scale of the sphere along X, Y, and Z that the particles are spawned inside. |
MinEmitterRange | Determines an empty area in the center of the sphere – use this to make particles appear on the edge of the sphere. |
[Particle Animator]
Does Animate Color | If enabled, particles cycle their color over their lifetime. |
Color Animation | The 5 colors particles go through. All particles cycle over this – if some have a shorter life span than others, they will animate faster. |
World Rotation Axis | An optional world-space axis the particles rotate around. Use this to make advanced spell effects or give caustic bubbles some life. |
Local Rotation Axis | An optional local-space axis the particles rotate around. Use this to make advanced spell effects or give caustic bubbles some life. |
Size Grow | Use this to make particles grow in size over their lifetime. As randomized forces will spread your particles out, it is often nice to make them grow in size so they don’t fall apart. Use this to make smoke rise upwards, to simulate wind, etc. |
Rnd Force | A random force added to particles every frame. Use this to make smoke become more alive. |
Force | The force being applied every frame to the particles, measure relative to the world. |
Damping | How much particles are slowed every frame. A value of 1 gives no damping, while less makes them slow down. |
Autodestruct | If enabled, the GameObject attached to the Particle Animator will be destroyed when all particles disappear. |
粒子发射器的基本作用是控制粒子的大小数量速度方向之类,而粒子动画器更进一步精确驱动每个粒子在场景中的外观及行为。
另外,常用的还有一个粒子渲染器,其作用是为粒子精灵设置特定的材质和贴图。点击[Component]->[Effects]->[Legacy Particles]->[Particle Renderer]
这里需要注意一点,如果需要出现如上图的界面,而不需要自带的特性,需要删除Particle System组建,右键单击 Remove Component,之后继续添加Renderer组建:
另附上Particle Renderer的官方文档
[Particle Renderer]
Materials | Reference to a list of Materials that will be displayed in the position of each individual particle. |
Camera Velocity Scale | The amount of stretching that is applied to the Particles based on Camera movement. |
Stretch Particles | Determines how the particles are rendered. |
Billboard | The particles are rendered as if facing the camera. |
Stretched | The particles are facing the direction they are moving. |
SortedBillboard | The particles are sorted by depth. Use this when using a blending material. |
VerticalBillboard | All particles are aligned flat along the X/Z axes. |
HorizontalBillboard | All particles are aligned flat along the X/Y axes. |
Length Scale | If Stretch Particles is set to Stretched, this value determines how long the particles are in their direction of motion. |
Velocity Scale | If Stretch Particles is set to Stretched, this value determines the rate at which particles will be stretched, based on their movement speed. |
UV Animation | If either of these are set, the UV coordinates of the particles will be generated for use with a tile animated texture. See the section on Animated Textures below. |
X Tile | Number of frames located across the X axis. |
Y Tile | Number of frames located across the Y axis. |
Cycles | How many times to loop the animation sequence. |
接下来即可根据官方文档的释义来对粒子发生器进行调整以达到预期的效果。
BeiTown
2012.12.18