Unity3D基础教程2-6:粒子系统(Particle Systems)

2014-08-08 18:29:40|?次阅读|上传:huigezrx【已有?条评论】发表评论

关键词:Unity3D, 游戏, 虚拟现实|来源:唯设编程网

Unity Manual —> User Guide > Building Scenes > Particle Systems


Particles are essentially 2D images rendered in 3D space. They are primarily used for effects such as smoke, fire, water droplets, or leaves. A Particle System is made up of three separate Components: Particle Emitter, Particle Animator, and a Particle Renderer. You can use a Particle Emitter and Renderer together if you want static particles. The Particle Animator will move particles in different directions and change colors. You also have access to each individual particle in a particle system via scripting, so you can create your own unique behaviors that way if you choose.

粒子本质上是2D图象在3D空间的渲染。它们主要用于诸如烟,火,水飞沫,或树叶的装饰。一个 粒子系统由三个独立的组件组成: 粒子发射器, 粒子动画,以及 粒子渲染。如果你想建一个静态粒子,你可以使用一个粒子发射器和渲染结合处理。动画的粒子会移动不同的方向的粒子和改变颜色的粒子。你还可以在粒子系统中通过脚本访问每个粒子,因此,你可以选择创建自己独特的行为方式。

Please view the Particle Scripting Reference here.

粒子脚本参考 请查看这里

The remainder of this page's text is from the Particle Component Reference pages.

此网页的文本的其余部分是来之 粒子组件参考 页。

Particle Components


Particle Systems  粒子系统

Particle Systems in Unity are used to make clouds of smoke, steam, fire and other atmospheric effects. Particle Systems work by using one or two Textures & drawing them many times, creating a chaotic effect.


Unity3D基础教程2-4:粒子系统(Particle Systems)
A Particle System included in the Standard Assets  标准资产包含的一个粒子系统

A typical Particle System in Unity is an object that contains a Particle Emitter, a Particle Animator and a Particle Renderer. The Particle Emitter generates the particles, the Particle Animator moves them over time, and the Particle Renderer draws them on the screen.


If you want your particles to interact with the world, add a Particle Collider Component to the GameObject.


Ellipsoid Particle Emitter  椭圆体的粒子发射器

The Ellipsoid Particle Emitter spawns particles inside a sphere. Use the Ellipsoid property below to scale & stretch the sphere.


Unity3D基础教程2-4:粒子系统(Particle Systems)
The Ellipsoid Particle Emitter Inspector  椭圆体粒子发射器检视板

Properties 属性




If enabled, the emitter will emit particles.


Min Size


The minimum size each particle can be at the time when it is spawned.


Max Size


The maximum size each particle can be at the time when it is spawned.


Min Energy


The minimum lifetime of each particle, measured in seconds.


Max Energy


The maximum lifetime of each particle, measured in seconds.


Min Emission


The minimum number of particles that will be spawned every second.


Max Emission


The maximum number of particles that will be spawned every second.


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.




Scale of the sphere along X, Y, and Z that the particles are spawned inside.


Min Emitter Range


Determines an empty area in the center of the sphere - use this to make particles appear on the edge of the sphere.



Details 详细说明

Ellipsoid Particle Emitters (EPEs) are the basic emitter, and are included when you choose to add a Particle System to your scene from Components->Particles->Particle System. You can define the boundaries for the particles to be spawned, and give the particles an initial velocity. From here, use the Particle Animator to manipulate how your particles will change over time to achieve interesting effects.

椭圆体粒子发射器(EPEs)是基本发射器,当你从Components->Particles->Particle System菜单选择增加一个粒子系统到你的场景时已经包含在其中。

Particle Emitters work in conjunction with Particle Animators and Particle Renderers to create, manipulate, and display Particle Systems. All three Components must be present on an object before the particles will behave correctly. When particles are being emitted, all different velocities are added together to create the final velocity.

粒子发射器与 粒子动画师粒子渲染协同去创建,处理和显示粒子系统。在粒子正常运转之前,这三个组件必须存在于一个对象上。当粒子被发射,所有不同的速度相加形成粒子最终的速度。

Spawning Properties (粒子)产生属性

Spawning properties like Size, Energy, Emission, and Velocity will give your particle system distinct personality when trying to achieve different effects. Having a small Size could simulate fireflies or stars in the sky. A large Size could simulate dust clouds in a musky old building.


Energy and Emission will control how long your particles remain onscreen and how many particles can appear at any one time. For example, a rocket might have high Emission to simulate density of smoke, and high Energy to simulate the slow dispersion of smoke into the air.


Velocity will control how your particles move. You might want to change your Velocity in scripting to achieve interesting effects, or if you want to simulate a constant effect like wind, set your X and Z Velocity to make your particles blow away.


Simulate in World Space全局空间模拟

If this is disabled, the position of each individual particle will always translate relative to the Position of the emitter. When the emitter moves, the particles will move along with it. If you have Simulate in World Space enabled, particles will not be affected by the translation of the emitter. For example, if you have a fireball that is spurting flames that rise, the flames will be spawned and float up in space as the fireball gets further away. If Simulate in World Space is disabled, those same flames will move across the screen along with the fireball.

如这项是禁用的,每个个体粒子的坐标(位置)总转化为相对与该发射器的相对坐标。当发射器移动,粒子将随着该发射器移动。若Simulate in World Space选项是启用的,粒子将不受到发射器变换的影响。例如,你有一个火焰溅射上升的火球,作为火球的火焰将分散并悬浮在空间更远。若Simulate in World Space项是禁用的,这些相同火焰将随着火球在屏幕上一起移动。

发表评论0条 】
Unity3D基础教程2-6:粒子系统(Particle Systems)