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. )
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.
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.
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?
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.
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!