Emitters
Flex integrates with the Cascade particle system so that any regular UE4 particle emitter can be converted to a Flex Particle Emitter to emit Flex particles.
To make a Particle Emitter use Flex, open up Cascade, select an existing Particle Emitter, right click on the top field with emitter name and the preview icon to open the pop-up menu and then click Emitter->Convert to Flex Emitter. A copy of the original emitter will be created.
The Flex specific properties can be found in the Details tab of the Flex Particle Emitter.
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 are all managed by the usual Cascade modules, but Flex will update the position and velocity.
Particle Emitter
- Flex 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.
- Local Space Enable local-space simulation. See Local Space Simulation.
- Inertia Scale Scale the amount of local linear velocity and local angular velocity..
- 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 Fluid Surface Template Per emitter surface template is not supported anymore. Use the fluid surface property in the associated Flex container instead.
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:
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 traveling. 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, for example, 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.