Particle Emitter

From Oldunreal-Wiki
Jump to navigation Jump to search
ParticleEmitterActor.png

Emitter
Subclass of: Actor> XParticleEmitter > XEmitter
Included since: 227a

The Unreal 227 Particle Emitter system is a potent tool for mappers and modders, as it allows to add a great deal of advanced effects to both environments and actors.

Note: When creating Emitter subclasses for usage in UScript code, subclass the classes prepended with an X, such as XMeshEmitter etc. For placement in maps, use classes without the X such as Emitter, SpriteEmitter etc. Triggered emitters should use Network classes.

Emitter Types

The Particle Emitter classes come in various flavors: Normal, Sprite (adds rotation support), Mesh, Weather and Beam. Since 227f, it is also possible to combine multiple emitters into one connected system using the Combiner properties.

Emitter

This is simplest form of particle emitter with the best in-game performance which can be used for most effects.

EmGeneral:

  • bDisabled - Emitter is disable, no more spawning new particles.
  • bRespawnParticles - Respawn particles that have died.
  • bAutoDestroy - Auto-destroy emitter actor after all particles have died (can be used for temp effects).
  • bAutoReset - Auto-reset emitter after all particles have died and AutoResetTime has passed.
  • bSpawnInitParticles - Spawn initial particles, or else wait for possible auto-reset (only when bRespawnParticles is false).
  • MaxParticles - Maximum amount of particles.
  • ParticlesPerSec - Amount of particles to spawn per second (0 = auto assign the value).
  • LifetimeRange - How long time particles should live.
  • StartupDelay - Delay in seconds before Emitter activates (can be used for triggered emitters to delay an effect).

EmVisibility:

  • bStasisEmitter - Similar to Actor bStasis, but stop hide particles once player isn't seeing the emitter's zone.
  • bBoxVisibility - If enabled, visibility box will be used.
  • VisibilityBox - Only update when any parts of this box radius is within player camera sight.
  • bDistanceCulling - If enabled, use distance culling.
  • CullDistance - If player camera is beyond this distance, don't render.
  • bNoUpdateOnInvis - When not rendering emitter actor, do not update the particles either.

EmCorona:

  • CoronaColor - Corona color range.
  • CoronaTexture - Corona texture.
  • bCheckLineOfSight - Should coronas disappear when behind some wall?
  • bParticleCoronaEnabled - Whatever if particle coronas are enabled.
  • CoronaFadeTimeScale - The time it will take for coronas to fade in/out when falling out of sight or back in sight.
  • CoronaMaxScale - Maximum corona scaling.
  • CoronaScaling - The scale of the coronas.
  • MaxCoronaDistance - Maximum distance coronas should appear in.
  • CoronaOffset - Offset of the coronas in the particles.
  • bCOffsetRelativeToRot - Whatever if corona offset should be relative to particle rotation.

EmRevolution:

  • bRevolutionEnabled - Particle revolving should be enabled.
  • RevolutionOffset - Revolving offset for the particles.
  • RevolutionsPerSec - Revolving speed.

EmVisuals:

  • ParticleTextures - Random/Animation sprite frames for particles.
  • bUseRandomTex - Should use random frame or else animate the textures.
  • ParticleStyle - The style of the particles.
  • StartingScale - Starting scale of the particles.
  • TimeScale - Time scaling of the particles (timescale 0-1).
  • PartSpriteForwardZ - The particles render forward Z (render trick).
  • ParticleColor - The color of the particles.
  • ParticleColorScale - Color time scaling.

EmFade:

  • FadeInTime - Fade in time scale (0-1).
  • FadeOutTime - Fade out start time (0-1).
  • FadeInMaxAmount - Max. scale glow when fully faded in (0-2).

EmPosition:

  • SpawnPosType - Should use Box/Sphere/Cylinder spawn offset?
  • BoxLocation - Box spawning offset for particles.
  • SphereCylinderRange - Sphere/Cylinder offset range.
  • bRelativeToRotation - Spawning offset should be in relative to actor rotation.
  • bUseRelativeLocation - All particles location/rotation/velocity should be relative to actor?

EmTrigger:

  • TriggerAction - Emitter actor triggering action.
  • SpawnParts - If spawn particles, then how many?

EmSpeed:

  • SpeedScale - Particles speed scale in relative time (0-1).
  • ParticleAcceleration - Particles acceleration range.
  • SpawnVelType - Whatever it should use Box/Sphere/Cylinder velocity for the particle.
  • BoxVelocity - Box velocity for particles.
  • SphereCylVelocity - Sphere/Cylinder range.
  • bVelRelativeToRotation - Velocity should be relative to actor rotation?
  • bCylRangeBasedOnPos - Sphere/Cylinder velocity range should be relative to particle spawn offset?

EmCollision:

  • ParticleCollision - Collision type: Nothing/Walls/All Actors/Projectile target actors.
  • ParticleExtent - Particle collision size.
  • ParticleBounchyness - Bounchyness of the particles (when hitting wall/actor).

EmSound:

  • ImpactSound - Particle impact sound (when hitting wall/actor).
  • SpawnSound - Particle spawn sound.
  • DestroySound - Particle destroy sound.

EmMeshPos:

  • UseActorCoords - Use this mesh actor's vertex points positions.
  • VertexLimitBBox - Box limitation of which vertexes it should only emit in.
  • SingleIVert - Single vertex number it should emit on.
  • bUseMeshAnim - Whatever if it should use animated frame rather than first static frame (slower option).

EmCombiner:

  • ParticleSpawnTag - Combiner emitter which should spawn an own particle at newly spawned particles position.
  • SpawnCombiner - Instanced version of a spawn combiner emitter.
  • ParticleKillTag - Combiner emitter which should spawn an own particle at a newly destructed particle position.
  • KillCombiner - Instanced version of a kill combiner emitter.
  • ParticleWallHitTag - Same as above except spawn at the point where particles hit a wall.
  • WallHitCombiner - Instanced version of a wallhit combiner emitter.
  • ParticleLifeTimeTag - Same as above except spawn particles constantly at the living particles.
  • LifeTimeCombiner - Instanced version of a lifespan combiner emitter.
  • ParticleLifeTimeSDelay - The time delay how often lifespan particles should be spawned.
  • CombinedParticleCount - When this emitter actor is being used as combiner emitter, spawn this many particles on my combining emitter actor.
  • IdleCombiner - An emitter that is simply idle and doesn't interact with other emitters (useful for multi-emitter effect on trigger).
  • ParticleTrail - Trail that should appear for each particle.

EmForces:

  • ForcesTags - The tags of the emitter force actors that should be applied on our particles.

EmPhysX:

  • bEnablePhysX - Enable PhysX simulation for particles (Movement - PhysicsData must also be set).

Sprite Emitter

Basically the same as Emitter, but supports rotating particles.

EmRotation:

  • RotationsPerSec - How fast the particles should rotate.
  • InitialRot - The initial rotation of the particles.
  • RotNormal - For specific particle direction.
  • ParticleRotation - Type of direction the particles should have (i.e.: face the direction they are flying or face normal direction).
  • RotateByVelocityScale - If non-zero, RotationsPerSec is scaled by current velocity multiplied by this value.

Mesh Emitter

This emitter's particles are rendered as meshes and can even be animated.

EmMesh:

  • ParticleMesh - Display mesh of the particle.
  • bRenderParticles - Should render mesh in "bParticles".
  • bParticlesRandFrame - Should particles mesh use random texture animation frame.
  • EmRotation:
  • ParticleRotation - Particles rotation type.
  • bRelativeToMoveDir - Particles should have rotation relative to movement direction.
  • RotationsPerSec - Rotation rate of particles.
  • InitialRot - Initial rotation of the particles.
  • EmAnim:
  • bAnimateParticles - Particles should animate.
  • ParticleAnim - Particle animation sequence.
  • PartAnimRate - Particle animation rate.
  • bPartAnimLoop - Particle should loop animation.

Weather Emitter

An easy way of adding nice weather effect to your map (such as rain, snow or dust).

Note that the emitter is directional; particles move according to its rotation.

EmWeather:

  • PartTextures - Random texture for the particles.
  • Position - Spawning offset around player camera.
  • AppearArea - Appearance area around actor location (when AppearAreaType is Area).
  • Lifetime - Particle lifetime.
  • Speed - Particle speed.
  • Size - Particle size.
  • WeatherType - Whatever the weather type is Rain/Snow/Dust (falling type).
  • ParticleCount - Maximum number of particles.
  • PartStyle - Style of particles.


Beam Emitter

TODO: Add information!!

Trail Emitter

TODO: Add information!!

Particle Forces

These forces can be applied to in-level Emitter actors to have some special reactions at specific parts of the map (such as a vent that sucks up smoke).

EmForces:

  • KillParticleForce - Kills any nearby particles.
  • ParticleConcentrateForce - Concentrate all particles to fly toward this actor.
  • VelocityForce - Force particles to fly toward some specific direction.

Triggering an Emitter

To add a triggerable emitter, create and set your emitter as desired. In emGeneral, set bDisabled to TRUE, so that it is not on by default, and make sure emTrigger has TriggerAction set to ToggleDisabled. Your effect is now set on and off by the triggering of the emitter via normal triggers. If you want your emitter to be on by default, simply put bDisabled to FALSE, so that the first triggering of the emitter will set it off.

You can also make your emitter emit only once after it is triggered. Set bDisabled to TRUE, and in the emitter properties, still in emGeneral, set bRespawnParticles to FALSE, so that after emitting the number of particles specified in MaxParticles, the emitter stops emitting. I recommend setting bAutoDestroy to true afterwards, so that the actor is destroyed in the game and does not use memory - useful if you have many such triggerable effects.

Spawning by bursts

If you want all the particles to be emitted at once when the emitter goes on - at the beginning of the game by default, or when triggered if set up this way -, simple set ParticlesPerSec to a huge number greatly superior to the MaxParticles value. If you want to emit 200 particles in one huge burst, set ParticlesPerSec to something like 5000. This will insure the game spawns your 200 particles as quickly as if it had to spawn these 5000 particles in the same second. As soon as one particle is destroyed, however, another one will be spawned, which means you will have several successive bursts. If your lifetime has a wide range (for example Max = 15 and Min = 5), the second burst will be much less immediate and may take some time, as the engine waits for one particle to die to spawn another one. If you want your bursts to be evenly spaced and of the same duration, make sure the difference betweent he Min and Max values of your particles' lifetime is very small or non-existent (same Min and Max). If you set bRespawnParticles to False with this template, your entire emitter will drop its entire load of particles in one go and then be useless - remember to set it to bAutoDestroy.