The Particle Editor serves as a tool for creating/editing particle effects used in the game. Effects such as explosions, muzzle flashes, smoke, fire etc.
Particle effects can placed in the game via the World Editor (using the ParticleEffect entity) or created within the game script.
Each particle effect can consist of multiple particle emitters. For example the effect of an explosion can be composed from smoke emitter, sparks emitter, some debris etc.
- 1. Interface Overview
- 2. Panels
- 3. Material Editor
The editor window is divided into several sub-windows/panels as shown on the image below.
The following panels will be discussed:
- preview window - see a live preview of the particle effect in action, change some preview options and see statistics of active particles
- effect window - play/pause effect, add/remove/clone/rename/sort particle emitters and set their LOD ranges
- emitter window - list of currently selected emitter's properties with modification fields
- animation window - spline-curve editor to animate some properties over time.
Each particle effect consist of one or multiple particle emitters. Their full list can be found in the box labeled as Emitters.
Emitters can be disabled/enabled through their checkbox in the Emitters list so that only enabled emitters will emit particles in the preview window, thus allowing the testing of each emitter separately. This is only an editor display option and will not be saved in the end effect.
Emitters can also be deleted, renamed, cloned or moved up/down in the list via the corresponding buttons.
Next there are controls which allow you to Restart or Pause the effect. When the effect is paused, the Step button allows you to step forward (by clicking) or to play in slow motion (by pressing and holding) the effect.
Levels of detail (LODs) of the particle effect are set up here. Currently, there are three fixed levels of detail (0, 1, 2) and an effect as a whole is always in one of these levels. The LOD level is determined by the engine depending on its distance, current resolution and camera FOV.
Each emitter has a slider with two handles for setting its LOD range, i.e. minimum and maximum LOD in which the emitter is active (e.g. 0-1means the emitter is active in the first two levels but not in the last - the most distant one).
When an emitter becomes inactive because of LOD change, already-emitted particles will not disappear: their simulation and rendering continue but new particles from this emitter are not emitted. When an emitter becomes active because of LOD change, it simply starts emitting new particles. This mechanism should allow for continuous effect's LODding without sudden changes in its appearance.
Some emitters don't need their highest LOD(s) nor any replacement - e.g. some small debris and other details probably need not be present in the higher LODs at all, so simply setting 0-1 or even just 0 may be an easy and efficient setting. Other emitters may need a replacement with one or multiple less detailed emitters - e.g. a nice detailed smoke generated by multiple emitters in the first LODs may be replaced by one rougher, less detailed smoke emitter set to cover the rest of the LOD range.
A specific LOD can be manually forced using the drop-down menu in the Particle Effect window, ignoring the engine's formula. When a specific LOD is forced this way, emitters present in the LOD are highlighted in the list while inactive emitters are struckthrough or hidden completely if Hide inactive checkbox is checked. If Restart on change checkbox is checked, the effect will restart every time a different item is selected (forced LOD) from the drop-down list (when unchecked, LOD switching can be observed).
The toolbar contains functions that allow preview window manipulation in various ways.
From left to right:
Display or hide the white grid in viewport.
Move the particle effect around.
Rotate the particle effect.
Switch World/local coordinate system
Cone Angle Volume
Highlights the angle volume.
Emit Source Volume
Highlights the source 3D volume.
Snap Position to Ground
Shortcut: Ctrl + ↓
Reset Entity Rotations
Shortcut: Ctrl + →
Change the preview camera's field of view.
Default value: 45
This option displays information about the total number of particles and also current/max count per each emitter.
This allows for effect optimization by lowering the MaxNum property value of the emitter which does not fully utilize the max count.
Load a helper model to the preview scene in order to assist the effect's creation, scaling and calibration.
This will render or hide the ground mesh in the preview scene if the ground is enabled in the Viewport Options button's menu. Having a ground or not may help getting a better visualization of what the effect looks like.
It also allows the changing of Ground Material on ground visibility re-enabling. To reset to default, use the Viewport's Options button to hide/show the ground.
Setup rotation of the entity to which the emitters are attached.
This allows testing if the effect works properly in motion and whether it reacts to the parent movement or not.
It opens the Movement Simulation Setup dialog:
- Radius: radius of the circular movement specified in meter units
- Speed: speed specified in meters per second
- Rotation axis: axis around which the effect will rotate
Setup Global Wind
It opens the Global Wind Settings dialog:
- Speed: wind speed (in m/s)
- Angle: wind direction angle in degrees - starting from the East and going counter-clockwise. 0° is the wind blowing towards the East, 90° is North, etc.
Spawn 25 effects at once (5 × 5) to see the effect on performance, ordering issues, etc.
Simulate Low FPS
Restrict the FPS from 60 to 17 to see if the particle effect is still acceptable in low performance situations.
Turn camera to POI on Mouse Wheel
Properties of the emitter currently selected in the emitters list.
Parameters from this category describes how the particles will be emitted.
Shape of the particle emitting volume.
The following options are available:
Size of emitting volume in respect to its type (only used for shapes where it makes sense).
To view the shape's volume, use the toolbar's Emit Source Volume button.
Parameters defining the emitter cone volume which is then used for random emit directions for each particle.
- X - cone circumferential angle
- Y - inner cone angle
- Z - outer cone angle
To view the cone's volume, use the toolbar's Cone Angle Volume button.
Cone Angle Min Dist
Minimal angle difference between particles (to avoid sorting problems when particles are too close)
Cone Angle Rnd Range
Random range added to ConeAngle.x
Maximum number of particles at once. This number may help performance and reduce memory usage.
This value tells you how quickly the particles will be emitted (particles per second).
Birth Rate RND
Random addition to birth rate value. Emitter can get zero up-to this number birth rate bonus.
Birth Rate Vel
Changes the birth rate value based on velocity, so fast moving effects emit more.
Position offset of the emitter against the effect origin.
Angles offset - determine the particle's emission direction.
If checked, the emitter will simulate the particles in the local-space of the effect which will in other words cause the effect to "move with the parent". Useful e.g. for muzzle flash effects.
If disabled, the emitter will simulate the particles in world-space which will cause the particles to "be on their own" once they are emitted. Useful e.g. for cigarette smoke effect.
Parameters from this category describes how the particles will look and behave.
Material of the particle sprite, defined in the Material editor.
Clicking on the '...' button will let you choose different material.
Clicking on the 'M' button will open the Material editor and let you modify current material directly.
Center X, Y
Allows you to offset the center pivot of the particle which in turn changes the behavior of scaling and rotating of the particle. The default values (0, 0) will cause the pivot to be in the center so the particle will scale uniformly in all directions. Scaling the particle with values like (0, -1) will cause it to only grow up. This is useful e.g. for muzzle flash effect which we want to look like it’s coming out of the barrel.
Scale X, Y
Allows you to define non-square particles. Use this numbers to set wanted X/Y ratio.
If set to a different value than 1, the particle type will be internally switched to the "streak" version, which will stretch particles along their moving direction based on their velocity. Therefore the velocity attribute (or at least the gravity) has to be set. Useful e.g. for things like sparks.
Global size multiplier applied to all particles from this emitter. Use this number to set the overall size of the particles.
Per-particle randomization of size.
Rotation speed in degrees per second. Only for sprites.
Random Rot Dir
If checked, the rotation direction will be chosen randomly per particle, it will otherwise be clockwise.
Streak Full UV
When not checked, the default behavior will be used for stretched particles (streaks), which is stretching only the middle part of the texture. By enabling this option, the full UVs will be stretched.
Left: original, not stretched particle (stretch multiplier = 1). Middle: default stretching behavior (streak full UV = false). Right: new option for stretching (streak full UV = true).
Defines what behavior will be used for "auto-rotating" the particle to face the camera.
Can be one of:
- Full - default particle behavior. The particles will face the camera in all directions and will never be seen "from the side".
- LockedAxis - "distant trees behavior". Particles can automatically rotate to face the camera only around the main axis which is defined by the emitting direction (default is up). Useful e.g. for fire effects which we don't want to "lay down" even if they’re seen from above.
- None - particles will not automatically rotate to face the camera at all. Useful e.g. for custom effects like muzzle flashes from the guns where we just want to emit multiple randomly rotated quads coming out of the barrel to get the wanted "volumetric" feel.
Angular Fade Out Start, End
Alpha fade-out for particles turned away from the camera
Available for both LockedAxis and None billboarding type to have a tiny fade-out which prevents seeing the particle fully from the side, which would otherwise cause a visual artifact.
Rotates the particle to face the movement's velocity direction. Kind of "Flappy bird" behavior.
Cannot be combined with Random Angle.
Random initial angle, sprites only.
Cannot be combined with Vel Angle.
Random U Flip
Inverts texture's u-coordinate with 50% probability. Can be combined with particle rotation and random angle.
Parameters from this category describe how the particles will move.
Linear speed of each emitted particle. The default direction is "up", but it can be changed via Angles property or randomized via Cone Angle settings.
Per-particle random addition to velocity.
Slow down the particles as they go. Must be greater than 0 to use Wind Influence.
Air Resistance RND
Per-particle random addition to air resistance.
How much particle velocity is influenced by wind in range 0..1.
Parent Vel Rel To Air
Emitter's velocity is computed relatively to the movement of surrounding air. Affects Birth Rate Vel and Lifetime Vel Factor, but not Vel Affect.
Amount of gravity force applied on the particles - can be negative.
Gravity multiplier RND
Per-particle random addition to gravity multiplier.
Amount of velocity preservation after collision, particle will not collide if set to 0.
Define the force pulling the particle towards emitter origin.
Texture Sheet Animation
Parameters from this category are used for texture-sheet animation. These parameters only make sense for material with tiled texture (a.k.a sprite-sheet).
The animation will only be played once. After it plays, the last animation frame will be used for the rest of the particle lifetime, so the last frame must be empty if the effect is to disappear. If disabled, the animation will loop for the whole particle lifetime.
This value sets the speed of the animation (Frames per second). Due to technical reasons, a zero speed will still animate the effect (at 1 FPS). Set a lower value (e.g 0.001) for a very still particle.
Lifetime by Anim
If checked, the particle's lifetime will be determined by the animation length (FPS × Number of frames) - once all the animation is played, the particle is destroyed. This setting overrides other lifetime settings.
If checked, one frame (tile) from the sheet will be chosen randomly and kept for the rest of the particle lifetime instead of using the whole tiled texture for animation. Animation will not be played.
Attributes that can be animated along the particle's life time.
How long will particle will last in seconds.
Per-particle random addition to lifetime value.
Lifetime Vel Vactor
Lifetime shortening by emitter's velocity.
finalLifetime = (lifetime + lifetimeRND) / (1 + velocity * lifetimeVelFactor)
Lifetime Vel Smoothing
Smooths input velocity for LifetimeVelFactor, making it react slower to velocity changes.
Lifetime shortening after collision. Used only if collision is enabled (when Physics → Restitution attribute is non zero).
Particle color over its lifetime.
Particle alpha over its lifetime.
Particle rotation speed over its lifetime which multiplies its original rotation speed.
Particle size during its lifetime which multiplies its size parameters.
Attributes that can be animated over the whole emitter's lifetime.
Emitter's lifetime. This does not affect particles' lifetime as once a particle is emitted, it can live on even if the emitter is destroyed.
If enabled, the effect will be looped.
Color master graph during lifetime of whole emitter
Alpha master graph during lifetime of whole emitter
Rotation Speed Mast
Rotation speed master graph during lifetime of whole emitter
Size master graph during lifetime of whole emitter
B Rate Mast
Birth rate master graph multiplying emitter birth rate during lifetime of the whole emitter
Air Resistance Mast
Air resistance master graph multiplying particles air resistance during lifetime of whole emitter
Velocity master graph multiplying particles velocity during lifetime of whole emitter
The Animation Panel allows the animation of various attributes like size, color and more, emitter-wise or particle-wise with respectively the Emitting-Time Graphs and Particle-Lifetime Graphs tabs.
Snap to Grid
Snap graphpoint-dragging to the grid. Steps are 0.01 for X axis, 0.1 for Y axis.
Lock Horizontal Axis
This button allows the changing of the Y value of a point without risking moving it on the X axis.
See Through Layers
Show the other curves in the background as transparent.
Edit the selected point's values directly.
This tab offers the following graphs:
Mast means Master here, and the formula is
result = particleProperty * emitterMaster.
This tab offers the following graphs:
The spline curve is created and modified by control points (a.k.a. key frames), which then define the resulting shape of the curve.
These control points can be created, deleted and moved around. See the controls below:
- double-click the graph
- right-click the graph:
- Add Point: create a point at right-click's X position on the existing curve's Y
- Add Point Here: create a point precisely on right-click's position, X and Y values
- click to select, then click and hold to drag the point around
- click to select, then ctrl + hold click to move all the colors in relation to each other (color graph only)
- click a point and press Delete
- click to select, right-click a point and select Remove Point
Basic Material maps and its modifiers
Albedo color modificator. Default is white.
Albedo texture with possible alpha channel.
Normal Map texture.
Basic Material Modifiers
Diffuse directional light modificator. Default is white.
Ambient light modificator. Default is white.
Normalized emissive color, absolute light value, zero by default.
LV value of emissive.
Emissive Absolute LV
If checked, uses absolute LV intensity to "average" scene brightness (like EV).
Apply Albedo To Emissive
If checked, albedo color defines the Emissive color. Default true.
Alpha To Emissive LV
Multiplies Emissive by Alpha. From Alpha Graphs is cheap, Per Pixel is high quality. Default is Off.
If set, Emissive LV will be multiplied by each texture pixel. Default is Off.
If checked, particles react on shadows from environment. Default is Off.
If checked, particles receive analytic lights. Default is Off.
Defines value above which pixels are rendered. 0..255. Default is 1.
Multiplicator of alpha value. Default is 1.
Defines how the material will be blended. (Normal or Additive).
Tile U, Tile V
Number of tiles in U and V axis.
Sphere Size Multiplier
A particle is treated as a sphere of radius given by its size and this multiplier. A sprite is always rendered at the closest point on this sphere.
Red channel from albedo texture is used as intext into U axis of this gradient map.
V axis is color change from birth (top of texture) to death (bottom of texture) of the particle.
Vertex Normal Power
Darkening effect of automatic vertex normals on particle lighting (available when not using a normal map) (0 - 1)
"Normal blending" - extends lighting even to the normals less or more turned away from light (not available when normal power is 0)
Backlight intensity (not available when normal power is 0)
"Normal blending" from back light - extends back lighting even to the normals less or more turned towards the light (only available when using Backlight)
Particle Soft Depth
Softness of particles when they collide with meshes.
Alpha to depth multiplier.
Camera Blend Near
Distance from camera where blend starts (the result is zero opacity)
Camera Blend Far
Distance from camera where blend ends (the result is full opacity)