Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

well i'm just wondering on the best way to go about create some form of "Lightning" effect to be used in a game, so for example:

-In my game, i would like to have this effect in the menus and in-game in some form of random weather system perhaps.

Just wondering on the methods available? I did read this blog post: http://drilian.com/2009/02/25/lightning-bolts/

And took a-look at the Lightning sample thats around. I like the method placed in the blog post, just really a bit unsure on how to create the vertices from the lightning segments. I would be great if someone could explain that seconded sub-heading (Adding glow) a bit more to me :).

But like i said, i'm really want to know if there's any other ways i could accomplish this?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

Creating quads: http://msdn.microsoft.com/en-us/library/bb464051(v=xnagamestudio.10).aspx. You need only one quad per segment, as in image 9 "lightning vertices" of the linked article you mentioned.

Next, the glow is first created by having a bitmap, a simple circle will do nicely, which blends from hard bright center to soft darker outside, and alpha similarly solid in center and disappearing to edges. Black background works too, depending on shader. A shader with some blend effect smooths things out.

It really is the most impressive lightning effect, doing it with hand-drawn sprites only works if you have a scene for that specific situation.

share|improve this answer
    
Thanks for the answer, exactly what i was looking for :). And yes, i agree, i could easily get my friend to draw a lightning animation of some sorts, but yes, in certain cases it wouldn't look right, and i feel it would really limit the effect (by having the same animation play). But yeah, thanks for the answer :) –  dan369 Jan 28 '12 at 20:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.