Dispite wanting to call it; IT’S ALIVE!!! a quick youtube check to 1931 showed me that frankenstein had a lot less lightning then I remember . But anyway I have had some spare time on my hands so I have bin trying to make a good looking lighting effect. So far it has bin going pretty good (long way to go still), but I think it’s time for some input from the public.
Looks a lot better in the web player
single stream thunderbolts
thunderbolt with multiple streams
2 emitter examples
colored “bendy lightning” examples
Tuff crowd is seems. Perhaps the thunderbolt addition will help (top post for image and web player). It is only a single stream bolt and no sound atm but I plan to change that. And yes I know my cloud sucks lol.
Thanks justicar. It should just get better and better as it goes on.
Ok new update I have added multi stream option to the thunderbolt, also the thunderbolt now actually lights up the area around it and a base sound has bin added to the thunderbolt.
Nothing has really changed with the standard electric zap/shock/plasma channel, not sure what you call something like the 1st image. But anyway now that the thunderbolt is nearing a end, I think I’ll go back and see what I can do.
@3dDude
Nice job yourself. I really like your “glow” you have, how did you make it so nice? (hehe had to try lol)
@everybody else
If you plan on using this for your game make sure you come back in a day or 2. I should have the next version with all the fancy inspector gui controls by then.
Well that was easier then I thought it would be (something must be wrong lol). Anyway the inspector GUI’s have bin added in. You can now change everything (including color) with ease.
I’m glad you like it cemC and I have more good news for you (and everyone else)…
A new update (V0.6). Okay a bit of the background stuff have changed in this one, to hopefully give the code a “cleaner” look. So okay what is on the list;
1 code has bin updated to #pragma strict to give it that slightest performance boost (I’m talking a whole 0.2fps “GASP” lol)
2 all examples have bin moved to a single scene
3 some scripts now can toggle if the run out of sight (using OnBecameVisible/Invisible)
4 “Lightning” script now has the option to clamp it’s start or end or both (thanks for the tip 3dDude)
5 the thunder noise can be set to dynamically delay itself based on the distance to player and the speed of sound
6 what started as a attempt to replace “spark” has resulted in a whole new prefab. I call it “bendyLightning” (for lack of a better name). This one is a bit different then the others, do to the fact that it does not have a set point it has to end at. Thus giving it a vary erratic look. However you should keep it’s distance under 10 otherwise it looks like some kind of electric explosion (on second thought that could be useful lol). You will find a few of them on posts inside the lab with different colors and being emitted by the emitter examples.
7 the “Emitter” has bin added what this one does is it creates sparks at random points on a mesh. Giving it a nice tesla coil look, or perhaps can be used for a “being electrocuted” kind of thing. This one has it’s own limits as well though. It is a pretty heavy script and is NOT intended for models with large a poly count, or to have it’s spread turned well above normal resulting in a sort of electric fur.
And I have a partridge in a pear tree (jk lol).
@3dDude
Thanks for the tips again but I was only able to use the clamp ends bit (in this update anyway) because my scripts do not create light (except for the thunderbolt) thus no flicker for now. As for a cyan color, well most if not all lightning around here is white (maybe with a bit of blue), and in some places it’s purple ect ect. But it’s not a problem because like I said you can change the color of all examples easily.
Actually the gun is just 3 normal Lightning’s with update distance turned on. So it uses older prefabs but I thought I would show a new way to use it in this update.
Ok another update. It’s starting to look like a complete package with this one.
And on this list of updates for this one we have;
1 Lightning script has bin completely rewriting giving it about a 15% performance boost without glow or lights turned on. I was able to run 5000 meters this way at 90-100fps.
2 Lightning script has new features added such as a particle glow effect, ability to create light and controlled speed of jitter.
3 glow added to thunderbolt and sparks.
Yup does not sound like much but it really is a big improvement to the last version.
One thing to note though is that all the quality settings have bin boosted in the web player to show the best look. So if you are experiencing lag in the web player it’s probably because everything has bin turned up to a eleven.
Looks pretty good. The lightning from the clouds outside though lives for too long and sometimes has more random branches than it seems like it should.
Lightning chooses a path based on least resistance, so a more directed path would be desirable. Sometimes the lightning seems to swing back around towards itself or the sky, this breaks the feel of it for me. But the look the glow and jaggedness of it all looks right.
Actually I’m a step ahead of you. bolt stay time, sparkyness (more or less branches) and spread (deviation from the direct path) and others, are already added in as variables with a easy to use inspectorGUI. Allowing you to just move a few sliders left or right to give you the perfect lightning bolt.
But the default lightning bolt (thunderbolt in package) is simply what to me felt best. So feel free to change it to your liking.
Edit:
Was the main bolt turning up? The branches I allowed to go up slightly if their random rotation turned them horizontal in the beginning. But this should not happen with the main bolt.