prev index next 
Making Difficult Objects 
 POV-Ray Tips, 
 Tricks, and Techniques
Lightning, OH MY HEAD! 
 
rip is suffering: I'm trying to render a Tesla Coil (the lightning makers in the old monster flicks ). The coil itself looks fine, but modeling the lightning is causing a serious case of "brain-lock"!! I'd like the lightning to be the major source of light in the scene. 
 
Robert Dawson has a 9-step method:
Here's my method that I used a while back for a similar sort of scene. 

(1) Get FRACTINT if you don't already have it. It's good free stuff like POV.  Start it up and it will draw a Mandelbrot set on your monitor. 
(2) Mosey around the Mandelbrot set till you find a place where the filaments are long and sparklike [the 'skewer' along the negative  x-axis is a good bet, but go off a little to the side] 
(3)Hit the spacebar to generate the corresponding Julia set. This will also be filamentlike and sparkish. If it doesn't look like a spark go back and try again; you'll get the idea soon. 
(4) Adjust the palette so it *really* looks like a spark (bluish-white, fading through lilac to a uniform black. You do this with the palette editor, which is clearly explained by the nice pop-up help menu. 
(5) Now turn those outer 20 or so colors [the black background] white; and keep track of their palette indices (say 1-20 or whatever). 
(6) Save the picture. 
(7) Go back to POV-Ray.  Image_map your picture onto an X-Y plane, setting the first 20 indices (or however many you set first to black, then to white) to 100% transparency. If you like you can also set the next few (the lilac plasma fringes) to partial transparency. 
You might try using a little turbulence in your image_map to make your spark bend in a non-Julia way, hiding its symmetry. 
(8) Give your spark the attributes: 

  diffuse 0 
  ambient 1 

and 

  no_shadow 

so that it won't cast or show shadows. Stick a bunch of point light sources [or a linear light source] in appropriate places to mimic light coming from the spark; this will look quite convincing. 
(9) You now have a spitting, branching, fractal spark, with an invisible background, and light coming from the same place. Scale and rotate it to get the ends in the right place. It's only two-dimensional, but with care nobody will notice that. 
 
 

  1