Actionscript 3 Lightning class - First tests

Math, Physics, actionscript 3, advanced image editing, algorithms, fun, game, perlinNoise, simulation

Here again with the first test of a Fx class.

The class can render lightnings with these specs:

- different shapes and aspect
- variable edge-smoothness to keep the extremities sticked to the origin
- runtime children generation (every trunk can generate children)


Sample #1


Sample #2

Perhaps not that useful but could be nice to implement in some game or demo.
Code soon.

13 Responses

  1. Og2t  •  April 23, 2009 @9:12 am

    This is awesome Pierluigi, do you use Perlin Noise for that at all?

  2. DiseƱo Web Valencia  •  April 23, 2009 @9:59 am

    Its cool, Im waiting the code. Thanks

  3. benny!  •  April 23, 2009 @11:56 am

    Very nice looking effect. Good work!

  4. Pierluigi Pesenti  •  April 23, 2009 @1:04 pm

    Glad you like it. There are many perlinNoise here, two for every energy line. One for the macro and one for the micro, the one used for the macro variations is realtime smoothed by a simple function I’ll post, to keep the extremities sticked to the origins.

  5. Andy Kim  •  April 23, 2009 @9:38 pm

    Very very nice. I’m quite ready to sink my teeth into the code to learn :)

  6. dVyper  •  April 24, 2009 @1:59 pm

    This is excellent - can’t wait to see your method!!!

  7. [...] diferente al mio , parece que logro el efecto usando Perlin Noise , pueden ver el post en su blog : http://blog.oaxoa.com/2009/04/23/actionscript-3-lightning-class-first-tests/ Bookmark It Hide Sites [...]

  8. [...] My favorite flash effects meister, Panta is previewing his electrifying new experiment. Code please! >>> [...]

  9. Milan  •  November 11, 2009 @12:56 pm

    dude is there a possibility you could send me your first code linking the lightning between the two crosses?

  10. Pierluigi Pesenti  •  November 12, 2009 @4:59 pm

    I answered your mail. Bye

  11. Peter Ochabski  •  September 18, 2010 @8:20 am

    Have some great ideas to base on this pls send me any working code you’re willing part with and I’ll give you a link on the site im working on. Thanks for keepin it open!

  12. Peter Ochabski  •  September 19, 2010 @9:52 am

    Got it, thnx! Will send you a link soon!

  13. Tom  •  February 15, 2011 @3:54 pm

    Hello Pierluigi
    wow, you did amazing work and I’m fascinated by the way you did that. Is there a way to get the sourcecode of your first example on this page (the one with the ligthning between the two crosses) to play with and to learn how it works? That would be great!
    Thanks for sharing your ideas and keep up the good work!

    regards
    Tom

Leave a Reply

Allowed tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>