Vector Fields

An overview of vector fields and how they work with GPU sprites.

Choose your operating system:

Windows

macOS

Linux

The most interesting feature of GPU particles, aside from their efficiency, is vector fields. A vector field is a uniform grid of vectors that influences the motion of particles. Vector fields are placed in the world as Actors (Global Vector Field) and can be translated, rotated, and scaled like any other Actor. They are dynamic and may be moved at any time. A field may also be placed within Cascade (Local Vector Field), limiting its influence to the emitter with which it is associated. When a particle enters the bounds of the vector field, its motion will be influenced by it and when a particle leaves the bounds, the influence of the field will fade out.

By default, vector fields impart a force on particles within them. Vector fields also have a "tightness" parameter. This parameter controls how directly particles follow the vectors in the field. When tightness is set to 1, particles read their velocity directly from the field and thus follow the field exactly.

Static vector fields are those in which the grid of vectors never changes. These fields can be exported from Maya and imported as a volume texture. Static fields are very cheap and can be used to add interesting motion to particles, especially by animating the motion of the field itself.

Additionally, vector fields may be reconstructed from a 2D image. In this case, an image much like a normal map can be imported and used to reconstruct a volume texture by extruding or revolving it around a volume. A static vector field may be added on top of this reconstruction to introduce some noise and randomness. Further, the 2D images may be animated by storing individual frames in an atlas texture. Doing so allows you to perform a fluid simulation offline and reconstruct the motion in real-time at very little cost.

Global Vector Fields

Global Vector Fields*, as mentioned above, can be placed in a level as an Actor. However, they cannot merely be dragged out of the Content Browser**. In order for a vector field to be set up within a level, a Vector Field Volume Actor will need to be added, and the appropriate vector field asset will need to be associated with it.

Vector Field Volume Actors

A Vector Field Volume Actor is not a volume in the traditional sense. To create one, find Vector Field Volume in the Class Viewer and drag and drop it into the level. Then, assign the Vector Field from the Content Browser via the Actor's properties. Once added, the field can be positioned, rotated, and scaled.

VFScaled.png

Any GPU sprite particle systems that contain the Global Vector Fields module may utilize this global vector field.

GlobalVectorFieldsSystem.png

GameModeVFV.png

In this image, only the particles about halfway down the length of the emission volume are intersecting the Vector Field Volume.

Local Vector Fields

Local Vector Fields , as opposed to their global counterparts, are vector fields that exist entirely within a particle system and are not placed in the world. This means that local vector fields can only affect the particle emitters to which they are assigned, unlike Global Vector Fields, which can affect any particle system with a Global Vector Fields module .

Local Vector Fields are added via the Local Vector Field module .

LocalVectorField.png

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss