Fade... FX?

This forum is currently in read-only mode.
From the Asset Store
120 Epic Fire FX Animations + 2 Bonus Characters. Contains 3000+ frames and a lot of Pixel Art Sprites
  • A request, and a question if its even possible.

    Ok so the idea for the fx is kinda like whats in this cap:

    http://dl.dropbox.com/u/666516/fadefx.cap

    Basically an object with the fx would fade out in time, but the question is is it even feasible?

    The cap only makes about 150 extra objects, but would doing something like that with an fx take up more resources?

    I guess ideally the fx would only fade out if the object is moving, again don't know if that's possible.

    Any thoughts/ takers?

  • Basically, what you would need is something like a one-directional blur. A pixel shader is not aware of movements, so you would need to change the strength (and therefore the length) frame by frame according to the velocity of the sprite. The problem is that pixel shader are limited in instruction slots. A loop that would create such a long tail would exceed the limit (I'd guess 4-8 instructions per iteration, max slots of shader 2.0 are 64, a for-loop would be limited to 9-16 iterations)

    But maybe I'm thinking too straight forward ans someone comes up with a solution?

    Anyway, as for the time consuming: I made a simple test. Your cap as provided drops from 2300 fps to 430 fps when spawning the sprites. Deactivating the spawn action and applying ZoomBlur to the layer leads to constant 592 fps - and ZoomBlur is an expensive effect. Also, you would apply such an effect to the sprite and its dimensions not to the whole layout. So I would say it would have better performance with an effect than with the spawning sprites technique.

    EDIT: I'm not quite sure what you mean by 150 extra objects? When I tested your cap 1000 extra sprites where spawned at max. Or do I get it totally wrong?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • EDIT: I'm not quite sure what you mean by 150 extra objects? When I tested your cap 1000 extra sprites where spawned at max. Or do I get it totally wrong?

    That's strange, guess your using unlimited framerate?

    I'm using v-synced at 60 fps, and it never drops below 70 fps, and 150(ish) objects.

    Its also using 4 megs of vram for the one additive fx, another reason I'm not sure if it's even a good idea.

    I mean the spawning effect looks ok, other than the occasional skip. And thats really the main reason I thought an fx might be better.

  • You are right. For the test I switched to unlimited. That's because if I use v-synced I get exactly the monitors refresh rate and therefore would not be able to see differences.

    Effects use quite a bit of the VRAM initially, but they shouldn't add. (Language difficulties here) What I mean is: Create a new empty DirectX game. Now add "Additive Plus" as layer effect and run it. It uses 4.69 MB. Now go back to construct and add some other effects. Run again and you'll see that the space required didn't change. It's still 4.69 MB.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)