[Effect] v1.1 Lightning Beams: Seamless, smooth and procedurally animated with beam-like properties

97248564-f9318600-17f9-11eb-83b7-238c6aa7a4e8

Lightweight, and highly customisable Lightning Effects for use in Roblox. Can be made into all sorts of special effects. Has been previously used within the popular game elemental battlegrounds.

Features:

  • Layered, moving Perlin noise with a variety of animation properties
  • Uniform disk-point picking for even distribution of control points
  • Can go along a Bezier curve rather than just straight-lines (i.e. Similar to how rblx beams curve)
  • Varying thickness, length, and, transparency
  • Can use ColorSequences
  • Lightning “Sparks” and “Explosion” sub-modules
  • Can smoothly travel as a projectile trying to reach a point with a variety of kinetic properties
  • Uses a PartCache for performance (v1.1)

Showcase



Usage

v1.1:

Don’t attempt to use Sparks or Explosion with the latest version. I’m working on a refactor for these that work with the latest version and will be bundled into version 2. Version 3 is likely to be similar but will instead use a cache for mesh-skinning.

Deprecated old version(s):

There are 2 versions. A version which uses Parts which looks better but lags more and another version which uses ImageHandleAdornments to run much faster (inspired by this also great module. )

Parts: LightningModule.rbxl (33.5 KB)
ImageHandleAdornments: LightningModuleImageAdornments.rbxl (37.8 KB)

You can also check it out here on GitHub which also lists all API.

Recommend adding a bloom effect to game.Lighting whilst lowering threshold and changing intensity
Recommend setting Enabled = false when far away from.

Extras

If you use this in a creative way, I’d love to see it in a reply here or on Twitter:
https://twitter.com/quasiduck

Credits

@EtiTheSpirit for their amazing PartCache module which this now uses by default

If you have any suggestions or find any issues, please raise an issue on the github link or pull request.

857 Likes

You could make some pretty awesome lighting effects with this. Thanks for sharing!

18 Likes

These look amazing, I’ll definitely be using this for the future.

14 Likes

It looks really good.

Nice for it to be open source.

14 Likes

This is kind of similar to this, right?

8 Likes

Yeah, I mentioned it as it inspired the use of ImageHandleAdornments.

I wanted to have a more flexible version that could do smoother-looking animations with varying thickness as well as a more jittery lightning effect. That + all of the kinetic features and being able to curve similarly to beams.

5 Likes

OMG, this is awsome, SOMEONE, GIVE THIS PERSON AN OSCAR!!

10 Likes

Would you be able to give a repro file for the lightning strike video?

22 Likes

Omg, this is gorgeous. Well done, my dude!

4 Likes

You could make some really nice lighting effects, Thanks for sharing to everyone.

3 Likes

Thanks for sharing this with us! Wow, how long did it took to you to do this, my head hurts only if I think about the math behind…

4 Likes

That spherical lightning beam is so awesome! Thanks for this fantastic module.

3 Likes

Pretty view, I might have a use for this to create some exciting effects with it.
Great release. :+1:

6 Likes

This looks amazing! I’ll be using it in my game I am creating now, thanks for sharing!

Edit: Question, I am using the lightning explosion when you click on the map but I can only fire it from the client which means it only shows the explosion for the player deploying it, when I tried to fire on the server, it doesn’t show at all and when I check the server side the explosion are just sitting where they were deployed all glitchy.

Anyway I can get it so that everyone sees the explosion?

1 Like

This is only a client-sided module as the server stuff shouldn’t be too difficult to setup from there. You’ll have to fire a remote event which relays the information of create lightning explosion at position x to all clients on the server so that it can create the effect on all those clients.

Also, for everyone currently using this module, I’m working on a far-better looking and more performant version (v2) which uses mesh skinning with part pooling options so that this can be used in more quantity as well as have more quality.

13 Likes

Ok that makes sense, thank you!

Can’t wait to see the next version as well, really cool stuff!

3 Likes

will it be more understandable for builders that dont understand scripts to change it?

2 Likes

Would you be able to give a repro file for the lightning strike video?

Yeah, this would be really helpful if you could provide it @Quasiduck .
Other than that, this is super amazing!

6 Likes

I was just about to suggest using mesh skinning and a part cache. Creating large amount of parts is very tedious, I had to setup a part cache for certain guns that had busted fire rates in my game to prevent the drop in frames.
Edit: excited to see v2 and the performance boosts!

2 Likes

Amazing module! However, it only works when I run it in studio. It doesn’t work when I play test it or go in game. How do I fix this?

2 Likes