{"id":301,"date":"2011-04-13T12:48:47","date_gmt":"2011-04-13T12:48:47","guid":{"rendered":"http:\/\/www.funkboxing.com\/wordpress\/?p=301"},"modified":"2021-01-03T18:14:13","modified_gmt":"2021-01-03T18:14:13","slug":"blender-laplachian-lightning","status":"publish","type":"post","link":"http:\/\/funkboxing.com\/wordpress\/?p=301","title":{"rendered":"Blender Laplacian Lightning"},"content":{"rendered":"<p style=\"text-align: center;\"><a href=\"http:\/\/projects.blender.org\/tracker\/index.php?func=detail&amp;aid=27189&amp;group_id=153&amp;atid=467\" target=\"_blank\" rel=\"noopener noreferrer\">Blender.org Tracker<\/a> &#8211;\u00a0 <a href=\"http:\/\/blenderartists.org\/forum\/showthread.php?214942-Blender-Lightning-Generator-Addon\" target=\"_blank\" rel=\"noopener noreferrer\">BA Thread<\/a> &#8211;\u00a0 <a href=\"http:\/\/www.blendernation.com\/2011\/06\/27\/laplacian-lightning-generator-blender-2-5\/\" target=\"_blank\" rel=\"noopener noreferrer\">BlenderNation Article<\/a><\/p>\n<p>UPDATE &#8211; 01.05.13 &#8211; v0.2.7<br \/>\nFIXES:<br \/>\n-Fixed the issue that prevented the addon from loading in Blender 2.63+. Also fixed a problem with the makeMeshCubes function.<\/p>\n<p>UPDATE &#8211; 02.14.13 &#8211; v0.2.6<br \/>\nISSUES:<br \/>\n-An API change has made the addon not load. It has something to do bpy.scene.context. I&#8217;ll look into it when I have a chance. Fortunately the script will still run as a regular script. If you want to use it, just use the .blend file below or just load it in the text editor and hit run.<\/p>\n<p>UPDATE &#8211; 06.20.11 &#8211; v0.2.6<br \/>\nFIXES:<br \/>\n-Moderate speedup.<br \/>\n-Cubes output scale\/loc corrected.<br \/>\n-Tooltips added.<br \/>\nNEW FEATURES:<br \/>\n-Container insulators: Arbitrary mesh shapes can be used as insulator\/cloud objects. Still quite imperfect though. May slow down generation. Best for simple containers; bowl, cup, bottle. A spiral pipe would not work well. Must have rot=0, scale=1, and origin set to geometry.<br \/>\n-Mesh origin objects:. If the origin obj is a mesh, vert locations will be used as initial charges. However this will disable multi-mesh output. May slow down generation.<\/p>\n<p><a href=\"http:\/\/www.funkboxing.com\/wordpress\/wp-content\/uploads\/2011\/04\/FSLGv026-comboHIRES.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-large wp-image-737\" title=\"FSLGv026-comboHIRES\" src=\"http:\/\/www.funkboxing.com\/wordpress\/wp-content\/uploads\/2011\/04\/FSLGv026-comboHIRES-758x1024.jpg\" alt=\"\" width=\"695\" height=\"938\" \/><\/a><\/p>\n<p>UPDATE &#8211; 05.08.11 &#8211; v.0.2.5<br \/>\nNEW STUFF:<br \/>\n-added &#8216;single mesh&#8217; output option. use this mesh with build modifier to &#8216;grow&#8217; lightning in animation.<br \/>\n<iframe loading=\"lazy\" src=\"http:\/\/www.youtube.com\/embed\/bTLXNfBcbjI\" width=\"480\" height=\"390\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>This is a partial implementation of the algorithm presented in the paper <a href=\"http:\/\/gamma.cs.unc.edu\/FRAC\/\">&#8216;Fast Simulation of Laplacian Growth&#8217;<\/a><br \/>\nand some concepts borrowed from <a href=\"http:\/\/gamma.cs.unc.edu\/FAST_LIGHTNING\/ \">Fast Animation of Lightning Using an Adaptive Mesh<\/a><\/p>\n<p>It currently uses simplified spherical boundary conditions and calculates potential at candidate growth sites using FSLG-Eqn. 9<br \/>\nTo be properly influenced by an environment map of charges and<br \/>\nallow artistic manipulation of growth patterns I will need to<br \/>\nimplement FSLG-Eqn. 15, which I don&#8217;t fully understand yet.<\/p>\n<p>As compared to the simulation times reported in the paper, there is no comparison. This is not fast. They report 2000 particles in 6 seconds. So far 1000 particles will take a few minutes.<\/p>\n<p>A good chunk of the reason for the slowness is the weighted random choice function. Another big reason is it&#8217;s python not c. Probably the biggest reason is that I&#8217;m a hack and I barely cobbled this together so it&#8217;ll take time to get it optimized.<\/p>\n<p>Anyway I think it&#8217;s better than making lightning by hand, or at least might give you a good base mesh to mess with. So it might be useful to someone. I&#8217;ll keep working on it.<\/p>\n<p>DIRECTIONS:<br \/>\nyou can use the example .blend file or load as an addon.<\/p>\n<p>BLEND FILE:<br \/>\n-Download <a href=\"http:\/\/www.funkboxing.com\/wordpress\/wp-content\/blendfiles\/FSLG_EXAMPLEv026.blend\">.blend*<\/a> file, instructions in file. *right-click, save-as [works with Blender 2.5 &#8211; 2.62]<br \/>\n-Download\u00a0<a href=\"http:\/\/www.funkboxing.com\/wordpress\/wp-content\/blendfiles\/FSLG_EXAMPLEv027.blend\">.blend*<\/a>\u00a0file, instructions in file. *right-click, save-as [works with Blender 2.63+]<\/p>\n<p>ADDON:<br \/>\n-Download script (<a href=\"http:\/\/www.funkboxing.com\/wordpress\/wp-content\/blendfiles\/object_laplace_lightningv026.rar\">object_laplace_lightningv026.rar<\/a>) [this version of the addon only works with Blender 2.5 &#8211; 2.62]<br \/>\n-Download script (<a href=\"http:\/\/www.funkboxing.com\/wordpress\/wp-content\/blendfiles\/object_laplace_lightningv027.zip\">object_laplace_lightningv027.zip<\/a>) [this version of the addon works with Blender 2.63+]<br \/>\n-Uncompress, Place in in Blender &#8216;addons&#8217; folder:<br \/>\nBlender install folder\/2.6x\/scripts\/addons\/<br \/>\n-Enable addon<br \/>\nUI will be in &gt;View3D&gt;Tool Shelf&gt;Laplacian Lightning (object mode)<\/p>\n<p>-Hit &#8216;generate&#8217; &#8211; try w\/ defaults<\/p>\n<p>-Play with the settings, try again.<\/p>\n<p>iterations &#8211; how many times to run loop (number of particles) grid unit size &#8211; size of a &#8216;cell&#8217; in BU<br \/>\nstraighness &#8211; user variable to control branchiness\/straighness<br \/>\nstart charge &#8211; origin point<br \/>\nuse ground charge plane &#8211; hacky method of simulating lightning strike. Terminate loop if lightning hits &#8216;ground&#8217;.<br \/>\nground Z co &#8211; z coordinate of ground plane<br \/>\nground charge &#8211; charge of ground plane<br \/>\nmesh, cube, voxel &#8211; visualization outputs<br \/>\nmesh &#8211; creates vert\/edge mesh from data<br \/>\ncube &#8211; creates cube objects from data<br \/>\nvoxel &#8211; creates a 64x64x64 voxel data file from data outputs to &#8216;FSLGvoxels.raw&#8217; (experimental)<\/p>\n<p>Hope you enjoy. Send me a link to some renders if you use it! Especially if you get &gt;10,000 particles.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Blender.org Tracker &#8211;\u00a0 BA Thread &#8211;\u00a0 BlenderNation Article UPDATE &#8211; 01.05.13 &#8211; v0.2.7 FIXES: -Fixed the issue that prevented the addon from loading in Blender 2.63+. Also fixed a problem with the makeMeshCubes function. UPDATE &#8211; 02.14.13 &#8211; v0.2.6 ISSUES: -An API change has made the addon not load. It has something to do bpy.scene.context. <a href='http:\/\/funkboxing.com\/wordpress\/?p=301' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3,5,47],"tags":[28],"_links":{"self":[{"href":"http:\/\/funkboxing.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/301"}],"collection":[{"href":"http:\/\/funkboxing.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/funkboxing.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/funkboxing.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/funkboxing.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=301"}],"version-history":[{"count":10,"href":"http:\/\/funkboxing.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/301\/revisions"}],"predecessor-version":[{"id":2631,"href":"http:\/\/funkboxing.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/301\/revisions\/2631"}],"wp:attachment":[{"href":"http:\/\/funkboxing.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=301"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/funkboxing.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=301"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/funkboxing.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=301"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}