Procedural Lightning

I made a lightning generator as a small project to help me with learning geometry nodes, here’s the result.

This is my 3rd or 4th iteration of the lightning generator. This version still has a few kinks but I’ve definitely learned a lot, so I’ll probably move onto some other projects now.

For anyone interesting in making one yourself or just curious how I did it, this is the GN setup (yes, it’s a mess :joy:):

The process of making the lightning is fairly simple:

  1. Create a line between two points
  2. Add bends in the line
  3. Add large branches in the direction of the lightning
  4. Add smaller branches
  5. Make it more curvy
  6. Add the small noise
  7. Convert it to mesh geometry (keeping the main bolt the largest and thus brightest)

Process

The material (easiest part of the whole project :rofl:):

This is the generator file, for anyone interested:
Lightning Generator.blend (1.7 MB)

13 Likes

Hey ! That’s cool stuff !

Just a quick thing from looking at the tree, I tend to prefer to separate inputs like so :


Instead of doing A like having a giant input node with wires all across the tree, I prefer to put them where they are needed and remove empty sockets with CTRL+H …

Anyway, there are no hard rules when it comes to tree organisation…
In any case it’s super cool to look a bit behind the scenes !
Keep up the good work !

3 Likes

Thank you!

Your method if using separate group input nodes is so much cleaner! I definitely think I will use that method for future projects! :joy:

1 Like

I featured you on BlenderNation, have a great weekend!

1 Like

Thank you!

1 Like