UDN
Search public documentation:
BeamEmitter
Interested in the Unreal Engine?
Visit the Unreal Technology site.
Looking for jobs and company info?
Check out the Epic games site.
Questions about support via UDN?
Contact the UDN Staff
Beam Emitters
Document Summary: A reference to properties-based emitter editing and creation. (non UDN build). Document Changelog: Updated by Michiel Hendriks for build 3323. Previously updated by Chris Sturgill for 2226 build and reorganization. Original Author: Lode Vandevenne.Introduction
This document will cover Beam Emitters, one of five different possible emitters available in the 3323 build. For more information on general emitter properties, see EmittersReference. For more information on the other three emitter types, see SpriteEmitter, SparkEmitter, MeshEmitter and [TrailEmitter?. This Emitter is very useful to create lightning and electrical effects. It stretches the chosen texture into a beam with HighFrequencyPoints and LowFrequencyPoints. There must be at least two of each to make the lightning work. Each beam is one particle. Normally, the beam is only one angular line, but you can also give it branches. As previously stated, we will be discussing Beam Emitters a property at a time, with most of our attention on those properties unique to, or especially relevant to, these Emitters.Acceleration
Applies acceleration to the beam particles. This is probably not going to be useful as real-world lightning bolts are not visibly affected by gravity. Probably better results will result in changes to StartVelocityRange. For more information on Acceleration check out the Emitters Reference document.Beam

BeamDistanceRange
The endpoint of the beam will be offset by the specified distance. This value is used if the emitter's DetermineEndPointBy option is set to PTEPDistance.BeamEndPoints
Add one or more to specify either an offset range or an ActorTag. This is further explained in PTEP_Offset and PTEP_Actor under DetermineEndPointBy.BeamTextureUScale
Scales the particle's texture in the U dimension, which lies along the length of the beam. Note that the texture used will need to be laid out horizontally like the image below in order to be displayed correctly.

BeamTextureVScale
Scales the particle's texture in the V dimension, which is the width of the beam. A value of 4 would repeat the texture twice horizontally like the image below.
DetermineEndPointBy
A very important field. This, not surprisingly, determines the method by which your beam finds its endpoint. The options are as follows:PTEP_Velocity
With the default setting PTEP_Velocity, the EndPoint is determined by the Velocity of the particle (that is a combination of StartVelocityRange in Velocity, and Acceleration). The length of the beam is then determined by the StartVelocityRange values and the LifeTime of the particles. The direction of it is determined by the X, Y and Z values of the StartVelocityRange. You can again use random values, so for example if X(Max) = Y(Max) = Z(Max) = +1000 and X(Min) = Y(Min) = Z(Min) = -1000, each beam will be anything random between this. It'll do almost exactly the same as on this animated gif below. You'll be able to see more than one beam now, because MaxParticles in General is set to 10 by default. Also, lightning normally only goes straight towards the ground, so only using negative Z values for StartVelocityRange is useful.
PTEP_Distance
This does the same as PTEP_Velocity, but now only the direction of the beams is determined by the StartVelocityRange. You can set the length with BeamDistanceRange, in editor units.PTEP_Offset
This allows you to determinate the EndPoint in relative coordinates. You have to enter these coordinates in Offset, inside BeamEndPoints[0]. To get this, first click on BeamEndPoints and press the Add button. Then there should appear a [0]. If you expand it, you can see the properties inside [0].

PTEP_Actor
With this, you can make the lightning go to a certain actor. This also uses BeamEndPoints[0], but this time, you have to fill in the ActorTag property (and not the Offset property). The lightning will go towards the actor you gave that Tag (in the Event properties of that actor). If you want the lightning to go randomly towards different actors, you have to add more BeamEndPoints, for example [1], [2], etc..., and in each BeamEndPoint enter a different ActorTag. Of course also give the actors these Tags. If you'd give three trees the SAME tag and use only BeamEndPoints[0], it won't work, the lightning will go to only one of the trees then. Again you have to give each of the BeamEndPoints a Weight higher than 0, that is the chance this BeamEndPoint will be used. For example if there are three trees, with Tags FullTree, FullTree2 and FullTree3, and you want the lightning to strike each of the trees randomly, but to strike FullTree3 twice as much as the other trees, give the following properties to the BeamEmitter:


PTEP_TraceOffset
This does the same as PTEP_Offset, but if there is a solid surface in the way the lightning will hit against it, instead of going to the actual EndPoint. Oh, and PTEP_TraceOffset doesn't work good in combination with the coordinate system PTCS_Relative.PTEP_OffsetAsAbsolute
The same as PTEP_Offset, except that the EndPoint is the absolute location instead of the relative location.PTEP_DynamicDistance
Does the same as PTEP_Distance except that the length can be scaled by Size.Y and the distance can be changed in realtime from UnrealScript.RotatingSheets
This option determines how many sheets the beam has. 0 and 1 mean the same: only one sheet. The screenshots show 0, 3 and 10.
TriggerEndpoint
This allows your beam to trigger another Actor. It is usable only when the DetermineEndpointBy is set to PTEP_Actor. If the Actor in question is something that can be triggered, ie. another particle system or a mover, then when the beam EndPoint will activate the trigger when it strikes. In the following example, a BeamEmitter is set to strike a SpriteEmitter with the Tag "ParticleActor" and a Mover with the Tag "MoveActor".


BeamBranching

BranchEmitter
This chooses the emitter you will use for your branch emitter. It is the number of the emitter you just added.BranchHFPointsRange
This is the range of high frequency points from which the branches of the beam will be spawned. The high frequency points are indexed starting with 0 at the beam's origin and continuing up to the number of high frequency points. The Max of this can be set well beyond the number of the high frequency points so if you don't want to think about this setting make sure the Min is 0 and the Max is very large, like 1000.BranchProbability
With BranchProbability, you can set the chance of branches to appear. If you set both Min and Max to 1, all the branches will be there (this is, the number of branches that you set in MaxParticles). If you enter a very high number, the branches may appear only at the top of the main beam. If Min=0 and Max=1, the branches will be divided over the whole beam. You have to experiment a little with this setting to find the best result.BranchSpawnAmountRange
In BranchSpawnAmountRange, both Min and Max have to be larger than 1, as soon as you make one of them smaller than 1, there won't appear any branches at all. The Branch Spawn Amount is the number of beams to spawn at each high frequency point. When this is 1, there will be at most 1 branch at each point. If this is 10, there will be up to 10 branches coming off each point.LinkupLifetime
If LinkupLifetime is False, the branches may stay behind while the large beam is somewhere else already. This happens when the branch has a bigger LifeTime, than the large beam. Setting LinkupLifetime to True, solves problems because the branches will live as long as the main beam, no matter their LifeTime value. Note: Make sure RespawnDeadParticles is False for the branches in this case, otherwise they get spawned at the wrong place. Here is an example of BeamBranching: The main beam is red. It has 12 LowFrequencyPoints and 60 very small HighFrequencyPoints that can be used as spawn points for the 25 green branches.

UseBranching
Setting this value to True will allow beam branching.BeamNoise


DynamicHFNoisePointsRange
Determines the range along the beam that will have Dynamic Noise. The high frequency points start at index 0 at the start of the beam and end at 1 less than the total number of points. If the beam has 20 high frequency points and Dynamic High Frequency Noise Points is set from 0 to 10, only half of the beam will move dynamically.DynamicHFNoiseRange
This simply determines the range of dynamic noise applied to the beam. Higher values will result in the beam's High Frequency points being dynamically offset further and further in the respective dimension (X, Y, or Z).DynamicTimeBetweenNoiseRange
This determines the time the engine waits before updating the Dynamic Noise. If you want the beam to update continuously set Dynamic Noise Points Update Time to 0 or some very small number.HFScaleFactors
Insert these to create a High Frequency Scale, similar to the ColorScale explained in the EmittersReference document. For example, let's say you have a beam with 100 HighFrequencyPoints. Without the HFScale, the whole Beam has the same NoiseRange everywhere, as in the image below.

HFScaleRepeats
This allows you to repeat the HFScale you have created using HFScaleFactors. A value of 1 repeats the scale one time, resulting in the image below.
HighFrequencyNoiseRange
This determines the amount of noise is applied to the HighFrequencyPoints of the beam. Higher values will result in the beam's High Frequency points being offset further and further in the respective dimension (X, Y, or Z). HighFrequencyNoise creates small-scale bends in the beam.HighFrequencyPoints
There must be at least 2 HighFrequencyPoints which define, along with 2 LowFrequencyPoints, the beam's Start and End points. They determine where the beam makes small bends. They also serve as points for Branching Beams.LFScaleFactors
This works exactly like HFScaleFactors (check there for a thorough explanation), except that it applies to Low Frequency Noise. Low frequency and high frequency noise work independently from each other, and can be used "through" each other. For example, you can use a lot of small High Frequency Points, and a few, very large, Low Frequency Points. Then the beam will have a few large bends, and a lot of small bends at the same time, as shown on the screenshot:
LFScaleRepeats
This allows you to repeat the LFScale you have created using LFScaleFactors. A value of 1 repeats the scale one time, resulting in the image above.LowFrequencyNoiseRange
This determines the amount of noise is applied to the LowFrequencyPoints of the beam. Higher values will result in the beam's Low Frequency points being offset further and further in the respective dimension (X, Y, or Z). LowFrequencyNoise creates large-scale bends in the beam.LowFrequencyPoints
There must be at least 2 LowFrequencyPoints which define, along with 2 HighFrequencyPoints, the beam's Start and End points. They determine the points at which the beam makes large bends.NoiseDeterminesEndPoint
This allows the noise applied to the beam to also affect its endpoint, which in most cases, it already does. Sometimes, however, the location of the endpoint is locked-- if the DetermineEndPointBy setting is PTEP_Actor, for example. In this case the endpoint will be set to the center point of the specified actor. However, this might not be the desired effect. It might look odd to see lightning strike the exact same place repeatedly. Setting this value to True will allow the beam to strike the desired actor but in a more random fashion. If the beam were striking a triggerable actor, allowing the noise to determine the endpoint will not stop the actor from triggering, even if the beam does not visually strike that actor. Note that this might result in visual glitches if the amount of noise is great. For example, let's say your beam is supposed to strike a tree and set off a fire particle system. However, it will look strange if a lightning bolt strikes the ground and tree 40 feet away from the impact bursts into flame. Reducing the amount of noise on the beam would fix this problem.UseHighFrequencyScale
If True, the beam will use a HFScale as described above.UseLowFrequencyScale
If True, the beam will use a LFScale as described above.Collision
Beam Emitters do not work with collision per se. However, the beam can be interrupted if it intersects something. See PTEP_TraceOffset for more information. For more on particle collision check out the EmittersReference document.Color
The best way to make the lightning to flash realistically is to use a color scale. This will make the whole beam change it's color during it's LifeTime. On the animated screenshot, there are two color scales] orange and yellow and the lifetime of the particles is 0.6 seconds. You can also use Fade In and Fade Out to make a flashing effect.