Emitters

Flex integrates with the Cascade particle system so that any regular UE4 particle emitter can be used to emit Flex particles. To make a Particle Emitter use Flex, open up Cascade, select the Particle Emitter and scroll to the bottom of the Details tab.

_images/cascade.jpg

If the Flex Container property is set to a valid container then particles will be emitted into the container and simulated by Flex. The particle lifetime management, rendering, size, etc is all managed by the usual Cascade modules, but Flex will update the position and velocity.

Particle Emitter

  • Container Template The Flex container to use for simulation of particles spawned from this emitter.
  • Phase The phase that is used for all particles belonging to this emitter. Be sure to enable self-collision if the particle should collide against each other. Fluid particles should have the Self Collide and the Fluid options enabled on the phase. Granular materials can be simulated by just having Self Collide option ticked.
  • Mass The mass of each particle spawned from this emitter. Heavier particles will tend to push lighter ones out of the way faster. Mass ratios larger than about 10:1 will often cause problems for physics simulators, so it’s best to keep the relative range of masses quite small.

Flex provides some particle modules for spawning Flex particles, they are both spawn modules, which can be added by right-clicking in the Particle Emitter and expanding the Spawn menu:

_images/particlemodules.jpg

Particle Modules

  • Spawn Flex Fluid The fluid spawn module will create particles in a grid formation at the Fluid Rest Distance as set on the Flex Container. This node also takes a velocity parameter, that specifies the speed at which particles are initially travelling. The emitter will automatically spawn enough particle layers to ensure a consistent stream of fluid is emitted.
  • Spawn Flex Shape The shape spawn module takes a reference to a Static Mesh. If the mesh asset has a Flex Solid Asset then the particles in the solid asset will be spawned by the emitter in one go. This can be used to create particles in an initial configuration that matches a shape, e.g.: a sand-castle. Note: Positioning particles in the editor can be more conveniently done by disabling the Const Acceleration module and enabling Use Local Space in the required module.