29
$\begingroup$

I know about the technique of using a displace modifier with an animated displace object on a thin plane, but there are no "branches", no forking in the lightning.

Here is an image from Wikipedia that shows more or less what I'm thinking of:

Electric discharge showing the lightning-like plasma filaments from a Tesla coil.

Is it possible to achieve an 3D animated affect like this?

I have tried a few things, such as the Laplacian lightning generator addon. However, it doesn't support animation and repeatedly generating meshes and then manually animating the visibility is a tedious.

$\endgroup$
  • $\begingroup$ Animated texture or shapekeys. $\endgroup$ – CharlesL Jul 17 '13 at 22:43
  • $\begingroup$ @CharlesL Animated texture might be an option, though a fully 3D solution would be nicer.. as for shapekeys I think you would have the same problem as the displace modifier (trying to create the "branches"). $\endgroup$ – gandalf3 Jul 17 '13 at 22:47
  • 1
    $\begingroup$ What's wrong with just having branches in front of a light source? $\endgroup$ – CharlesL Jul 17 '13 at 23:18
  • 1
    $\begingroup$ @CharlesL I think you might be thinking of Lighting, as in lamps and light sources. I'm talking about Lightning as in electrical arks during a thunderstorm (see this ) ;) If not, then I still don't understand.. (what have trees got to do with anything?) $\endgroup$ – gandalf3 Jul 17 '13 at 23:59
  • 1
    $\begingroup$ Thought we didn't accept tutorial requests here? $\endgroup$ – Greg Zaal Mar 10 '14 at 10:31
22
$\begingroup$

I've experienced such need in my project long time ago. I did it with the help of Laplacian Lightning addon, too. My suggestion is:

  • For the varieties of lightning, you can keep on clicking generate lightning button on the Laplacian Lightning tool panel until getting enough varieties. It will generate random result each time based on the parameter setting.
  • For the "show time", first group them together, then simply add particle to a plane or something to emit that group, set Lifetime to 1. The Number value is quite nice for controlling the frequency.

enter image description here

$\endgroup$
  • $\begingroup$ Brilliant idea with the particles! BTW, the script generates a different result every time (even without tweaking parameters), so that might be unnecessary. $\endgroup$ – gandalf3 Mar 11 '14 at 3:24
  • 1
    $\begingroup$ Ah, nice! Then it would be easier enough! I think I should update it with your tip. We learn from each other. Cheers. :) $\endgroup$ – Leon Cheung Mar 11 '14 at 3:42
  • $\begingroup$ Cool! How do you make the lightning show up in the render? $\endgroup$ – Anson Savage Nov 25 '15 at 23:37
  • $\begingroup$ @AnsonSavage You may consider to convert the lines into curves, then increase depth value. $\endgroup$ – Leon Cheung Dec 1 '15 at 1:32
  • $\begingroup$ @AnsonSavage Thanks but are you sure the link is related to this topic? It is something about Millennials... -_-||| $\endgroup$ – Leon Cheung Aug 14 '18 at 5:31
15
$\begingroup$

A third option is to use the technique I use in my 'Lightning/Electricity Text Effect' tutorial.

In this video I use the 'IvyGen' add-on which is included with blender (but needs to be enabled in the preferences).

By disabling the generating of leaves when using the addon you are able to create forking, randomised curves which when done correctly can have the appearance of lightning.

1 . Add an object that the ivy can grow towards and place the 3D cursor a fair distance away. Ivy will grow from the cursor towards the object.

enter image description here

2 . Shift+A to add a curve, a new option will be there called 'Add Ivy to Mesh'.

3 . Change the settings of the added ivy in the toolbar. Mainly the length, float length, ivy size and Gravity weight need to be changed. Length will determine maximum possible length and float length determines how long branches can float in the air while searching for a mesh to grab onto. Gravity will weigh the branches down. Also disable 'Grow leaves'.

enter image description here

4 . The result is something that with tweaking could be lightning. Increase the bevel depth on the curve settings for a thicker curve. The original mesh (that the lightning was drawn towards) can be deleted.

You will then be able to edit the curve normally and delete any branches which don't look as good or modify existing ones.

enter image description here

I generally just animate the visibility of the lightning on and off for a flickering effect. Though you could animate the bevel start and end values on the curve properties to get the lightning to appear properly, but for many curves, as this creates, that could be tiresome.

Alternatively you could create several lightning elements using the described method and flick between them by animating their visibilities on and off, but to transition from one lightning shape to another is a bit more difficult.

Note: The 'update ivy button' at the top of the ivy panel will need to be pressed to see an update to the ivy after changing settings. Using any other tool, even selecting or scaling another object will cause the ivy settings to disappear.

$\endgroup$
  • 1
    $\begingroup$ Nifty idea. I never thought of using ivy gen for lighting. +1 $\endgroup$ – CharlesL Jul 18 '13 at 13:45
4
$\begingroup$

I would recommend something like Andrew Price did in his lighting tutorial (http://www.blenderguru.com/videos/how-to-create-a-lightning-storm/).

Use an animated gradient to affect the alpha to make the base bolt appear (you use a gradient to only reveal a certain part of the bolt over a few frames). Then you have a separate object containing the branches which appears a frame later.

$\endgroup$
  • $\begingroup$ Works nicely, though I was thinking of something more like in this video on Wikipedia $\endgroup$ – gandalf3 Jul 18 '13 at 4:12
  • $\begingroup$ @gandalf3, what about switching a few different lighting meshes visibility? $\endgroup$ – CharlesL Jul 18 '13 at 13:31
3
$\begingroup$

I would model the base structure (the branches), set up emission strength to vary based on the distance from the root, and add two displacements for the two axis. The main direction could be animated by hand (to have some control), and the small movements with the displacements texture. Here is what I achieved using cloud textures. Note that I was not too patient about making too much braches.

Rendered First Second Node Setup The Modiers

$\endgroup$
3
$\begingroup$

As with Answer #2, you can create a base mesh or curve, either way you will have multiple vertices which in some ways will be important, but try to keep the poly count as low as possible. When in Edit Mode, select any random vertex except for your origin and end points, press [CTRL][H] to place a "hook" to your selected vertex point, selecting the option to link to a new object; repeat for as many hooks as you may desire.

enter image description here

Exit Edit Mod, select ALL of your new Empties and press [CTRL][I] to insert a new keyframe at the start of your lightning animation.

Now, change the screen mode to Animation.

In animation mode, first go to the Dope Sheet in the upper right hand corner (assuming you have the standard layout) and press [A] a couple of times to deselect and then selecting all of the markers. Then press [V] to bring up the handle type menu and change all of the handle types to Vector. This will enable sharp movement of your animation curves.

You will notice that the curve I created has a bit of mass to it, I changed the extrusion a little earlier only to make the line a bit more visible here.

In the 3D window, select a single empty hooked to your mesh or curve.

Below will be a list of points where you may select actions you can perform on the X / Y / Z axis. At this point, look for the orientation of your lightning along whichever axis. Select the corresponding axis on the Graph Editor. You may have to expand out the items from the arrows to get the shot I have shown you.

Press [M] on the keyboard to bring up the left side window and select from it the Modifiers tab. Select Add Modifier and Noise. Adjust the settings to your preference. Repeat on the axis perpendicular to your lightning path.

enter image description here

With all of this said, you will have to model your forks in the mesh or curve yourself, but this will most definitely work to animate that lightning. You can use the same concept to animate the forks as well and give them a more drastic noise level to accomplish the effect.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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