Light effect filters
Light effects can add more than the usual flare to an image. The filters you find here are valuable accessories in your Gimp utensil kit.
This a simple and well made Flare filter. You type the coordinates in the dialog for example 300/50, which means that the position of your flare will be 300 pixels from the left and 50 pixels from the top in your image. (Note that you can't change the color of the flare, unless you change the parameters in the source code.)
This plug-in is so gigantic, that we're going to discuss what you can do with it in the next ten pages or so. Just kidding, but it's really huge. ;-)
Let's start, press the Selector tab folder, copy the default pattern and name it something appropriate in the name dialog. Then press edit, and a new dialog will pop up - the Gflare editor.
The Gflare editor
Yes, as I said, it's big!
Here we have four tab folders, where you can edit the three foundations that the gflare is based on, and a general view where you can set all possible combinations.
The three key-stones of Gflare are Glow, Rays and Secondary Flares.
Glow is the base foundation - the big fireball in the middle, Rays are the spikes that surround the Glow, and Secondary Flares are the attached small novas in front and behind the central Glow.
These three key-stones make up the final gflare. You can see them as three separate layers, where Glow is on top, Rays in the middle and Secondary Flares is at the bottom. In the General tab folder, you can set the opacity and mode, just like in ordinary layers (more info about Modes in Chapter 16).
Glow settings
Glow has six different parameters:
Radial gradient controls what color, shape and tone the glow will get from center to the edge.
Angular Gradient controls the circular color, shape and tone. If the Rotation option is set to 0, it will start at three o'clock and go counter clockwise. For example, if the Angular gradient fades out to transparency, the glow will also fade out (see fig 1). The Radial and Angular gradients are multiplied (see Modes) and the result is the glow color.
Angular Size Gradient controls the size of the radius. It also starts at three o'clock, and goes counter clockwise. The radius depends on the luminosity of the gradient. If the "color" is black, the radius is 0%, and if the "color" is white, the radius is 100%. So, if the gradient goes from white to black, the radius will diminish as you move.
Size controls the size in %. Rotation controls where the Angular Size Gradient starts in deg. With Hue Rotation you can control the color of the whole glow. To understand the HUE color circle, read Chapter 12. Note, the gradients starting with a "%", are internal gradients for the editor, the rest comes from the gradient directories. You can add a gradient even when you're inside the editor. To do so, press Rescan Gradients to make it available.
Rays
Rays: Has the same controls as Glow plus # of Spikes and Spike Thickness.
# of Spikes controls the amount of spikes, but this is not the whole truth. Technically, it determines how dense or sparse the "spikeflower" will be.
Second Flares
The Secondary Flares have the same parameters as Glow plus two additional controls: Shape of Second Flares and Random Seed.
You can control the shape of the flares by choosing circular or polygonal. You can choose how many sides you want for your polygon, but if you choose a value of 30 or more, it will be the same as Circle.
Random seed controls how many flares there will be and where they'll be placed. If you set random seed to "-1" you will use the current time as seed value. This means that you will get a random number and location of your flares, each time you use the gflare-pattern.
Back to the main window
Hopefully, you now have a gflare-pattern which you can use, so let's see what we can do with it in the main dialog. Just press OK, and then press the Setting tab folder. By the way, isn't it wonderful that you can create and save different gflare-patterns and then use them at the appropriate moment, just by choosing them in the Selector tab folder? Just remember to create a gflare directory where your gflare-patterns will be saved and make sure you specify the path in your gimprc file, otherwise it will fail. (see Appendix A)
To place a Gflare, click in the preview window at the place you want to put it, and remember to have Auto update preview checked, otherwise you won't see what you are doing. (You can also type the coordinates in the X and Y fields).
- Radius controls the size of the Gflare.
- Rotation is the angle of the Gflare, and it corresponds to the angle of the gflare key-stones.
- With Hue Rotation you can control the color of a Gflare.
- Vector angle controls the direction of the Secondary flares in degrees.
- Vector Length controls the length of the Secondary flares.
- For a explanation of Adaptive Supersampling, see the Blend tool in Chapter 7. Basically, it makes your gradients more smooth when they go from one color to another.
If you want to try some "real" lighting effects like lighting up a wall with a spotlight, this is the filter to use. The main interface
In the main interface you'll find a preview window and a tab folder for Options, Light and Material.
To look at what you're doing, you must first press the Preview button.There's no auto-preview because that would slow things down. Every time you do something with this filter, like changing a parameter, you need to press Preview to get a grip of what's happening (don't forget this). You can also zoom the preview by pressing + or -.
Options
Use bump mapping This button turns on the bump map function which will add a 3D effect to the image. When you enable bump map a new tab folder will pop up.
Use environment mapping This option will pop up a new tab folder where you choose the image to "steal" the environment from.
Transparent background If you have selected the bumpmap option, you can make your image transparent where the bump height is zero (bump height is zero in all black areas in the bump map).
Create new image With this option enabled, all changes will appear in a new image instead of the original one. This is nice, since you don't always want to alter the original image.
High preview quality This option is nice, but it slows down the filter. Use it when you have made all changes and want to take a final look at your work before you apply the filter.
Antialiasing Enables you to turn antialiasing on or off. We recommend using it, otherwise the images will look very jagged and ugly. Depth refers to the amount of antialiasing, the higher the value, the better the antialiasing, but it will also be conceivably slower. Threshold determines the limit of antialiasing, the process is interrupted when the difference between pixels is lower than the value in the input field.
Light
Position for point light
There are three coordinates for controlling light position; X,Y and Z.
The X-coordinate moves horizontally from -0.5 to 1.5, where -0.5 is the left-hand position, and 1.5 is the right-hand one.
The same goes for the vertical Y-coordinate; -0.5 is at the top and 1.5 is at the bottom.
Z is the depth of the light, where 0 would be the flat surface of the computer monitor. There is no upper limit for this coordinate, there are no limits for X and Y either - the values are only recommendations from our side.
Materials
Specular is the amount of light glossy or metallic parts of the image will reflect, (0.4 -> 0.6).
Highlight refers to how glossy/dull the overall impression of your image should be. Higher values will make the image highlights more focused, and lower values will make it lighter, and more unfocused in the highlight parts. (15 -> 50) but around (20 -> 30)is best most of the time.
Bumpmapping
Bump map is similar to the bump map filter in Chapter 32 so it's wise to check that out before you start. You can only use grayscale images as bump maps, so if you want to bump map against the original image, you have to duplicate it and change it to grayscale mode in the image menu.
You can set the bump curve to Linear, Logaritmic, Sinusoidal or Spherical. Look at the curves in the bump map filter to appreciate the difference. You can also specify the maximum and minimum height/depth of the bump map.
Environment mapping
If you use environment mapping, you'll get the opportunity to set your object in a setting of your choice. You can choose from all images opened in Gimp, regardless of size and shape. The image you created will look like it's inside a sphere, and the inner surface of this sphere is covered with the distorted environment image. Light is reflected from the sphere, and the image inside will reflect the environment mapping.
A simple tutorial
Thanks to Tom Bech, the creator of Lighting effects
Create a new grayscale image (256x256) with a black background. Bring up the text tool and type a 200 pixel "G" with the Utopia font. Place the white letter in the middle of the grayscale image.
Create a new RGB image (256x256). Bring up the Blend tool and select to blend with a custom gradient from the Gradient Editor. Open the Gradient Editor and choose German Flag Smooth (if you haven't changed the settings in gimprc the German Flag Smooth is the default gradient). Apply a linear gradient from the left to the right in the RGB image.
Bring up the Lighting Effects filter from the RGB image. Check Use bump mapping and Use environment mapping in the Options tab folder and press Preview. You should now have a nice bump mapped and highlighted G. If there are other opened images in your Gimp session, first make sure that you use the RGB image as environment map and the grayscale image as bump map.
Check Transparent background. You will now see your G floating in a transparent surrounding.
Uncheck the environment map-
ping, press Preview and look at
the difference.Now, bring up the Alien Map filter under Filters/Color from the RGB image. Apply the default values, check Use environment mapping and press Preview in the Lighting Effects dialog, and you'll get a brand new color gradient.
A great Gimp feature is that the plug-in will be updated as you change the image. This goes for all Gimp plug-ins.
Try different curve settings:
Test different types of light sources and light colors (below to the right):
Test different kinds of material reflections and watch the difference, here with Directional light (just remember to press Preview).
With this tool you create sparkles, or get a frosty, glittery feeling to an object. Sparkle selects the brightest point in your picture and puts a sparkle there. This behavior makes it very hard to predict where the sparkles will go. To use it effectively, try it in a small selection first, and you will get more control over where the sparkle will end up. The best way is generally to use a transparent layer (or a black layer + screen mode) where you put tiny white spots. The sparkles will only appear where the spots are. Parameters
- The Luminance parameter controls the amount, or density of sparkles. A low value will produce sparkles only at very bright parts of your image.
- Flare Intensity refers to the light intensity of the stars.
- Spike length controls how long the star spikes will be.
- Spike points tells you how many spikes you will get - 1 spike point will get you 2 spikes, 2 will get you 4 spikes and so on.
- Spike angle is the angle of the basic spike (1 spike point), and if it's set to zero you will get a horizontal spike, 90 will get you a vertical spike, and so on.
This plug-in creates a big shiny super nova in your image. The R,G and B slides determine the color of the supernova. You specify the color just like in the color selection dialog. The problem is that you can't see what the color looks like, until you apply the plug-in. We suggest that you open the color dialog and choose a color there. When you're happy with the color, type those RGB values in the nova dialog). Radius is the radius of the inner part of the nova (the star part). Spokes determine how many spokes the nova will get. You place the nova with the cursor grid in the preview image (you can also type the coordinates in the X and Y input fields).
The Gimp User Manual
Last modified: 19 May 1998