One of the things that holds basically true about Torchlight 2 is that many of the powers have radial/circular damage areas. It's very helpful to be able to represent these areas using particles.
We've actually just seen one way we can do that: it is possible and very useful to use the “Heroic Billboard” model from Post #2 and blow it up bigger! We can place it on the landscape, on a monster, or really anywhere.
Here's another example from the Theolentist class, from the skill “Writhing Choir.” The green ring on the ground around the tentacles represents an AoE Silence effect. It uses the technique described in the previous post to the letter, with the “aura” attached to an invisible monster and blown up quite a bit bigger than in our last example. (It would also be possible to just attach it to the ground, but I didn't do that for a number of reasons that would take a while to explain. Chalk it down to “because sometimes that's how I did it.” :) )
Okay, so that works if we happen to have an image that is round and just want to blow it up. But how about something different, where the “ring” is made of actual moving particles? For that, we use the Particle Ring.
Here is an example of what we are going for below.
The great news is that using the techniques we learned previously with a few edits, we can create this effect very easily!
RENDER TYPE - Billboard. Note what we're talking about here is the render type [i]of the individual particles in the ring[/i] not the ring itself. We don't have to use a Billboard, but it's a frequent choice. You could change this to Ribbon Trail, for example, if you want a long, streaky effect.
RENDER STYLE - Additive. But it could be Alpha if you wanted as well. Again remember we're talking about individual particles.
FRAMES HIGH and FRAMES WIDE - As with previous effects this is usually 1 but it could change if you are trying to use an animated texture.
LIFETIME - 0 For the same reasons as before. We want it to last forever (or at least until dismissed)
Here's where we're going to make a bunch of changes.
NUM LOOPS - -1 Setting this to -1 means the loops last forever. This particle system will endlessly generate, maintain, and then delete small particles.
EMIT DURATION - Any number, really. The lower the number, the fast all the particles show up each pulse. I used a value of 1.
EMIT RATE - ?? You get to decide here. The higher the number, the more particles will appear in the ring during each loop. The effect shown on screen used a value of 8. You could also use a Random value, if you wanted a highly random appearance to the number that show up.
PARTICLELIFE - This value defines (in seconds) how long each particle will individually last. I like to use a random number here so the particles don't line up perfectly. I used a random value between 2 an 4 seconds.
TYPE OF EMITTER - Circle. Previously we used a Point. By changing it to a Circle, we can force the Particles to be painted in the Circular shape we see. :)
Okay, now take a look at the CIRCLE EMITTER settings. There are 4, and they can change our appearance:
MINRADIUS sets the minimum radius within which a particle can be placed.
MAXRADIUS sets the maximum radius within which a particle can be placed.
FIXED forces the game to ONLY use the MAXRADIUS. It was set to True for the particle previously shown. If we changed it to false, Particles could appear anywhere within the circle area (but not closer to the center than the Min value); changing it to True forced them all the way to the edges.
STEP indicates the minimum distance around the circle before placing the next image. If the circle is smaller than the step provided, it will double over on itself. Useful for when you want a very specific distance between each particle rather than a random one.
Making our Particles Tastier
Color The steps above explain how to create the basic particles. But it's helpful to add some additional things to them to make them make more sense. The biggest problem you'll notice right away is that our particles pop into existence and pop out of existence with no fanfare at all. Wouldn't it be nice if they faded in and out?
We can fix that by adding a Color Over Time Affector to our Particle. Just right click and select Color Over Time.
To get a particle that is Additive to fade out, all you need to is make sure the color at the end of the scale all the way on the Right is set to Black. It may also be helpful to have the start color be Black as well, so it will fade in. (Note: If this were an Alpha graphic instead, you need to adjust the Alpha down to zero; setting to Black doesn't fade it, it actually turns it solid black.)
Note that the rate that the color slider advances for each particle is based on the PARTICLELIFE we set earlier. Since our PARTICLELIFE was 2-4 seconds, it will take 2-4 seconds for each particle to individually make its way across our color scheme. This means individual particles will not match each other in color. Here's the actual gradient I used for my effect in game:
Rotation We can add rotation to the whole system by just adding a Vortex Affector to our particle. The higher we set the Vortex amount, the faster the whole thing spins! If we also want each individual particle to spin, we could Texture Rotators as well.
Size of Each Particle To ensure the particles aren't all the same size, I used a Scale Affector with a value set to Random, so each particle could be up to 1/2 or x2 the base size.
Changing the Orientation of the Circle Particles If you hold the CTRL key while in the editor, while the Particle is selected, the tool changes. We can now click and drag on the colored yellow, blue or green regions change the orientation of our Circle Particles, in case we want something other than just a skyward facing ring. The image below shows both the original ring and a second, rotated ring.
The overall recipe is:
Particle: RENDER TYPE - “Billboard” (but you can technically use anything, even ribbon trails) FRAMES HIGH and FRAMES WIDE - 1 (usually) RENDER STYLE - Alpha or Additive (usually) TEXTURE - Whatever we want the individual particles to look like LIFE TIME - 0
TYPE OF EMITTER - Circle VELOCITY - 0 NUM LOOPS - -1 KEEP LOCAL - True NO EXPIRATION - False PARTICLELIFE -Pick a duration that seems sensible, I used a random value between 2 and 4 EMITRATE - However many particles you want EMITDURATION - However long you want it to take for all those particles in EMITRATE to show up each loop MINRADIUS, MAXRADIUS, STEP, FIXED - set depending on whether and how you want to "fill in" your circle.
Color Over Time - Fade to black to make particles appear to vanish Vortex - determines rate the particle system spins Texture Rotator -spins each individual particle on its own axis Scale - try using a random value to vary the scale of each piece