This time, we will learn the procedure for creating a lightning bolt sprite from the GIMP. Lightning bolts find good use in 3D game SFX, like zapping an item or enemy from an electric weapon, denoting tension in sci-fi scenarios, or just a natural lightning bolt to enhance the environmental mood.
Level : Newbie to Intermediate
Launch the GIMP and create a new 256x768 image. Go to Filters>>Render>>Solid Noise. In the pop-up, enter the values as shown in Figure1 or, choose one of your own by hitting 'New Seed' button. Finally, press the OK button to render the noise.
Image 1 Solid Noise pop-up
Create a new layer over the current layer. Go to the Tool Box and select the gradient tool and in the Tool Options, select the shape of the gradient as Bi-linear and enable ‘Adaptive-Supersampling’. Create a new layer over the noise layer and draw a small gradient over the new layer (see Figure3). One thing to remember here is that you should try to draw the gradient over the part of the solid noise which contains mostly white and it’s surrounding areas are darker. That is where you get good contrast.
Image 2 Gradient settings
Image 3 Drawn Gradient
Go to the ‘Layers’ dialog box and change the layer-mode of the gradient layer to ‘Difference’. Immediately, you can see the formation of the bolt. Now go to Image>>Flatten Image to flatten all the layers into one single layer. Now go to Layer>>Color>>Invert to invert the color of the layer.
Image 4 Layers Dialog
What you get is a streaque of two lightning bolts, but these bolts are hardly usable as they are virtually glued together. Go to Layer>>Color>>Levels. This will bring up the Level adjust dialog box. Drag the input levels mid-pointer towards the right. While you do this, you can alos see the formation of two clear lightning bolts. Adjust the amount of sharpness you want then, press ‘OK’.
Image 5 Lightning bolts
To separate the lightning bolts as an Alpha channel, you will need to convert the blak color to alpha. To do that, go to Layers>>Transparency>>Color to Alpha. In the Color to Alpha dialog, clik the ‘From’ button and choose a blak color then press ‘OK’. You now have an alpha-based versión of the lightning bolt. The last thing to do is save it in a file format that supports transparency, like PNG or TGA.
Image 6 Level adjustment
Image 7 Rendered lightning bolts
Although this method only generates pretty straight lightning bolts, you can compliment it with the noise generation plugins for the GIMP called ‘Plasma2’ etc. This will allow you to have random noise generation which can result in more varied lightning bolts. I hope this has provided you with a nice and easy way to create lightning bolts.
Image 8 Lightning bolts with alpha channel