achieve this lightning effect

This forum is currently in read-only mode.
From the Asset Store
J-BoB Magic Series LIGHTNING Sound Pack comes with 465 high-quality sound effects
  • i tried to achieve the wanted effect without using displacement. instead it works via sprite instances, which are being stretched/rotated/moved by perlin. i'm well aware that this approach might not be thaaat efficient, but at least i wanted to try it out with coherent noise ;)

    here's the CAP

    a few hints:

    • press Space to toggle the fade behaviour
    • play around with Size in the Noise-Settings, it represents the "Step" setting in the flash example. But beware, the higher the value, the more instances are being created (i suggest not going higher than 512 with fade off)
    • global("OffsetY") determines the amplitude
    • take a look at the Noise-settings in "FillArray".. especially Frequency is of interest
  • oppenheimer

    Its pretty.

    Couple thoughts. You could try the Canvas object and draw the noise. That might speed things up a bit, but I think the biggest pull is coming from constantly randomizing noise.

    You could (in theory) generate a few arrays filled with the noise on start up, and go back and forth between them.

    Of course setting that up takes some effort as they don't have variables for picking. So you could either add copies of the object (noise, or array), or create instances by placing them in containers with an object that has variables to pick, sprite etc.

  • oppenheimer, wow, that's the best looking example so far^^.

    2 Questions I have. Is there a way, letting the first few and the last few sprites not moving that low/high? So it looks more, like the have a fixed start and endpoint.

    newt you said: "but I think the biggest pull is coming from constantly randomizing noise." My second question is now, is it too cpu/gpu intensive? Would be a shame, cuz it looks awesome.

  • A few things about the original example and splines: They are much more than curves. In fact they are ideal partners for such effects. Because you control the bendiness of the segments of a spline. They can be straight lines as well as a whole circle, they keep connected to each other, etc. The randomness is created with 2 perlin noise generators that are re-seeded on every tick in the flash example.

    The problem is just, that splines are much easier done in a script language like AS3 or Python than in an event-based system.

    The rest of the flash example is realized with effects, that you can use in CC as well, namely 'additive', 'horizontal blur' and 'vertical blur' and 'behind glow'

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Is there a way to combine oppenheimers example with newts first one?

    I mean, there were 2 points the bolt was connected, both could be moved.

    Or isn't that possible with that technique?

  • newt: thanks ;) ... constantly randomizing the noise would have been impossible (512 map size needs about 2 or 3 seconds). i pushed the data into an array to have the opportunity to process it.

    zyblade: you could reshape the amplitudes when you re-write the array data. to use the start and end point, you definately need more math. in the current state of the example it's just half of the layout height + offset.

    the cpu's processing time heavily depends on your map size of the noise and the number of instances which are moved/scaled/rotated. once it's done (at startup) its data is available through the array. gpu issues shouldn't be problem. only the post-processing stuff (2x blur & glow) is taking about 6mb of vram.

    "Is there a way to combine oppenheimers example with newts first one?"

    of course! just pull the array/noise-data and use it as displacement.

  • here's another approach combining perlin noise & displacement via ribbon.

    grab a CAP

    a few hints:

    • 2 Noises are being used for X and Y distortion (each with a different seed ofc)
    • global('Strength') determines the strength of distortion in pixels
    • global('Segments') determines subdivsion (keep it reasonable or glitches may occur)
    • global('NoiseOffset') animates the whole thing (see event 2)
    • boxes are draggable.. woohoo ;)
    • play around with the variables (especially noise settings, e.g. noise type, frequency etc.)
  • Oh yeah, gonna try that out now. Thanks^^ Or from german to german "Dankesch�n!"(thank you) ^^

  • Hello there, guys! Can you help me out a little? I want to know how to make lightning effect too.. but the links seem to be all dead..

  • joedman593

    Are you sure you have posted in the correct section?

    This thread is over 5 years old for the - now retired - Construct Classic software, so the links are likely to be no good.

    If you meant to post here, then you will have to hope some user still has such old files available and are willing to post a link for you.

  • I was hoping they'd still be here. I really wanted to see what those dead links contained.

    I've been lurking the forums for a few hours now and most I found only had dead links.

    Can you help me out? Or should I just make a new topic about dynamic lightning?

  • I was hoping they'd still be here. I really wanted to see what those dead links contained.

    I've been lurking the forums for a few hours now and most I found only had dead links.

    Can you help me out? Or should I just make a new topic about dynamic lightning?

    Is it Construct Classic you are using rather than Construct 2/3 ?

    If so, then a new thread requesting help would probably be best.

    This old section isn't used very much these days, so you may have to be patient when waiting for a response.

  • I'm using Construct 2 at the moment.

    I made new thread a few moments back, yeah, it feels that my only hope for now.

    Too bad DropBox killed their links. I feel like I missed out on a lot of cool stuff here.

  • Most of the Construct Classic examples used distorts, but we don't have anything like that in Construct 2. If we did it would be a webgl solution only.

    The closest thing you could do in C2 now would be something like ray tracing where you cast lines/ stretch sprites from xy, to xy

    You can even cast multiple sprites end to end for the zigzag effect.

    Which coincidentally is much easier to do in C2 than CC.

  • I'm using Construct 2 at the moment.

    I made new thread a few moments back, yeah, it feels that my only hope for now.

    Too bad DropBox killed their links. I feel like I missed out on a lot of cool stuff here.

    If you are using C2 then these examples wouldn't have been of any use to you anyway, as they are not compatible with C2.

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