Particle Control over Time Questions

Hey all,

I’m stepping back to Unreal after several years of using other tools for FX, and am sorely missing a few controls. I’m hoping that I just don’t know what I’m doing, so I thought I’d throw it out to all of you:

  1. I have particles with random lifespans, and want to animate an attribute (let’s say dynamic parameter) at the same rate, but with a different random base. For example: Attribute = rand(0,1) + time;

If I use emitter time, all particles are set to the same time, and therefore the same attribute value. If I use a particle constant curve, my values are locked to the normalized age of the particles, meaning that a particle with a lifespan of 2 will animate the attribute faster than a particle with a lifespan of 5. Is there no way to associate the X axis of the curves with a non-normalized age?

(addendum: I’m aware that in this example with a dynamic parameter, I could setup the equation in my material instead, passing only a random 0-1 through the parameter, but my need for this control on particle attributes directly remains true. For example, animating in a non-constant derivative)

  1. Is there a way to seed the random component of a uniform curve so it does not flicker per frame?

I’m struggling a bit, as these are fairly basic controls in my more familiar engine, so I’m assuming I am missing something completely. Thanks in advance for any assistance you can provide!

-Keith

For the second part, I believe you can use the “seeded” version of a module to control the random stream used for uniform curves. Many modules support this (including dynamic parameter). There’s a “Convert to Seeded” menu option.

Thanks for the answers guys.

Unfortunately using the color scale over life (or other similar modules) still has the problem of being based upon normalized age - so if the particle lifespan has a wide range, I’ll get very different rates of change.

This does solve the initial random portion though. I’ll take what I can get, and sit tight waiting to see what you release for the node based particle editor.

Thanks a ton!

The seeded module in this case only creates a deterministic playback of the effect, with flickering still in place.

  1. For color you could do this by using an Initial Color module that uses a uniform distribution and a color scale over life module after that to modify it over time. That’s not exactly what you want, it’s a mul instead of an add but I do t think there’s a way to do what you want. Other options: use different distributions in RGB and Alpha or use color along with dynamic parameter.

  2. That’s one artifact I don’t think you can avoid. The engine chooses a random interp value every frame. Initial color plus color/life can help but I don’t think there’s a solution for dynamic param.

I think what you want to use is the SpawnTimeOnly check box in the Dynamic Parameter attrib. This allows you to specify a range of value settings @ particle spawn time.

You can create a similar scenario using particle color, and a uniformDistribution set to use extermes to drive a material parameter with a color channel.

I hope that helps, hit me on Twitter if you need more info.

That’s still not quite it. That’ll get me the random range of values at particle birth, but the rate of animation will still be dependent upon the normalized age.

It’s a little fickle, but in some effects creating a uniform beat like this can really drive the effect, particularly when we’re looking at parameters passed through to the material. If it’s not really feasible, I don’t want to keep beating on it, but I was hoping I was just missing something :wink:

Here’s a practical example: A basic dust puff effect, blowing out from the center cylindrically. Particles have a random lifespan between 3-5, so the puff starts dense, but as it grows and spreads, its counts thin (overdraw optimization). Now I want these particles to all scale up, but at the exact same rate, not some faster than others. Or possibly I want to animate the rate of growth/derivative, but still have every particle effected the same. I have no way to do this. If I use a scale/life curve, the particles with shorter lifespans will grow faster than the particles with longer lifespans.

The only attribute that I can think of (besides position/velocity) that allow this control is rotation, which gives me the ability to specific a constant rotation rate, or animate the rate itself. It comes up frequently for rotation, so you guys have clearly run into this at least here.

Like I said though, it’s a bit of a picky control. If it’s not possible, than I’ll just have to keep waiting for the new particle editor and hope I can work some magic in it. Thanks so much for your help!

Offhand I cannot think of a great way to do this with the Cascade module set. You can manage the size in the vertex shader or use an instanceParameter of a sizeScale module, and base it upon game time/a timeline in a Blueprint, so it has nothing @ all to do with the normalized time of your PS.

ooh, backing out to blueprint is a cool idea. It might be a little impractical, but that sounds like a fun challenge for me. Thanks again!

Either way, you have to spawn your effects using an actor component, so a little BP code and an Instance Param let’s you work some previously gameplay programmer only magic.

You can control your Dynamic Parameter via an Instance Parameter and a timeline in your blueprint. This will allow you to de-couple the timing of your material from the normalized time of your sprite.

You can use an Instance Parameter with most CPU particle features, and many of the GPU parameters for a high level of control during run time.

You may have to split your emmiter into 3 parts. One for each lifetime mark and tweak your life and growth settings for each instance. A particle with a life of 2 and growth rate of 1 should visibly grow the same rate as a particle with a life of 1 and growth rate of .5
It’s a bother I know, but it should get you what you are looking for until a way to optimize to one emmiter can be found.

Another thing I’ve used for random behavior is the random number between two curves distribution, specifically on velocity on a hive of bees. (Unity)