Project: Blender Extensions
Tracker: Py Scripts Contrib
Script name: Laplacian Lightning Generator
Wiki page: http://www.funkboxing.com/wordpress/?p=301
SVN Download: https://svn.blender.org/svnroot/bf-extensions/contrib/py/scripts/addons/object_laplace_lightning.py
Uses a variation of DBM (Dielectric Breakdown Model) to simulate Laplacian growth.
Mainly used to create lighting and electric arcs but can also be setup to create other interesting shapes. Currently these arcs are not animated by the script but they can serve as a good starting point for many effects.
copy object_laplace_lightning.py to /<Blender-Install-Folder/2.5x/scripts/addons/
enable addon in user prefs. (Object > Laplacian Lightning)
UI is in View3D > Tool Shelf > Laplacian Lightning (object mode)
press 'create setup objects'
press 'generate lightning'
contains script and material/compositor presets for rendering lighting.
setup mainly involves the placement of the origin and ground/cloud. this defines a starting and ending point for the bolt/arc. insulator object can be placed to restrict growth in area of bounding. settings can be manipulated to tune the look of the bolt.
iterations – maximum number of cells to create (more needed for larger structures)
grid unit size – size of a cell in BU (grid resolution)
straightness – user variable to control branchiness/straightness of bolt (2-10, 6.3 for lighting)
origin object - object to use a starting point
use ground object – object to use a ground plane. loop will terminate if bolt reaches this
ground charge – charge of ground plane
use cloud object – object to use a cloud. loop will terminate if bolt reaches this
ground charge – charge of each cell in cloud
use insulator object - lightning cannot travel through objects bounding box
mesh – create vert/edge mesh from data
cube – create cube objects from data
voxel – create a 64x64x64 voxel data file from data outputs to 'FSLGvoxels.raw'
default output is 'mesh'. this will create 3 meshes, one for main bolt, one for 'secondary' branches, one for 'tips'. in EXAMPLE file these are automatically assigned materials with varying EMIT settings for decent lighting effect. These can also be converted to curves and better material settings chosen.
cube and voxel output are mainly for testing and experimentation.