Particle Editor – Arma Reforger

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<code>" to "<code style="display: block">")
(added todo)
Line 1: Line 1:
{{TOC|side}}
{{Wiki|TODO|Add images}}{{TOC|side}}
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.
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.



Revision as of 16:47, 1 February 2023

🚧
TODO: Add images

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.


Interface Overview

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.


Panels

Effect Panel

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.

Emitters order does not affect the final look of particles because they get internally sorted by an algorithm which depends on particle position and size.

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.

Current distances (for 1080p and 70° verticle FOV) are as follows:
  • LOD 0: < 25m
  • LOD 1: 25m - 200m
  • LOD 2: > 200m
The current LOD can be checked in the scene (in Particle Editor, World Editor or even in game) using the Diag Menu: Scene → Particles → Show Particle FX LOD → enabled.

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).

Preview Panel

The toolbar contains functions that allow preview window manipulation in various ways.

From left to right:

Show/Hide Grid

Display or hide the white grid in viewport.

Move Tool

Move the particle effect around.

Rotate Tool

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 FOV

Change the preview camera's field of view.

Default value: 45

Show/Hide Stats

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.

Helper Model

Load a helper model to the preview scene in order to assist the effect's creation, scaling and calibration.

Show/Hide Ground

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.

Movement simulation

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.

Stress Test

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

Emitter Panel

Properties of the emitter currently selected in the emitters list.

General

Parameters from this category describes how the particles will be emitted.

Shape Type

Shape of the particle emitting volume.

The following options are available:

  • Box
  • Point
  • Sphere
  • Ellipse
Shape Size

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.

Cone angle

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

Max Num

Maximum number of particles at once. This number may help performance and reduce memory usage.

Birth Rate

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.

Offset

Position offset of the emitter against the effect origin.

Angles

Angles offset - determine the particle's emission direction.

Local Transform

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.

Particle Appearance

Parameters from this category describes how the particles will look and behave.

Material

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.

Stretch Multiplier

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.

Size Multiplier

Global size multiplier applied to all particles from this emitter. Use this number to set the overall size of the particles.

Size RND

Per-particle randomization of size.

Rot Multiplier

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).

Billboarding Type

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.

Vel Angle

Rotates the particle to face the movement's velocity direction. Kind of "Flappy bird" behavior.

Cannot be combined with Random Angle.

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.

Physics

Parameters from this category describe how the particles will move.

Velocity

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.

Velocity RND

Per-particle random addition to velocity.

Air Resistance

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.

Wind Influence

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.

Gravity Multiply

Amount of gravity force applied on the particles - can be negative.

Gravity multiplier RND

Per-particle random addition to gravity multiplier.

Restitution

Amount of velocity preservation after collision, particle will not collide if set to 0.

Spring

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).

Anim Once

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.

Anim FPS

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.

Random Frame

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.

Particle Lifetime

Attributes that can be animated along the particle's life time.

Lifetime

How long will particle will last in seconds.

Lifetime RND

Per-particle random addition to lifetime value.

Lifetime Vel Vactor

Lifetime shortening by emitter's velocity.

Formula: finalLifetime = (lifetime + lifetimeRND) / (1 + velocity * lifetimeVelFactor)

Lifetime Vel Smoothing

Smooths input velocity for LifetimeVelFactor, making it react slower to velocity changes.

Lifetime Shortening

Lifetime shortening after collision. Used only if collision is enabled (when Physics → Restitution attribute is non zero).

Color

Particle color over its lifetime.

Alpha

Particle alpha over its lifetime.

Rotation Speed

Particle rotation speed over its lifetime which multiplies its original rotation speed.

Size

Particle size during its lifetime which multiplies its size parameters.

Emitting Time

Attributes that can be animated over the whole emitter's lifetime.

Emitting Time

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.

Repeat

If enabled, the effect will be looped.

Color Mast

Color master graph during lifetime of whole emitter

Alpha Mast

Alpha master graph during lifetime of whole emitter

Rotation Speed Mast

Rotation speed master graph during lifetime of whole emitter

Size Mast

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 Mast

Velocity master graph multiplying particles velocity during lifetime of whole emitter

Animation Panel

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.

Point Editor

Edit the selected point's values directly.

Emitter-Time Graphs

This tab offers the following graphs:

  • ColorMast
  • AlphaMast
  • RotationSpeedMast
  • SizeMast
  • BRateMast
  • AirResistanceMast
  • VelocityMast

Mast means Master here, and the formula is result = particleProperty * emitterMaster.

Particle-Lifetime Graphs

This tab offers the following graphs:

  • Color
  • Alpha
  • RotationSpeed
  • Size

Graph

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:

Create
  • 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
Update
  • 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)
Delete
  • click a point and press Delete
  • click to select, right-click a point and select Remove Point


Material Editor

Basic Material maps and its modifiers

Color

Albedo color modificator. Default is white.

Albedo Map

Albedo texture with possible alpha channel.

Normal Map

Normal Map texture.

Basic Material Modifiers

Diffuse Color

Diffuse directional light modificator. Default is white.

Ambient Color

Ambient light modificator. Default is white.

Emissivity

Emissive

Normalized emissive color, absolute light value, zero by default.

Emissive LV

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.

Emissive Map

If set, Emissive LV will be multiplied by each texture pixel. Default is Off.

General

Receive Shadow

If checked, particles react on shadows from environment. Default is Off.

Receive Lights

If checked, particles receive analytic lights. Default is Off.

Particle Basics

Alpha Test

Defines value above which pixels are rendered. 0..255. Default is 1.

Alpha Mul

Multiplicator of alpha value. Default is 1.

Blend Mode

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.

Gradient Map

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.

Particle lighting

Vertex Normal Power

Darkening effect of automatic vertex normals on particle lighting (available when not using a normal map) (0 - 1)

Normal Stretching

"Normal blending" - extends lighting even to the normals less or more turned away from light (not available when normal power is 0)

Backlight

Backlight intensity (not available when normal power is 0)

Backlight Stretching

"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

Softness of particles when they collide with meshes.

Depth Scale

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)