Inkscape Tutorials: Filter Editor

A quick overview of preset filters:
  • Select you objects and click on Filters -- Bevels -- Buttons
  • Filters with ... require a user interface
  • E.g. the filter (Protrusions) Snow crest asks for drift size
  • Using "Live preview" you can experiment with the effect of the inputs
  • Edit filters by clicking on Filters -- Filter Editors
  • Remove applied filters by clicking on Filters -- Remove Filters
  • Deactivate the rendering of the applied filters by clicking on View -- Filters -- No filters
  • Finding the right filter is like finding a needle in a haystack
  • To get a good feeling of the filters make your own summary sheet
The filter editor can be used to modify an existing filter, or to create a filter from scratch.
  • Draw a shape and apply the apparition filter
  • Open the filter editor dialog by clicking on Filters -- Filter Editor
  • We see a list of filters on the left of the dialog
  • We see a list of effects on the right of the dialog
  • Possible inputs to effects include Source Graphic and Alpha, Background Image and Alpha, and the output from a previous effect
  • To add an effect select the effect and click on Add Effect button
  • To remove an effect right click on it and click on Remove
  • Below in the dialog it's possible to modify the effect parameters
  • These effects and their parameters will be discussed in future lessons
  • Change the size of the bounding box using the tab Filter General Settings
Some filter primitives are discussed here:

  • Offset moves the object horizontally and/or vertically
  • Offset is particularly useful in combination with composite or blend
  • Erode makes objects thinner
  • Dilate makes objects fatter
  • Set the radius in the x and/or y direction to set the amount
Displacement map:
  • Displacement map distorts the image according to a map
  • The first input is the object to be distorted
  • The second input is the map
  • Set the degree of distortion with scale
  • The distortion can be defined as the amount of red, green, blue or alpha in the map.
  • The distortion in the x and y directions can be defined separately. (E.g. use red to define the x-distortion and blue to define the y-distortion)
Diffuse and Specular lighting can be used to add lighting and the impression of depth to your illustrations.

Background information:
  • Diffuse objects reflect light in all directions, resulting in matte effect
  • Specular reflection is much more a direct reflection, resulting in a shiny effect
  • Most objects reflect both diffusely and specularly
  • Distant lights result in light rays which are parallel, and the intensity of the light remains constant, no matter how far or close you are to the light source
  • Point lights shine in all directions and the intensity of the light strongly depends on how close or how far you are from the light
  • Spotlights form a cone of light
Drawing a cone as seen from above using diffuse lighting:
  • Draw a circle
  • Add a filter named Lighting and add the effect Diffuse Lighting
  • The Alpha channel defines the depth/height of the 2D object. This is called a height map.
  • Add a circular gradient to the circle
  • Make the center of the circle opaque (peak of the cone)
  • Make the edges of the circle transparent (bottom of the cone)
  • Apply the filter
  • Diffuse color is the color of the light
  • Surface scale scales the height map
  • Constant defines the intensity of the light
  • Choose between distant light, point light and Spot light
  • Add a blur to the filter to remove rendering artifacts
  • Azimuth: defines the direction from which the light shines. 0 = East, 90 = South, 180 = West, 270 = North etc...
  • Elevation: define the direction from which the light shines. 0 = from the horizon, 90 = from straight above, 180 = from the horizon on the other side, 270 = from below
  • Point light coordinates are relative to the top left of the A4 page
  • Spotlight requires the coordinates of the light as well as the coordinates of a point the light spotlight is pointing to
  • The cone angle of the spotlight can also be set
Add specular lighting:
  • Add the effect
  • Add the source graphic as the input for the specular lighting
  • The exponent describes to the extent to which the light is reflected in a specular way
  • A low exponent means the light is reflected in a more diffuse way. A high exponent means the light is reflected in a more specular way, making the object more shiny
  • Combine the specular lighting and the diffuse lighting using blend
In this step-by-step exercise the goal is to create a drop shadow filter in inkscape.
In this video we cover some examples of applications of the displacement map primitive.