Amps documentation

The Amps Editor window

To add or edit an Amps emitter component start the Amps Editor from the Window menu. The editor window shows the contents of the Amps Blueprint asset the emitter component in the selected game object references.

 

At the top are the editor controls:

Amps editor emitter controls Amps documentation Amps documentation EmitterControls

GameObject: Located at the far left and shows the name of the game object which is currently edited.

 

Lock: While unlocked, the Amps editor window edits the game object currently selected in the hierarchy. Turning on this lock will make the editor stick with whatever emitter it was showing.

 

Blueprint: The assigned blueprint asset. (Currently in Unity 5 the file name is not shown here anymore.)

 

Blueprint options: The menu contains the operations related to blueprints:

Duplicate blueprint: Copies the contents of the current blueprint to a new asset.

Create module dump: Used for debugging.

Port an asset: Used for debugging.

 

Restart: Re-initializes the emitter. It is recommended to use it after major edits of the particle system, especially when dealing with emitter time related curves. The emitter must be restarted after changing the particle limit.

 

Pause: Pauses or unpauses the particle system. Useful for debugging or waking up the emitter after it went to sleep, typically after longer UI operations in the Unity editor (resizing windows, browsing menus, etc).

 

Commit: Saves all changes to the related blueprint. IMPORTANT: This button is the only way to update the asset. Saving the project or the scene will not save the changes. The state of the asset is not tracked so there will be no warning about unsaved changes when closing the Amps editor window or the scene. This could be a problem when editing an emitter hierarchy and jumping around tweaking multiple emitters, so when in doubt go through all of them and commit.

An Amps emitter has stacks that contain modules with several properties, many of which has its own value picker. The UI is set up accordingly:

Amps editor columns Amps documentation Amps documentation Columns

Stacks column: The left most column shows the available stacks with the currently selected one highlighted.

Modules column: Lists the modules in the selected stack. Provides a button to add a new module (except in the [Emitter] stack).

Properties column: The properties of the selected module.

Value picker column: If the selected property has a value picker then it shows up here.

Bellow the columns is the toggleable emitter parameters panel where emitter specific data can be created.

The emitter parameter panel Amps documentation Amps documentation Parameters

That information is saved with the scene and can be queried by module properties. This mechanic makes it possible to reuse the same blueprint in multiple emitters but still have the freedom to change certain aspects on a case by case basis. For example level designers can adapt each emitter’s look to fit the environment or programmers can adjust these parameters on the fly from scripts.

Each parameter has a name which is used to identify the data (should be unique), a type and a value. The following types are available:

Bool: A simple on/off flag.

GameObject: A GameObject in the scene. Blueprints can not directly store references to scene specific items, the only way to reach those is through these kind of parameters.

Material: Reference to a material in the project.

Mesh: Reference to a mesh in the project.

Scalar: A numeric value.

Vector: A vector value.

Stacks

Stacks control particle properties, from color to motion. Each stack contains modules which get evaluated one after the other to generate the stack’s result. By placing and configuring modules in different stacks we define the different aspects of each particle.

Here are the different stack types:

Emitter

This stack always contains exactly one Emitter module for configuring the main properties of the particle system.

 

Render

A place for one or more render modules which give a shape to the calculated particle data. This stack can only contain “render” type modules although “rendering” can be anything from mesh creation through sound synthesis to writing a file.

 

Shared

General purpose modules can be placed here to share their properties. Shared properties can be referenced from other modules in other stacks which is useful if we want to control multiple values from a central location. The stack is never evaluated (the modules are just for storing settings) so the order is irrelevant.

 

Spawn Rate

Modules in this scalar stack control how many particles are created a second.

 

Death Condition

When the result of the stack becomes 1 or more for a particle then that particle is marked for death and will be removed after a Death Duration period of time. (See next stack.)

 

Death Duration

Defines how long it will take for a particle to die after being marked for removal. This time can be used to drive curve properties which are useful for gracefully handling particle death (by fading them out for example).

 

Custom Scalar

A scalar stack to be used for arbitrary purposes like extra data for a render module or calculating expensive but reusable data.

 

Custom Vector

A vector stack to be used for arbitrary purposes like extra data for a render module or calculating expensive but reusable data.

 

Acceleration

The result of this stack directly sets the acceleration vector of a particle. Note that the final acceleration is also affected by the Velocity and Position stacks.

 

Velocity

The result of this stack directly sets the velocity vector of a particle. Note that the final velocity is also affected by the Acceleration and Position stacks.

 

Position

The result of this stack directly sets the position of a particle. Note that the final position is also affected by the Acceleration and Velocity stacks.

 

Rotation Rate

Defines how many degrees a particle rotates around a given axis in a second. Note that the final rotation rate is also affected by the Rotation stack.

 

Rotation

Defines how a particle is rotated around a given axis. Note that the final rotation is also affected by the Rotation Rate stack.

 

Scale

Sets the size of a particle.

 

Color

The RGBA color of a particle.

 

Pivot Offset

The origin of the particle representation is offset from the particle location by this amount. (If the chosen render module supports this feature.)

 

Multi-Function

Special modules can be placed here which can modify multiple other stacks. It gets evaluated after all other stacks.

Modules

Modules are the basic building blocks which generate or modify particle properties. Modules are placed in the aforementioned stacks and are evaluated from top to bottom for every particle. Each module takes the output of the previous one, processes it and passes on to the next. The output of the last module becomes the stack’s result. Sampler modules may not change the incoming stack value if they fail to produce a valid sample (if for example the Transform Module can’t get the transformation of a game object because that doesn’t exist anymore).

Modules can be enabled/disabled with the tick box in the top left corner. The arrows on the right side move the module up or down in the stack. The module menu is at the top right corner: the module can be duplicated or deleted.

Common module properties

There are a few properties which are used in several modules:

Description: A name or note about what the module is used for.

 

Weight: How much the module changes incoming values.

 

Blend mode: How the module’s value is mixed with the incoming one.

Sampler module properties

Sampler modules do their more expensive calculations only if certain conditions are met. They share the following properties:

Sample condition: Defines when to resample. (On Collision is not implemented yet.)

 

Sample on spawn?: If true then a sampling occurs when a particle is born. If false then the sampler will not change incoming values until it gets its first sample.

 

Initial delay: Sampling happens this amount of time after the Sample condition was met.

Base Emitter Module

A special module, resides in the [Emitter] stack and can not be deleted. Defines the fundamental aspects of the emitter.

Plays on start?: If checked then the emitter start as soon as the scene is loaded.

 

Pause when unseen duration: The emitter will pause itself when not rendered for this long. Currently this mechanic is also active while editing so if the Unity editor stops rendering the viewports for a while (which happens while adjusting window size or browsing the menus) then the emitter might pause itself. You can use the Amps editor’s Restart or Pause buttons to get it running again.

 

Emitter duration: The Time: Loop (0..1) curve input goes through the 0..1 range during this time interval. There is always at least one “loop”, starting at the start of the emitter lasting Emitter duration long.

 

Looping?: If true then the Time: Loop (0..1) curve input will repeat that range over and over as emitter time passes.

 

Particle limit: The maximum number of particles in the emitter. The higher it is set the more memory is used.

 

Time scale: A multiplier to speed up of slow down the particle system.

 

Accel. noise smoothing: Smoothing applied to the final acceleration values used in the Acceleration curve input. Has no affect on the movement of particles.

Motion Tweaker MF Module

A multi-function module allowing us to directly modify particle acceleration, momentum, velocity and displacement using multipliers. Usually the multiplier vectors are used in curve mode (see more about property modes bellow) to control the values by some other system property. For example zero out momentum when a particle’s position on the Y axis is lower then 0, the ground level.

Quick Setup MF Module

A multi-function module providing a simple interface for setting up particle properties. Typically used to rough out a particle system before polishing it.

Quad Render Module

Renders a quad for each particle.

Material: Specifies what material should be used.

 

Orientation: How the quad is aligned.

Camera facing: Always faces the camera.

Default: The Rotation stack’s value defines the orientation.

Rotated camera facing: First the polygons are aligned to the camera then rotated by the value coming from the Rotation stack.

Upright camera facing: Tries to face the camera but only rotates on the up axis.

 

Normal mode: Defines how vertex normals are generated.

Flat: Normals point the direction the quad faces.

Skip: Normals are not calculated.

 

Tangent mode: The way tangent data is generated.

Custom Vector (XYZW): The result of the Custom Vector stack is passed as vertex tangents. Used to supply a shader with additional data.

Generate: Provides valid tangents.

Skip: No tangent data will be created.

 

UV2 mode: How the secondary UV is calculated.

Custom Vector (XY): The first two members of the Custom Vector stack’s result is passed to the shader.

Custom Vector (XYZW): The whole vector is packed into two floats so the data must be unpacked in the shader. It’s a lossy operation. This feature is currently so buggy that it’s useless.

Skip: Second UV coordinates are not created.

 

Double sided?: If true then a backfacing quad will be generated too. Only practical to use this feature with Default and Rotated Camera Facing orientations.

Mesh Render Module

Represents each particle with a mesh.

Material: Specifies what material should be used.

 

Mesh count: Sets how many meshes can be defined.

 

Mesh N: A reference to a mesh asset. A mesh will be randomly picked from this list for each particle.

Color Module

(Partially implemented.) A convenient way to create an RGBA color. Because the “color” type properties are not working yet it is recommended to use the Vector module to define colors.

Data Converter Module

Converts any incoming data. Only works in vector producing stacks (like Velocity as opposed to Spawn rate). Converts a direction vector to Euler rotations and back, RGB to HSV and back.

Event Creator Module

If the defined condition is fulfilled then sends an event to all child emitters so Event Listener Modules can react.

 

First we must set the Event name property: This name identifies the event generated by this particular module and listeners will only react if they monitoring this exact same name.

 

The next step is defining the condition. If the Current stack flag is set the current stack’s value will be tested against the Value property in the way indicated by the Condition dropdown. If Current stack is unticked then one of the available particle system properties can be chosen for testing. When a vector property is involved then the Component dropdown allows to pick a member of that vector.

 

The Max event count per loop specifies the maximum number of events fired in an emitter loop, while Min event delay constraints how close two events can be to each other.

 

The last group of properties allow to pass extra data with the event so related listener modules can use it.

Event Listener Module

Reacts to named events broadcast in the current hierarchy (Event name property). The untriggered module will produce the Untriggered value, however when an event arrives Trigger data mode defines how the output changes: the result becomes either a manually set one (Custom value) or one of the extra data packets sent by the Event Creator Module. If Infinite trigger count is false then the maximum number of accepted events can be set for every loop of the current emitter. When Does an event toggle? is unchecked then the module switches to the triggered state for a set duration after each event.

Info Module

Displays the current value of the stack at the point the module is placed or shows one of the curve inputs. In particle specific stacks (like Position) a random particle’s values are shown. Used for debugging.

Normalize Module

Normalizes the incoming vector data. (Doesn’t work with scalar stacks like Spawn rate.)

Point Sampler Module

Samples a point (a vector value). Similar to Vector sampler but it implements position visualization.

Property Sampler Module

Samples a particle or emitter property in either the current or the immediate parent emitter.

Scalar Module

Defines a scalar value. In vector stacks (Position or Color for example) it is used as a vector with all components set to this value.

Transform Sampler Module

Samples the transform component of another object.

Object: An emitter parameter of GameObject type, referencing a scene object. If the parameter doesn’t exist or does not point to a valid game object then this module will not modify anything.
Transform: Which transform property to sample.

Vector Module

Provides a vector value. It’s meaning depends on its parent stack: in Color it will be interpreted as an RGBA color while in Position as a position in space.

Vector Sampler Module

Similar to Vector module but works as a sampler so it can produce a new value from time to time.

Volume Sampler Module

This module checks if the particle is in- or outside a volume defined by any of the stock Unity colliders. The actual object is referenced through a named emitter parameter.

Property modes

Modules are configured through their properties. Each property has a header, an optional property menu in the top right corner and the actual value. The property menu allows us to switch how the property creates a value. The available modes are as follows:

Constant: A simple value which stays the same throughout the life of the particle or emitter.

 

Random: A random value between min-max values is picked. This value (and the random seed) stays the same throughout the life of the particle or emitter.

 

Curve: Allows to define a curve to produce the value. (See more about curves bellow.)

 

Random Curve: Allows to define a minimum and maximum curve to produce the value.

 

Reference: References a similar property from the modules placed in the shared stack. Note that the referenced property’s setup is cloned here not its actual result. So for example the minimum and maximum limits will be copied from the shared property to all others pointing to it but each of them will pick their own random value in that range.

 

Parameter: Attempts to reach an emitter parameter of the same name and appropriate type. This mode is useful for providing a way for emitter specific tweaks to a shader blueprint.

Curves

Curves are defined by the following properties:

 

Input: What kind of data in the system drives the curve. If a vector type is chosen then a drop-down menu shows up which allows to pick a member of the vector.

 

Input range: Defines the range of the input data.

 

Curve widget: The curve itself, clicking on the control opens up the standard curve editor. The horizontal axis represents the “input range” portion of the input data while the vertical axis is the output range.

 

Output range: The range of possible output values.

 

These are the available curve inputs:

 

Acceleration: Emitter: The calculated acceleration of the emitter, can be imprecise at extremes.

 

Acceleration: Particle: The final acceleration of the particle with accelerations created by the velocity and position stacks factored in.

 

Color: The value of the similarly named stack.

 

Custom Scalar: The value of the similarly named stack.

 

Custom Vector: The value of the similarly named stack.

 

Death Condition (0..1): The value of the similarly named stack, representing how close the particle is to be marked for death.

 

Dying Duration: How long it is going to take for a particle to die after the “Death Condition” was met.

 

Forward: Emitter: The forward vector of the emitter.

 

Forward: Particle: The forward vector of the particle.

 

Frame Rate (0..1): Represents where the current frame rate is in the 15..60 fps range.

 

Particle count: The current particle count of the emitter.

 

Position: Emitter: The position of the game object which contains the emitter component.

 

Position: Emitter (Local): The parent relative position of the game object which contains the emitter component.

 

Position: Particle: The final position of the particle with displacement by the acceleration and velocity stacks factored in.

 

Rotation Rate: Particle: The value of the similarly named stack.

 

Rotation: Emitter: The container game object’s Euler rotation.

 

Rotation: Emitter (Local): The container game object’s parent relative Euler rotation.

 

Rotation: Emitter: The final rotation of the particle with rotation by the rotation rate stack factored in.

 

Scale: Emitter: The scale of the emitter.

 

Scale: Particle: The value of the similarly named stack.

 

Spawn Rate: The current spawn rate.

 

Time: Collision: (Not implemented.) How long it’s been since the last collision.

 

Time: Death (0..1): How far the particle is through its “Dying Duration”.

 

Time: Emitter: The age of the emitter.

 

Time: Loop (0..1): A value between 0 and 1 representing how far the emitter has completed its current loop.

 

Time: Particle: The age of the particle.

 

Velocity: Emitter: The calculated velocity of the emitter, can be imprecise at extremes.

 

Velocity: Particle: The final velocity of the particle with velocities created by the acceleration and position stacks factored in.