Home Unreal Engine

Particle value with range over time?

polycounter lvl 18
Offline / Send Message
flaagan polycounter lvl 18
So I'm trying to do a couple of different things, all with the same result. I'm attempting to give a particle a set of value ranges over time, but it doesn't seem to work.

I'm using DistributionVectorUniformCurve as it appears to be the only curve that allows a series of min/max values over time. The idea is that, for things like color or scale, I give the item a range to choose from at particular keyframes.

For example:
time 0, min scale .75 / max scale .1
time .75, min scale .5 / max scale .75
time 1, min scale .15 / max scale .25

The problem is, for anything I apply this to, instead of picking a value within the range, the sprite just flickers between the min/max values. So when I use it for scale, the sprites jump between the scale sizes; when I use it for color, it jumps between the color values.

Any ideas what the heck is going wrong?

Replies

  • blankslatejoe
    Options
    Offline / Send Message
    blankslatejoe polycounter lvl 19
    couple of possibilities:

    --is the particle life itself is too short, and its actually spawning a NEW particle each 'flicker'?
    --is your curve itself stairstepping instead of interpolating smoothly? (check the curve editor for the points...that would be a pretty obvious one, I think).
    --are you trying to do this in an 'initialsize' module instead of an 'overlife' module? If you are, I think you're actually changing the spawning size over the life of the entire emitter, rather than life of particle, iirc

    Any of those help?
  • imbueFX
    Options
    Offline / Send Message
    imbueFX polycounter lvl 5
    Hrmmm what's tricky about what you're trying to do is change the uniform range over time. Here's a "sorta solution", use an initial module (initial color, size, velocity, etc) to set a range. This would use a regular uniform distribution, not animated/curve. Then simply use an over life module (size by life, velocity over life, etc) to use a regular animated curve (constant curve).

    This isn't exactly what you're looking for, but off the top of my head this is the closest approach. If you want to get technical you can use a dynamic parameter for your material, which give a lot more control (you can switch between emitter and particle time with a checkbox). That's another possibility.
  • flaagan
    Options
    Offline / Send Message
    flaagan polycounter lvl 18
    blankslatejoe - happens regardless of life length; curves are all auto-smoothed, but happens regardless of their state; nope this is the 'overlife' one, I don't think you can even use DistVecUniCurve with initialsize.

    ImbueFX, I'll give that a look when I get home. I could've sworn UEd 2 was able to do something like this, though I may be mixing that memory up with the toolset I was using back at Cryptic. Still, seems kind of odd that it would be so out of the norm to be able to say "spawn this sprite, and over the life scale it within these velues at these keyframes".
  • doggett
    Options
    Offline / Send Message
    Your example.
    Every tick it will be randomly selecting between the min/max.
    (I don't think Unreal is using a smooth noise function for this).


    Do you need this behaviour?
    Would a uniform initial size (with a constant curve on Size by life) not do what you need? Edit: (Which is what ImbueFX suggested!)
  • flaagan
    Options
    Offline / Send Message
    flaagan polycounter lvl 18
    doggett - essentialy what I'd like to have happen is for each keyframe on the curve have the sprite pick a value within the min/max range. I will give ImbueFX's suggestion a try when I get home and see if the results are what I was looking for.
  • flaagan
    Options
    Offline / Send Message
    flaagan polycounter lvl 18
    Seems to give a close enough result. Kinda odd that something that a simple curve or script edit back at cryptic is such a chore to achieve with UEd (at least in the form I'm used to). Thanks guys.
Sign In or Register to comment.