How to make Lightning bolt and Electricity Effects?

Hi guys,



What are the best ways to implement lightning bolts, beams and electricty effects in JME3?



Obtaining effects like this one would be great: http://www.ramblingsofagamer.com/wp-content/uploads/2010/01/Infamous-Game.jpg



Actually, my doubt is essentially the same as I found here: http://www.ogre3d.org/forums/viewtopic.php?f=2&t=36135





Tks,



Diogo

particle emitters are the easy way to get these effects:

https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:beginner:hello_effects

https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:advanced:particle_emitters

i actually made a rubbish lightning effect the other day



or you can look at shaders

Glow can help with the effect. Bloom and Glow

You will no doubt have to dive into the realm of shaders to get the effect you want.

A simple trick for lightening bolts is to fractally subdivide a line with some random offsets. At a high level:

-take a line

-find its midpoint

-offset the midpoint by some random amount

-repeat with the two halves and a smaller random amount



Then use bloom and glow on it.

1 Like

I´ll try first to make something using particle emitters. It seems to be a good starting point to try it in JME3, although It may not be the most suitable way for this kind of effect.



The techniques I´ve googled up until now are these:



Using GLSL Shaders:

http://blenderartists.org/forum/showthread.php?235244-GLSL-Electricity-Shader



Billboard Chains and Ribbon Trails, among others:

http://www.ogre3d.org/forums/viewtopic.php?f=1&t=56670&start=0



Some procedural way, using Perlin Noise:

http://unity3d.com/support/resources/example-projects/procedural-examples



What do you think about them?

I think the last one is similar to what I described except using perlin noise as the random source. I guess it just depend on what you want to do with it and how you want it animated.



The first one was a 2D effect which I personally find much less interesting.