[SHOCKING] Procedural Lightning - Fastest, AAA Quality, Dozens of Prefabs and ⚡UNLIMITED POWER!⚡

Procedural Lightning Thread. Ask all your questions or show off your games here!

→ Download Procedural Lightning From the Unity Asset Store ←

Procedural Lightning and Thunder is an optimized drop in solution for lightning, electricity, thunder effects and even general line effects in your Unity project or game.

This isn’t any ordinary lightning. Using an innovative shader that allows fading in and out, growth, billboarding and glow entirely on the GPU in one draw call, this lightning will run great on mobile and desktop alike.

You will get 5x CPU improvement and 10x LESS draw calls vs. the Unity line renderer, allowing you to show lightning even on low-end mobile devices. All lightning renders and updates on the GPU! There is even an option to generate the lightning on a background thread, freeing your main thread for other tasks.

Most other lightning solutions use the Unity line renderer which doesn’t batch and has high CPU usage, especially for something with lots of lines and glow like lightning. Think of billboarding and coloring every line on the CPU every frame. YUCK! With this asset, the graphics card takes care of that so your CPU can do more important tasks.

Supports perspective, orthographic and orthographic xz planes.

I’ve added a nice spell system with force lightning, lightning beam, lightning ball, charged bolt and lightning whip. Easily extensible and customizable.

If that weren’t enough, you also get 17 high def thunder sounds. I’ve literally spent weeks on end of my life making this the best lightning in the asset store, and I know it will serve you well.

Here’s the full run-down on what Procedural Lightning and Thunder for Unity can do for you:

  • A configuration scene to help you get the exact look you want for your lightning. Tweak the detail, width, glow, duration, chaos, forkedness, direction and much more. Bolts can be randomized with a seed to get the same bolt.
  • One click to get the exact code and script to reproduce your lightning bolt.
  • Manual and automatic mode for the script. Trigger your customized prefab manually or let it run automatically.
  • A robust lightning script that lets you create lightning strikes with a large selection of parameters with near infinite possibilities.
  • Lightning works great in many scenarios: thunderstorms, magic spells, static discharge and much more!
  • Lightning branches fade in, jitter and grow to make your lightning really come alive.
  • Storm cloud particle system that looks stunning when lit up by lightning.

I’ve also included a more high level script if you just want storm lightning in your game without having to configure very much stuff. This script contains:

  • Normal and intense lightning strikes with appropriate brightness, thunder delay and thunder volume.
  • Cloud only lightning option.
  • 17 distinct thunder sounds.
  • Random range of time for the next lightning strike.
  • Option to illuminate the skybox when there is a lightning strike.
  • Random range of lightning intensity.
  • Force a lightning strike via script.
  • Lightning centered around the main camera by default.
  • Option to try and make sure every lightning strike is visible by the camera.
  • Dark cloud particle system for storm clouds.
  • Demo scenes showing some terrain and water with the ability to call lightning with keystrokes. Procedural Lightning for Unity also contains an advanced lighting system that allows you to generate point lights along the paths of your lightning for that extra realistic effect.

This asset contains a batch of prefabs to create lightning bolts, sphere lightning, cone lightning, lightning fields, arcs of electricity and chain lightning. 17 high def thunder sounds, as well as a storm cloud particle system that looks amazing when lit up by lightning, are also included. You can even seed your lightning to get the same appearance.

Don’t spend time making lightning effects yourself from scratch. Save yourself time and money with this powerful yet easy to use plugin.

This asset is demonstrated in a HereVR sci-fi pack video, viewable from here: Hibernation Pods - SC19 - HereVR Sci-Fi Project | 3D Sci-Fi | Unity Asset Store

Games using procedural lightning: - Doomwheel

Please read the Readme.txt file to get the most out of this asset. I am available at jjxtra@gmail.com to answer questions and help you out.

Best wishes for you and your project.

→ Download Procedural Lightning From the Unity Asset Store ←

Hi @jjxtra ,

Really like the assets of yours I have tried up to now. Just a question on the rain system you have. I tried the free version and added a standard cube with collider to the scene and noticed that rain was passing through the object. I added a rigidbody and still the same. Is there a way of configuring scene objects to stop rain etc passing through? If so is it also the case for your full weather system pack?

Thanks

doc

Dev replied via email. Thanks for the help.

Hey, @jjxtra
I have bought your asset, but I can’t do one thing.
I have a level map and I want to connect level icons with the lighting effect.
So each unlocked level gets lighting connection:


I’ve set my level completion stars (rhombus in my case) as Lighting Path points in LightingBoltSplinePrefab
but even when stars game objects are disabled, lighting is still being generated.
On the above screenshot you can see that level 15 is locked and stars are hidden, yet lighting is there.
Is there a way to use only active game objects in a lighting chain somehow?

And another quick question: how do I make my lighting to draw behind the asteroids mesh?
I’ve created a sorting layer
2678838--189251--Screen Shot 2016-06-15 at 7.57.42 AM.png
and set Lighting to use it, but it’s still in front. any advice on that?

Thank you

Hi,

Thanks for this plugin.
I’m having trouble using it in front of a MeshRenderer.



As you can see, the lightning is not visible when in front of a white MeshRenderer.
I tried setting the MeshRenderer material to Unlit and it happens when the color is white ; and to Standard and it happens when the light is intense enough to make the renderer white.
Am I doing something wrong in the setup?

Thanks!

Can’t help with your questions sorry but when I have emailed the dev he has always answered quickly. Not sure if he is aware of these posts. May be worth sending him an email via his website linked on the store page.

lightning you have most likely is using additive shader. there is nothing to add when background is already white.
You need alpha-blended shader instead of additive. but I don’t know if this asset has one

Hi,

I want to buy your asset but I have some questions :

  • Is it possible to change lightning colors ?
  • Does it works for VR projects ?

Thanks

Got your email. Sorry I don’t get notified on posts in this forum. I’ll try to turn that on.

1 Like

Supports VR, changing colors and so much more.

Try changing the blend mode on the script. It should have alpha blend, additive and anything else available via the src blend and dst blend script properties.

Hey Jeff,
Thank you for your reply and fix (however I am still having difficulties making it work^^')
But more importantly I’ve tried to build my game for WebGL or HTML5 (iOS works fine) and got this compiler error:

Any idea what that might be? Can’t build game at the moment
Thank you

Looks like a bug. I have a fix, email me and I’ll give you the file to fix it. I’ll send an update to Unity too.

Thank you for fixing it. All is good now

I’m having trouble to make it work with camera in Orthographic mode. For example, the DemoSceneMesh scene with ortho camera:

And with perspective:

How to get rays in front of object as it appear in perspective camera?
Thanks.

You should be able to set the sort order for 2D mode.

Nice plugin!

I have a question about prewarming the lightning, like you can with the particle systems - is it possible?

I am using the LightningBoltShapeSpherePrefab which I have added as a child to another game object. The problem is, when I instantiate a new instance of the parent, it takes a second or 2 for the lightning to take it’s full form. Is there a way to make it visible immediately?

Thanks

I am looking into a way to pre-warm and cache the lightning and hope to put this in an update.

Excellent. Thanks

Hi. Been using the asset for a few days and love it. I’m having a few small issues though.

For some reason, with Lightning Spline in Deferred with HDR enabled, my spline looks like this:

It flickers between looking correct and being these big opaque squares. When I turn HDR off, the problem goes away but I need HDR for my game.

Weirdly, I have Lightning Mesh in my scene and they work perfectly in HDR! Only the Spline seems to be affected by HDR for some reason.

Any chance you could look into this issue? I really want to use a spline for a big feature in my game but with this bug I can’t :frowning: