Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin


This tutorial covers the basic functions of the particle system, and more specifically, demonstrates how to create a fire effect.

In preparation for the tutorial, start the Sandbox Editor and open an already created level.

Table of Contents

Prepare a New Particle Library

Particle Library

Most of the data in CryENGINE is handled and stored in libraries. The Particle Effect libraries are stored in the game folder, under: Game\Libs\Particles.

To create a particle effect, start by preparing a new particle library.

Opening the Database View

On the View menu, click Open View Pane, and then click DataBase View to open the DataBase View.

Adding a New Library

In the Database View, among the tabs at the top of the window, is the Particles tab. This is where all the Particle libraries are found.

Before creating a new particle, choose a library in which to place it. The best way to do this is to first create a new library.

The default library is called Level and should be active. You can create as many Particle libraries as you need. They will each be saved as a separate file in the game folder.

Select the Particles tab and click the Add Library button to create a new library.

In the New Library Name window, enter MyTutorials as the name of the library.

Adding a New Particle Effect to the Library

Click the Add New Item button to add a new particle effect. All effects will be organized in groups. As you don't have any groups yet, you have to create a new group too.

In the New Particle Name window, enter ExampleFire as the name of the Group and Fire1 as the name of the particle.

The new particle will be displayed in the particle list. Now, you're ready to work on it.

On the File menu, click Save to save the progress.

Preparing the Particle Effect

Typically, you will need to prepare the textures before making any new effects. However, this tutorial uses already finished textures and focuses on using the different texture types.

The default location to save the textures for particle use is the Game\Textures\Sprites folder.

Setting Up a Sprite Texture

Make sure that the Fire1 particle is currently selected.

In the Appearance tab (located next to the particle browser list), click the open folder icon next to the Texture text box.

Now, in Game\Textures\Sprites, select the texture called The path of the texture will be displayed in the Texture text box. You can check the texture when you hover the mouse pointer over the text box.

To align the particle direction to the sprite's movement, select the Orient To Velocity check box.

The next step is for the life time of the particle. To create a continuous fire, select the Continuous check box, in the Emitter section of the particle properties.

To have more than one particle displayed at any time, set the Count (of visible particles at the same time) to 10, and to have each particle rise higher, set the Particle Life Time to 3.

Keep the other values at their default (Emitter Life Time, 0; Spawn Delay, 0; Pulse Period, 0).

In the Movement section, set the Speed parameter to 3 to speed up the particle.

Placing the Particle Effect in a Level

To place the effect in the level, you need to drag the effect from the particle browser list to the level.


Note that you should not drag a child particle into the level, this will not work. You need to use the parent (container) particle.

However, before you do this, activate the Select and Move tool on the Editor toolbar and turn on Follow Terrain and Snap to Objects to make the placement easier.

Now drag the Fire1 particle effect to the level.

You'll be able to see the particle continuously spawning from the emitter. However, right now, it still looks very unrealistic. The next step is to tweak more parameters in the Particle Editor and improve the fire's appearance.


You can use the Goto Selected Object button to align the camera position to be just in front of the emitter.

Save the scene again before proceeding to the next step.

Creating a More Realistic Look

To get a more fire-like look, you will need to tweak a few more parameters within the particle.

Pay special attention to the following options:

  • Spawning condition
  • Appearance
  • Movement

Tweaking How the Sprites Spawn

Go to the Emitter section on the top-left part of the parameter lists. If the Emitter Life Time is set to 0, particles will spawn infinitely, until the emitter is disabled or deleted.

Set Particle Life Time to 1 and the appearance of the particle will change.

The parameter Count controls how many particles are alive in the scene at any time. If it's set to 10, at the time that the particle number 11 is spawned, particle number 1 will disappear.

The Particle Life Time option controls the life time of each particle. If it's set to 3, particles die 3 seconds after they were spawned.

Adding Randomness

Until now, all particles have been spawned in exactly the same way, and this doesn't look natural. To add some randomness, click the + button in front of the Particle Life Time parameter to open its additional parameters.

Set the Particle Life Time Var Random to 0.4.

The particle will start to look a little more irregular now. The Var Random parameter exists for almost all the parameters. The randomness is measured from 0 to 1 (0% to 100%).

If the Particle Life Time is set as 10 (sec), and the Var Random value is set to 1, the particle life time is randomized to be between 0 to 20 sec (/- 100%). If Var Random is set to 0.3, the Particle Life Time is randomized to between 7 and 13 seconds (/- 30%).

For now, though, keep the settings as shown.

Don't forget to save the level from time to time.

The Lighting Tab

Go to the Lighting pane and add the following settings:

  • Set Diffuse Lighting to 0.
  • Set Diffuse Backlighting to 0.
  • Set Emissive Lighting to 3.
  • Set Emissive HDR Dynamic to 3.

The particle will start to glow as shown:

Diffuse Lighting is the most basic lighting parameter for sprites. It controls how much the sprite is influenced by any dynamic or ambient light in the level.

Usually, you have to set an appropriate value for this (like 0.7). However, in the case of a fire that can't actually be lit, you should set this value to 0.

Diffuse Backlighting is a simple parameter to add some brightness to the particle (often called Ambient or Incandescence in common 3D software).

By increasing this value, you can make a more translucent appearance. Conversely, by decreasing this value, you can create a more solid looking particle.

Emissive Lighting and Emissive HDR Dynamic are different from the other lighting parameters. They control emissive lights on the effect; for example, the light that is created by the particle.

Usually, these parameters are used if the particle is self illuminating (like fire, sparks, explosions). Emissive HDR Dynamic works only when HDR is turned on; that is, Config Spec is set as high or highest.

Tweaking the Sprite Alpha Curve

Now, change the lifespan curve to add a natural transparent look to the fire. Open the additional parameters of the Alpha parameter in the Appearance section.

A particle's Alpha value controls how transparent it is. Click and drag the yellow square in Var Particle Life to create a key point (red point).

Double-click the top-left edge of the green line to create a second point and drag this to the bottom of the graph.

Double-click the top-right edge of the curve to create a third point and drag this also to the bottom of the graph.

The Var Particle Life curve controls the Alpha value of the sprite, independent of the texture's Alpha. Longitudinal represents the Alpha value, transversal, the Particle Life Time.

In this case, the particle will be displayed with 0 Alpha value (invisible), then increase to 100% Alpha value at 25% of its life time, and then finally fade out and disappear at the end of its life time.


You can add or delete more key points by double-clicking them, and also move key points by dragging them in both dimensions.

Tweaking the Sprite Scaling and Stretch Parameters

Go to the Size pane and set the Size parameter to 1.3, and then open the additional parameters and set the Size Var Random to 0.4.

Adjust the Size Var Particle Life curve to match the graph below:

Next, add a little stretch effect to the sprite. Set Stretch to 0.2, and set the Stretch Var Particle Life curve as shown below:

The Stretch option will stretch the sprite. A default value of 0 means that the sprite has not been stretched at all; for example, a perfect square shape. In this case, the particle is stretched up to 0.2 at the start of its life and back to a perfect square shape at the end of its life.

Now, the particle will look more like real fire, but with some more tweaking, you can further better it.

Tweaking the Movement and Air Resistance of the Particle

Movement of particles is also very important to add realism to the effect. In this section, you will tweak the particle movement parameters.

Access the Movement tab and set the Speed to 3 and Var Random to 0.4. You'll find the Var Random hidden behind the little + button. The Speed value controls the speed of the particle. It controls the speed along the direction of the Emit Angle, which you will tweak later.


Remember that adding a random value to parameters is an effective way to get a more realistic effect, in most cases.

Air Resistance simulates the denseness of air or any medium where the particle is situated. In a dense medium like water, the energy of motion is consumed faster because water has a higher resistance than air. The opposite is true in space, as particles never loose their velocity.

Set the Air Resistance to 0.2 and the Air Resistance Var Random to 0.4.


Particles with air resistance are also affected by the environmental forces in the level such as wind, turbulence, or global wind. Thus, if you set high values for air resistance, the particles will be strongly affected by the wind forces in the level, maybe so much that you won't see any particles. To avoid this, first try assigning low values (like 0) to the air resistance, and then check the effect.

Tweaking the Angles Tab

Go to the Angles section and tweak some more options.

Set Emit Angle to 20 and Emit Angle Var Random to 1.

The particle's default direction is exactly along the z-axis of the emitter. The changes above mean that the particle emits at a 20 degree angle around the z-axis, and also gets a random direction within -20 to 20 degrees.

If you don't set a Random value other than 0, the particles will always get an exact -20 or 20 degrees direction from the z-axis; consequently, the whole shape of the effect will look like an umbrella turned upside down.

Tweaking the Rotation Tab

Set the Random Angles and Random Rotation Rate as shown below:

These parameters control the rotation of each sprite. The left column refers to the x-axis, the center column to the y-axis, and the right column to the z-axis.

In this case, the particle has a possible 180 degree rotation value on the z-axis when they spawn, and a maximum of 30 degrees random rotation on the z-axis while they live.

For sprite particles like this fire, the x and y axes are not affected at all, because sprites are 2D objects – they have no x- or y-axis. The particle system also supports imported 3D objects, which can be used as particles where all 3 axes are supported.

Soft Particles

When you get closer to the effect and check the area where the particle is intersecting with the terrain surface, you'll be able to see a significant edge at the bottom of the sprite.

To avoid this edge, access the Appearance pane and select the Soft Particle check box.

The edge will be removed and the fire will look even more realistic than before.

You now know how to create a simple 2D particle and how to tweak its basic parameters.



Learn how to create a simple particle effect by using the Particle tab of the DataBase View.



为开始本教程,请启动“Sandbox 编辑器”并打开已创建的关卡。



CryENGINE 中的多数数据都在粒子库中处理和保存。“粒子特效”库保存在 Game\Libs\Particles 之下的游戏文件夹中。












在*新库名称*窗口中,输入 MyTutorials 作为该库的名称。





在*新粒子名称*窗口,输入 ExampleFire 作为组的名称,输入 Fire1 作为粒子的名称。







Game\Textures\Sprites 文件夹是保存粒子所使用纹理的默认位置。


确保当前已选定火焰 1 粒子。



现在,在 Game\Textures\Sprites 中,选中名为 的纹理。该纹理的路径将显示在“纹理”文本框中,鼠标悬停在文本框上时,可以对纹理进行检查。





若要在任意时间内显示多个粒子,请将*计数*(同时显示的可见粒子的数量)设为 10,若要每个粒子升得更高,请将*粒子生命周期*设为 3。其他数值则保持默认值(粒子发射器生命周期*为 *0再生延迟*为 *0脉冲周期*为 *0)。


在移动区段,设置*速度*参数为 3 以加速粒子。





现在拖动*火焰 1* 粒子特效至关卡。




 Note 使用“转到所选对象”按钮以将摄像机位置调整至粒子发射器的前面。








进入参数列表左上角的*粒子发射器*区段。若*粒子发射器生命周期*设为 0,在禁用或删除该粒子发射器之前,粒子将无限再生。

将*粒子发射器生命周期*设置为 1 时,粒子的外观将会改变。

参数“计数”控制任意时间内场景中活着的粒子个数。若将该计数设置为 10,第 11 个粒子再生时,第 1 个粒子将会消失。

粒子生命周期选项控制每个粒子的生命周期。若将该选项设置为 3,粒子再生后 3 秒将死亡。


到目前为止,所有粒子都以完全相同的方式再生,但该过程看起来并不自然。若要添加随机性,请单击*粒子生命周期*参数前面的 + 按钮以打开其中的其他参数。

将*粒子生命周期 Var Random* 设置为 0.4


现在的粒子看起来开始稍微不规律。几乎所有参数都存在 Var Random 参数。用 0 至 1(0% 至 100%)的数值来衡量随机性。

若粒子生命周期设置为 10(秒),Var Random 数值设置为 1,粒子生命周期将在 0 至 20 秒 (/- 100%) 内随机形成。若 Var Random 数值设置为 0.3,粒子生命周期将在 7 至 13 秒 (/- 30%) 内随机形成。







漫反射光照是片画面最基本的参数。它控制着关卡中任意动态或环境光照对片画面的影响程度。通常,您需为其设置适当的数值(如 0.7)。但是在火焰实际上未能够被点燃的情况下,应该将该数值设置为 0。漫反射背光是一个可以添加光度至粒子(在普通的 3D 软件中通常被称为 环境白炽光 )的简单参数。通过增加该数值,可以使其变成更透明的粒子。相反地,通过减小该数值,可以创建看起来更立体的粒子。

漫反射光照和放射性 HDR 动态不同于其他光照参数。它们控制效果的放射性光照;例如,通过粒子创建的光照。通常,若粒子能够自行发光(如火焰、火花、爆炸),可以使用这些参数。放射性 HDR 动态仅在 HDR 打开时运行;也就是说,将配置规格设置为高规格或最高规格。

对片画面 Alpha 曲线进行微调

现在,更改寿命曲线以添加自然透明的外观至火焰。打开*外观*区段的 Alpha 参数的其他参数。粒子的 Alpha 数值控制其透明度。单击并拖曳 *Var 粒子寿命*中的黄色方块以创建关键点(红点)。




Var 粒子寿命曲线控制片画面的 Alpha 数值,不依赖于纹理的 Alpha 数值。纵向表示 Alpha 数值,横向表示粒子生命周期。

这种情况下,粒子将以 0 Alpha 数值(不可见)显示,再在其生命周期的 25% 时将 Alpha 数值增加至 100%。接着最终淡出并在其生命周期结束时消失。


 Note 通过双击关键点可以添加或删除更多的关键点,通过拖动关键点的大小可以移动关键点。



进入*大小*窗格并将*尺寸*参数设置为 1.3,再打开其他参数并将*尺寸 Var Random* 设置为 0.4

调整*尺寸 Var 粒子生命周期*曲线以与以下图表相匹配:


接下来,添加小伸展特效至片画面。将*伸展*设置为 0.2 并按照如下所示的步骤对*伸展 Var 粒子生命周期*进行设置:


伸展选项将对片画面进行拉伸。0 默认数值表示片画面未拉伸;例如,完全的正方形,这种情况下,在粒子生命周期开始时其拉伸数值增加至 0.2,并在其生命周期结束时还原为完全的正方形。




进入*移动*标签并将*速度*设置为 3,将 Var Random 设置为 0.4。您将发现 Var Random 隐藏于 "little +" 按钮的后面。速度数值控制粒子的速度。也控制沿着稍后将对其进行微调的发射角度方向的速度。


 Note 请记住在多数情况下,添加随机值至参数是获得更真实特效的有效途径。



将*空气阻力*设置为 0.2 并将*空气阻力 Var Random* 设置为 0.4



 Note 具有空气阻力的粒子也会受关卡中诸如风、扰动或全局风等环境因素的影响。因此,若设置较高的空气阻力数值,粒子将受到关卡中风力的强烈影响,该影响可能大到看不见任何粒子。若要避免此种情况发生,首先尝试设定较低的空气阻力数值(如 0),再检查该特效。




将*发射角度*设置为 20,并将*发射角度 Var Random* 设置为 1


粒子的默认方向为精确沿着粒子发射器的 z-轴方向。以上更改表示粒子以与 z-轴成 20 度角的方向发射,或者以 -20 至 20 度\以内的随机方向发射。若不将随机数值设置为除 0 以外的数值,那么粒子将总是以与 z-轴精确成 -20 至 20 度的方向发射;因此,该特效的整体形状如同倒转过来的雨伞。




这些参数控制每个片画面的旋转。左列指的是 x-轴,中间列是指的是 y-轴,右列指的是 z-轴。

这种情况下,粒子再生时,可以在 z-轴上达到 180 度旋转值,粒子存活时,可以在 z-轴上最大可达 30 度的随机旋转。

对于诸如这种火焰的片画面粒子,由于片画面是 2D 对象(它没有 x 轴或 y 轴),所以 x 轴和 y 轴一点都不会受到影响。粒子系统也支持输入 3D 对象,该对象可用作 3 个轴都支持的粒子。








现在您了解如何创建简单 2D 粒子以及如何对其基本参数进行微调。