game engine lightning

lightNing, not lighting, in the bge. i cant find anything about this. ive seen it in cod zombies. my favorite gun, the wunderwaffe, shoots lightning and kills zombies no matter what. its awesome. im kind of aiming for something like it. i have no idea where to start.

i was thinking possibly a set of textured planes (with lightning textures) that take turns appearing really fast or something, but i dont know how to do this.

please help! thanks in advance

You can do it with particles
and this is a lightning storm.

I did lightning using the method you suggest. its quite tedious though. You make a number of planes with different lightning textures on them. If you use photoshop you can download some nice free lightning brushes to make your textures.
Logic block method: Add an add object actuator to each of these that adds the next plane in the sequence for a very short time. then in your main scene when you add the first plane it will add the second just before it ends, which will add the 3rd etc etc. I did mine with about 6 textures ( you can check an example of it on a vid I posted some time back 0:28:

@fayt: I believe they are asking for something that works in the Game Engine in real time, not to render. It would be nice to have a good easily implementable lightning resource for the BGE, I’ll have to check the resource subforum some time to see if there are any there.

If you used a three-dimensional object with the textures on the different faces, you could have it rotate very quickly and it might look realistic, but the other method is probably better. If by “kills zombies no matter what” you mean that the lightning always jumps to them, you could use a track-to actuator (or, more likely, a track-to-nearest-object-with-property-____ script, although I don’t know how to make one), but for jumping from the gun to the zombie, you would have to stretch or shorten the bolt to the right length, and I have no idea how to do that.

So, I’m back from outer space. (Haven’t really poked around here since it was called elysiun(?).org). There’s lots of questions about content, which I find a little silly (but not silly enough to not butt my nose into your busines ^_^).My case … this is art… you want lightning? you put a picture of it in the appropriate place. Bingo, lightning.

The real question: How do you want to orient this picture? intuitive answer (assuming shooting from the fingertips of the protagonist): An animated billboard sprite that is mounted on a Dude (or even just a three demensional transparent scaffolding with animated texture–yes, much better), that–when activated-- tracks-to target and changes length based on a near distance sensor ray thingamgig or coordinate distant equation script? (I am way out of practice! sorry!) … and then after postulating about those things I would enquire about the specifics of that. (Which I apparently need to, badly)

Other possibilities: Do you want it to be persitant and funky like those li’l glass orbs people touch? In that case you might want mess with mesh and bone… or!.. or!.. a vertex shader! yes… a vertex shader, with some pixel shader glow-funk atop.

'just some ideas

lighting1.blend (552 KB)
I made a blend file with a set up. Feel free to deconstruct it. If this works for you and you have questions, feel free to ask.
-Open with Blender 2.57
-Make sure you have Blender Game selected at the top of your screen.
-Make sure your viewport is in Texture mode.
-hit P to start the game engine.
-hit space bar to see lightning in action.
-hit space bar again
-hit it again

thanks everybody!

my question: is there a reason GLSL has never worked for me? at all? i have four versions (if not more? not sure…) of blender and this is my second laptop with blender and it has never worked. never. am i missing something? i can see it in multitexture but its not right.

so i cant really see your work. oh… how hard is it to change a scene to a different shader from GLSL to either textureface or multitexture?

thanks :smiley:

This is one of those questions where there is no right or wrong answer. It’s like asking, “How do I paint a cool picture”. It’s a broad question. It might be best for you to think about what you want the end product to look like. Think in details, and break it down into 3D space.

There are three immediate ways I can think of creating lightning, you could use particles, you could use an animated texture, you could animate some textured planes (with bones or ipo), or a combination of all three. In order to make it look good, you have to put your artistic talent into it though. There is no “make lightning” button. I hope this helps.

Hey TRAITengeneer[B]@TRAITengineer, can you find out what video card you have on your laptop?
Post the info and I’m sure someone can help you.