About : This is a basic tutorial on how the UE3 particle editor (Cascade) works. It will "quickly" walk you through the interface of the editor and explain how a basic smoke particle can be set up.
Target Audience : Unreal Engine users - Beginners
Platform : Unreal Engine 3 including RoboBlitz
Last Update : February 2007
Related links :
Introduction
The particle system in UE3 is drastically different to its original UE2 variant. Particles now got a brand new and extensive particle editor and are saved as assets in a package instead of actors in a level or U file. The new system has its advantages and disadvantages. The ability to save a particle as an asset in a package is great since all levels can now refer to the same particle and if the particle has to be adjusted it will only have to be done once. On the other hand is the new system also simpler, in a bad way. While the original system was very complex (perhaps too) with its million options and properties the new particle editor is more of the opposite. It offers too little. It is great to make simple particles with but when you want to make a non standard particle you need to search deep and often use strange combination of settings to get the desired result. For advanced particles I find the new system to be much less straightforward. Complex programs like UED should be based around logic so designers can figure out the majority of features on their own by simply browsing through the interface and applying logical thought since a lot of times half the features in programs like these simply are not documented. The ability to figure things out on your own is thus vital.
The Basics
Regardless of what I think lets get the tutorial going. The Cascade particle editor can only be accessed via an already existing particle, thus, if you want to open the editor you should either doubleclick an existing particle in the Generic Browser or simply create a brand new one. To create a brand new one open the Generic Browser and rightclick in some empty space and choose New ParticleSystem.
If all is right the Cascade Particle editor will open automatically once the new particle has been created.
Particles have a yellow edge in the Generic Browser, if you cannot see it, it might be hidden. Enable the Particle Systems in the top left of the Generic Browser to show it or simply enable the option Show All Resource Types.
The Cascade Particle Editor is divided into four different areas.

Area 1 is the preview window and it will preview the particle effect.
Area 2 is the list of different Particle Emitters and all of the modules each emitter contains. A ParticleSystem can contain multiple particle emitters. It is possible to have a waterdrip effect and a watersplash effect in the same ParticleSystem much like what was possible in UE2. Right now this space is still black because there are no particle emitters yet.
Area 3 is the property section and will display the properties of whatever emitter or module selected.
Area 4 is the brand new Curve Editor used to make smooth transitions from one thing to another. It replaces all the relative scale numbers of UE2 and it controls things like size over life, alpha over life (fading), color over life, velocityscaling and so on.
The top toolbar also has two buttons of interest. The wireframe button (A) and the background color button (B). The reason why I mention those two buttons is because it can be very hard to see certain (especially) smaller particles in the viewport and it often appears as if there is nothing at all. Switching to a wireframe view might then help to reveal where the particles are and how large they are. All other buttons are less relevant and pretty self explaining.
Add a new Particle Emitter by rightclicking anywhere in the second area and click on the only option given (New ParticleSpriteEmitter). You now have a very basic particle and it will look as if it does not show up in the viewport. That is because it's too small. Switch to wireframe like I just described to see it or zoom in A LOT (rightclick and drag in the Area 1 viewport to zoom, left click is rotate)
Now you obviously want to modify the default setup. To do so you can click on any of the modules such as Lifetime or Initial Size. If you need more than the default settings you can rightclick anywhere in the column and you will get a list of additional modules you can add.
To create a Beam, Mesh or Trail particle system rightclick anywhere on a Particle Emitter in Area 2 of the Cascade and choose TypeData
The Smoke Example
Since an example explains more than just some theoretic text I'm going to walk you through all the steps required to make a basic smoke particle setup that spawns and rotates particles, fades in and out and grows in size.
First of all you need a cloud material. Create your own cloud texture or use mine. Rightclick this image and save it and obviously convert it to bmp or tga before you import it.

Firstly add a Texture Sample node with the cloud texture and add a Rotator node behind it. The rotator node will slowly rotate the cloud around for a more natural effect. Secondly add a DepthBiasedBlend and a VertexColor node and connect them as shown. Finally connect the DepthBiasedBlend to the final inputs and be sure to set the material as a whole to BlendMode BLEND_Additive and Lighting model LML_Unlit.
You also need to set the DepthBiasedBlend's BiasScale to a higher number, dependent on how large the particles will be. A number like 64 will do for now. The DepthBiasedBlend node will make the particle fade out when it hits an object. This is done to prevent the particles from showing those typical ugly seams when they disappear into the ground or other surface. The VertexColor must be the alpha because it will enable the ParticleSystem to fade the material in and out. Without the VertexColor node the particle would not be able to fade.

If you are new to the Material Editor, be sure to take a look at my Material Editor tutorials
Update: It is adviced to use a DepthBiasedAlpha expression over a DepthBiasedBlend pictured for perfomance reasons. This is shown in Material Tutorial 2.
Once the material has been set up it can be applied to the Particle System. Be sure to have the material selected in the Generic Browser and then select the Particle Emitter in Area 2 and assign the material to the marked spot.

Next open the section RequiredInput right below the Material input field and modify a number of properties.
-Enable bUseLocalSpace. This will enable the particle to be moved around more easily and adds the possibility of rotating it with the regular rotation tool.
-Enable bUseMaxDrawCount: This will cap the maximum number of particles at the MaxDrawCount number instead of keep spawning particles dependent on the height of the Spawnrate number
-Set MaxDrawCount to 50: This will limit the maximum number of particle sprites
-Set Spawnrate Constant to 5.0: This controls the number of particle spawned every second.
Leave all other settings on the default settings for the time being. Note, if the particle only shows up in wireframe view don't panic. It may be normal behavior because of the VertexColor node in the Material Editor and will be resolved later.
Select (click it) the Lifetime module in Area 2 to make its properties show up in Area 3. In that module change Max to 3.0 and min to 2.5. This controls the maximum time a particle lives before disappearing again.
Click on the next module which is Initial Size and set Max X, Y and Z to 256.0 each and Min X,Y and Z to 224 each. This will give the particle a random size in between 256 and 224.

After that select the module Initial Velocity and set Max X and Y to 8 and Z to 160. Set Min X and Y to -8 and Z to 128. Velocity controls the direction and speed. In this case the smoke will rise with a speed between 128 and 160 and will have a subtle random movement to either the left, right, front or back because the X and Y have a number in between 8 and -8.

The next thing you want to do is to give a random start location to the smoke since you don't want all of the sprites to start at the exact same location. The default modules do not allow you to set a random start location so you will have to add a new module to the Particle Emitter. Rightclick in the column of the Particle Emitter in Area 2 and choose Location -> Initial Location. Once added, click on it to get to its properties.
Change all Max numbers to 2.0 and all Min numbers to -2. This gives you a 4 unit width box in any direction and thus a maximum of 4 units offset for a particle. Also note: if you click the red crossed box on the module the viewport will show a wireframe box to indicate the spawning area.

Now there are two more things you want to do before the smoke particle is done: Fade out and making it grow. Both actions are performed by using the brand new Curve Editor.
Lets tackle the fading first. Rightclick the Particle Emitter column and add a new module: Color -> Color Over Life. If your particle didn't show up in a non wireframe view at first, it probably will do so now.
To add the Color Over Life module to the curve editor and finally gain some functionality for it click the little scanline button on the module. Curves can be hidden by clicking on the little yellow square in the left column of the Curve Editor. Do so for the Color Over Life Curve since you don't need this at all right now and it will be in your way when working with the Alpha curve.
Now, you may notice that you either can't see the Alpha Curve or that you can't add extra control points to it. The reason for that is because the AlphaOverLife Curve is always wrongly configured by default, it is configured as a constant simple number and you obviously don't want a simple number but a whole curve to control it.
Expand AlphaOverLife in the left properties section and click on Distribution until you get a blue triangle button on the right of it. Click that triangle and choose DistributionFloatConstantCurve.

Left clicking and dragging makes you pan through the Curve editor view, the mouse wheel zooms in and out. If all is right you could see a flat purple (could have another color too) line in it. This is the AlphaOverLife Curve. The horizontal numbers are the time. Vertical is the amount. Add a controlpoint by holding Control on your keyboard and click somewhere on the line, preferably on 0,0.. Add another one on 0,1
You can move a control point by holding Control on your keyboard and click dragging the point up. Move the first control point up to around 0.25 vertical. Leave the one at 0, 1 unmodified.

The smoke now fades out. To make it fade in you would need to add a 3rd control point in the middle and set the first control point back at 0,0.
The last thing to do is to make the particle grow in size. This too is done with the curve editor.
Rightclick the Particle Emitter column in Area 2 and choose Size -> Size By Life. Then click on the little scanline button to add the module to the curve editor, like you've did for the Color Over Life module as well.
Click the little yellow square of the AlphaOverLife section in the curve editor to make its curve invisible as it will only get in your way when working with the Size curve.
The LockedAxis property in must be set to XYZ because you want to be working with just one curve and not three..
Also, you first need to set the Distribution to DistributionVectorConstantCurve again, exactly like you did before with the Alpha Over Life module.
Once you're done with all of that add two control points to the curve, one at 0,0 and one at 0,1. Move the first one slightly up and the second one a lot.

You're done! Exit Cascade. Be sure to have the particle selected in the Generic Browser and then rightclick a surface in your level and Add Actor -> Add Emitter. If the particle looks too thin add more particles to it at the Spawnrate -> Distribution property.

Be sure to save the package the particle is in!
Also note that, contrary to UE2, particles can now be scaled! You can freely scale the drawscale of the particle and the particle will scale accordingly.







