Search Unity

Procedural Lightning - Mesh (Not particles!!)

Discussion in 'General Discussion' started by FPSyndicate, Apr 12, 2012.

  1. FPSyndicate

    FPSyndicate

    Joined:
    Mar 31, 2011
    Posts:
    39
    I've been working on some special effects for our game and we now have realistic procedurally generated lightning!
    The lightning is for my game, Overkill, and is more specifically a weapon for the Tesla Roadster, which will have a tesla coil on it, of course.

    The lightning Script utilizes perlin noise and the mesh extraction script from the Procedural examples. Its different than the lightning example from the Procedural projects because it uses a mesh instead of particles, and looks/acts more like real lightning.

    Its completely random, but still tracks to the target (in this case, the bigger ball), and arcs like real lightning. Some miss the target, but lightnings not perfect! I also have a slider that makes the lightning more or less accurate. I'm gonna make it fork out later, so it'll look even better! Ill gladly take any suggestions anyone may have =)

    This is purely part of my game, but i was thinking that i could put it on the asset store, and sell it. Not quite sure what i should do with it, because know that lightning is a very difficult concept, and good lightning is kinda hard to find. So i guess im just asking everyone's opinions on it!

    $Lightning.jpg

    And theres an example on my site. here: http://fpsyndicate.webs.com/lightningdemo.htm

    (theres a slight delay on the slider because the lightning is pre-rendered before it is shown)
     
    Last edited: Apr 12, 2012
  2. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,643
  3. FPSyndicate

    FPSyndicate

    Joined:
    Mar 31, 2011
    Posts:
    39
    Sweet, the second link has some really realistic effects, but mines not done yet. I still have a lot of work to do with it.
     
  4. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,085
    I made an asset that does procedural lightning. I spent quite a bit of time on it, and I think the bolts it generates look very comparable to real storm bolts, plus all properties of the bolt are adjustable, and the bolts can even be seeded to be repeated.

    Asset lives at https://www.assetstore.unity3d.com/en/#!/content/34217
     
    SAOTA likes this.
unityunity