Page 1 of 1

Lightning Generator Part 1

PostPosted: Sat Apr 21, 2012 5:34 am
by FeralX
arc1.ged
Ged File - no data files required
(9.47 KiB) Downloaded 164 times
Attched is a quick demo showing the basics of creating dynamic lightning/electrical effects using the canvas actor in GE

I will shortly follow this up with a full tutorial on how the effect is created and how it can be improved upon.

If it is well received, I hope to continue the tutorials until we have forked lightning, smooth flowing electrical Arcing, and "Force Lightning"
lightning1.png
Basic Arcing

lightning2.png
Basic Lightning - No forks Yet

This demo shows only the very basics, and I will be using it to explain how the "midpoint displacement" function works so that you can create your own lightning engines using midpoint displacements

The Midpoint Displacement function is the core to creating these effects, once you understand it, the rest is releatively easy.

This demo only shows some very basic electrical Arcing style displacemnt and the very basic start to "lightning",
eventually over several tutorials we will add braching, multiple points and smoothy flowing arcs, and we should be able to build up to this
ff4.png
Coming Soon

If you try it out, change the "generations" to something lower then 6 and it will show the lightning better ( lower number of branches)

I will add the tutorial soon, in the mean time have a play :)

Re: Lightning Generator Part 1

PostPosted: Sat Apr 21, 2012 5:41 am
by FeralX
NOTE: Sorry I forgot

You will see that this demo only goes from a specified point to another specified point and only goes up and down :?

You could do that with simple sprites..This tutorial will eventuall build into one where any to/from points can be chsoen and the lighning can go in any direction.. just thought i would point that out in case you were wondering :)

FeralX

Re: Lightning Generator Part 1

PostPosted: Sat Apr 21, 2012 5:44 am
by SuperSonic
Wow, good job. I was going to try something like this a while ago but it looks like you beat me to it xD

+1 to you :wink:

Re: Lightning Generator Part 1

PostPosted: Sun Apr 22, 2012 3:27 am
by Hblade
I'd like to try this, please include the data folder :P The font isn't found o3o

Re: Lightning Generator Part 1

PostPosted: Sun Apr 22, 2012 4:28 am
by skydereign
Just copy a font into your data directory, and rename it to the font you need.

Re: Lightning Generator Part 1

PostPosted: Sun Apr 22, 2012 4:14 pm
by Hblade
Ahh alright thanks

Re: Lightning Generator Part 1

PostPosted: Mon Apr 23, 2012 9:29 am
by FeralX
ooops sorry guys, forgot about the font thing

Thanks SkyDesign :)

BTW What do you guys wnat next ?

Forked lighning or how to go from any point to another, or true motion arcing or ?

let me know

Re: Lightning Generator Part 1

PostPosted: Mon Apr 23, 2012 2:02 pm
by FeralX
FeralX wrote:ooops sorry guys, forgot about the font thing

Thanks SkyDesign :)



sorry I meant skydereign, my bad, thanks again skydereign :D

Re: Lightning Generator Part 1

PostPosted: Wed Apr 25, 2012 10:42 pm
by skydereign
FeralX wrote:BTW What do you guys wnat next ?

I would suggest making it more user friendly. Perhaps just call a function, and have the canvas take care of it. So for instance you can press space and it will generate lightning from point a to point b, until another function is called to stop it.