bug: partical fade to alpha 0 fails

BigDaveBigDave Member Posts: 2,239

I have this issue since a while

if i do a partial effect and change color from a to b and b has alpha 0 it sometimes is ignored

even tough the time for the color change is less than the actual life time the transition to alpha 0 is ignored

Comments

  • SocksSocks London, UK.Member Posts: 12,822

    Yes, I've noticed this too - I work in 12.10 and even in this older version fade to alpha is broken - it used to work fine in even older GS versions.

  • ArmellineArmelline Member, PRO Posts: 5,369
    edited June 2015

    It might be the rounding error problem you're encountering. Try using roundTo or prec, depending on your preference. See if that helps.

    Or perhaps this was the one I fixed by doing (alpha*10)/10, I can't remember. I remember coming across a similar problem though, and it was a floating point rounding problem!

  • SocksSocks London, UK.Member Posts: 12,822

    @Armelline said:
    It might be the rounding error problem you're encountering. Try using roundTo or prec, depending on your preference. See if that helps.

    We are talking about the colour/alpha in the particles behaviour (which doesn't have expression control over colour/alpha), it used to work fine, fading particles out, but it's not worked for the last few GS releases.

  • ArmellineArmelline Member, PRO Posts: 5,369

    @Socks said:
    We are talking about the colour/alpha in the particles behaviour (which doesn't have expression control over colour/alpha), it used to work fine, fading particles out, but it's not worked for the last few GS releases.

    Ah sorry, I tend to fail to read the word "particle"... it's been so long since I used the behaviour rather than spawning them myself. Doh!

  • BigDaveBigDave Member Posts: 2,239

    @Socks good to know i am not crazy

    @Armelline you spawn your own particles?
    so actors with certain effects + lifetime ?
    How is this impacting the performance vs using particles behaviour?

  • ApprowApprow Member Posts: 703

    @BigDave Making a custom particle system is very doable and more flexible, but yes it can have some impact on the performance. It really depends what kind of particles you want to have. If you need to spawn a lot of particles at the same time, then I would go with the particle behavior for sure. But something like wood chopping particles that are flying around, or sword fight particles (which might be what you're looking for regarding your Orcs game?) can be definitely done with some spawning or recycled particles. However, I would only do that if you want to add something extra to the particles, like bouncing of the floor or something like that.

  • ArmellineArmelline Member, PRO Posts: 5,369

    I avoid the particle behaviour pretty much entirely. The benefits of spawning your own particles are:

    1. No buggy startup.
    2. Physics on them.
    3. More flexibility regarding image etc.
    4. More options regarding gravity.
    5. Precise control over how many are spawned.
    6. Have colour/size changes that oscillate.
    7. Let the player interact with them, or have them interact with other objects.
    8. Move them in a greater variety of ways.

    There's no doubt more, but that's off the top of my head.

    Performance will take a hit if you spawn too many, but don't go overboard, and don't keep them alive too long, and you'll not have any problems. If you're spawning 100 particles over 5 seconds, for example, it's really not going to affect performance compared to the particles behaviour. Try and spawn 100 in 1 second though and you'll struggle.

  • SocksSocks London, UK.Member Posts: 12,822

    @Armelline said:
    I avoid the particle behaviour pretty much entirely. The benefits of spawning your own particles are:

    1. No buggy startup.
    2. Physics on them.
    3. More flexibility regarding image etc.
    4. More options regarding gravity.
    5. Precise control over how many are spawned.
    6. Have colour/size changes that oscillate.
    7. Let the player interact with them, or have them interact with other objects.
    8. Move them in a greater variety of ways.
    1. Home brewed particles can also use animations.
    2. They can change image (for example on collision).
    3. And a million other advantages.

    One issue with the Particle behaviour is that you cannot (reasonably) produce a constant/predictable stream of particles, this alone would make the behaviour enormously more useful, you could use it to lay out dotted lines, dashed lines, patterns of all sorts, but with the production of particles being random it prevents the behaviour from being used in so many more situations than it could.

    For example, tire tracks on a car would be great if it weren't for the randomness.

  • SocksSocks London, UK.Member Posts: 12,822

    @BigDave

    Problem solved (at least for me), you need to have an image selected for the fade to alpha to work, you cannot fade a particle without an image.

Sign In or Register to comment.