Particle System

NeL Particle Systems

Playing with Particle Systems

  • Launch the ObjectViewer
  • Open the particules window in the menu "Window" -> "Particle"
  • Load a particle system right clicking on the "PS" tree and Select "Load"

  • Select the particule system snow.ps in the shapes/ directory.
  • You can press the "Play" button to start the particle system.

In this example, the particle system is like this:

The system use Emitter, Particle and Forces.

snow.ps has a rectangular emitter to emit particle on top of the camera called EmitSnow. This emitter emits PartSnow particles. PartSnow is a basic particle that display a look-at texture. There's two forces that affect the particle system. The first is a Brownian Force to generate a random force that simulates the wind and a Directional Force that simulates gravity.

The resulting is a basic snow effect.

 

Common Problems

 

Particles Not Affected When Out of Frustrum

Particle systems aren't instantiated until they become visible. To force instantiation you can call UParticlesystem::forceInstanciate() just after 'createInstance' in your game code.

Simulation of particle trajectories is done in an incremental way so if the frame-rate is too choppy the particle effects may slow down, that is if elapsed time is over the duration, which is specified in the Particle Systems main editor page. For unimportant effects this is acceptable but for effects related to game-play you can force real-time animation by choosing "Spell FX" as a preset.

  • Spell FX
    • Real-time
    • Animates even when not visible
    • For game-play related effects.
  • Environment FX
    • May slow down if the frame-rate is low or choppy.
    • Does not animate if not visible.
    • For decoration effects and other unimportant effects.

 

Forces Behave Relative to Camera

Forces should be tagged to be in "world" coordinate system, as shown in the screenshot below. Possibly the emitted particles should be tagged to be in world too, especially if the effect is moving, so they remain at their spawn position in the world (if there's no gravity) and the effect thus leaves a trail.

 

Screenshots