I was playing with gradients in Gimp and Inkscape and in this process, I came to know about a few things which I think would be apt if I share here (even though many may find it redundant or silly ;p ).
Here is a small account of basics about Gradient, how to create and share gradients.
Gradient, as you may know is gradual change or blending of color. As you will see in nature the colors of objects are not constant all over even though their skin is of same color. Just for example look at the nearest wall(if its painted with single color ), does the shade appear to vary ? Either due to the lighting or shape, the color of the object will appear to vary. That is where a simple gradient comes into picture. When you are imitating or illustrating objects it is quite necessary to use gradients to give it a realistic touch.
(Black to white Gradient)
Now talking about the gradient and how is it represented in softwares like Gimp and Inkscape,

These are the basic features of a gradient irrespective of software:
1) Stops or stoppoints(endpoint): a gradient has atleast 2 stoppoints. Each stoppoint has properties of color,opacity(represented in terms of RGBA (Red,Green,Blue,Alpha) and position.
2) The region between 2 stoppoints is called a segment. The color from left stoppoint blends into right stoppoint within this segment. Blending function(linear,curved,sinusoidal, etc.,) is a function which defines how the colors blend into each other within a segment. There is also a midpoint which defines the middle point for the blending process.

The above image shows how the blending function can make a difference.
A simple gradient will have 2 stoppoints and one segment, complex gradients may have more than one segments.
The way a gradient is represented in Gimp and Inkscape is different. Gimp defines gradient keeping segments in mind, Inkscape defines based on stoppoints.
So, now you know what all constitutes a gradient,Creating a gradient becomes a simple task.
Creating gradient with Gimp:

Press CTRL+G with Gimp open to launch the gradient dialog. Click on the ‘new gradient’ button to launch the gradient editor.

Right click on the segment brings up the menu for editing the gradient. The options there are quite self descriptive which you can try for yourself(some description is available here).
The gradient will be saved in the gradient folder of your Gimp work folder(check for the exact location in the preferences dialog box) as a .ggr file.
If you are wondering what is a .ggr file you can just open it with your favorite text editor to see what it is made up of. Gimp GGR format explains the format of GGR file. Sometimes you may find it difficult to set the position of some endpoint using the gradient editor, in that case editing the .ggr file with a text editor will come handy.
In Inkscape, the gradient editor does not use midpoint between stoppoints and allows only linear blending function.
Creating gradient with Inkscape:

Draw any simple object (a rectangle would be fine), In the fill & stroke dialog box select linear gradient for fill.Now click on the edit button and your gradient editor appears. As I said earlier Inkscape uses endpoints to define a gradient, creating a gradient in Inkscape is nothing but adding stops and defining values of RGBA and position(offset) for that stops.
If you have appetite for more of gradients, you should try SpectraG, an opensource gradient editing software written by Rosros in Python. It represents gradients with formulas, so you need a understanding of little math but it appears to be a very interesting and immersing gradient editor. It allows importing and saving to .ggr format among various others.
(a snapshot of spectraG)Gradients are represented by different softwares in different formats. Gimp saves gradients as .ggr files, Adobe’s products use .ai, Inkscape saves within .svg file itself.
Importing gradients between Gimp & Inkscape is simple.
To import Inkscape gradient into Gimp, just place the SVG file containing the gradient into the gimp gradients folder and refresh the Gradient dialog. The gradients will be imported and you can see them in the gradients dialog.
To import Gimp gradient into Inkscape, you just need to drag and drop the gradients into Inkscape.Now you can just go on filling objects with gradient.
[Inkscape will throw an error while importing some .ggr files (files with CRLF end-of-file). What you can do to import is save it in unix format using a text editor like notepad++. and then import].
There is huge collection of gradients at Gradients Central that you can download and use.
Illustrating rainbow with Tiled clones tool in Inkscape.
180 comments Posted by Vinay Raikar at 12:55 PMIllustrating Rainbow with Clone tool in Inkscape.
Rainbow and clouds.. by ~rockraikar on deviantART
After some gap, I'm back again. This post is about drawing a rainbow. There are actually two ways you can do it. One is by creating a rainbow color gradient and fill a semi-circle with it. The other is by using the tiled clones tool. Tiled clones happens to be one of the most powerful & interesting tool in Inkscape and here I am trying to draw a rainbow with it..
To start with, select the Spirals tool (F9 key) and draw a semicircle.
Let the settings be:
turns:0.50, divergence:0.00, inner radius:0.00.
Adjust the width, height and stroke width as in the image.
Now select the stroke color as the one with '?' (question mark :paint is undefined) in the stroke paint tab of fill and stroke menu. We need to do this because for changing colors of clones using clone tool it is necessary that the paint is undefined for the object. Now,the arc/semi-circle will be invisible.
Next is the cloning step.
Keeping the arc selected,
Go to edit->clone-->create tiled clones. The following settings needs to be updated:
Symmetry:P1 simple translation.
7 rows and 1 column
Shift: for X all the values are zero. for Y the per row field should be -98.5
Scale: scale X per row is -1.6, scale Y per row is -0.7, all others are zero.
Color: Initial color be red, for per row field change the H value to 13.5. Rest all should be 0.
We wont be using rotation blur & opacity so we can leave them as they are.
Now press create, your rainbow is ready.
Give it a little blur and decrease its opacity.
You have your Rainbow. You can add a few clouds like the ones here. Apply a little blur to these clouds and it will look a bit realistic.
Happy Inkscaping...
Labels: illustration, inkscape, tutorial, vector
Drawing shadows along with objects gives an illustration some amount of reality. I was trying to illustrate shadows and felt like sharing some thoughts that I had. Probably a beginner may find it interesting. Anyways here it is...
To draw a shadow, one needs to be clear about properties of three things:
1) source of light (position, brightness, size)
2) the subject itself which casts the shadow (position, shape & size)
3) the surface on which shadow falls (position, shape & size)
Now how do these properties affect the shadow cast by the subject... ?
These two videos give you a basic idea of how shadow can be drawn and how the properties affect them. A must see... How to draw shadows and Drawing perspective shadows.
Some points to be noted are:
Size of shadow depends on distance between the source of light, object and surface of shadow. The size of the shadow increases as the distance between source of light and object decreases.
The shadow appears blurred if either there are many sources of light or if it is far from the subject.
The position(angle) of the source of light decides in which direction the shadow is cast.
The shape of shadow is also defined by the surface on which shadow is cast. shadow is irregular on irregular surfaces.
The 3 dimensional subject is cast as a two dimensional shadow whose shape is defined by the relative position of subject and source. For example see what objects can cast a square shadow and what shadows a cube can cast ... That would give you an idea.
After getting basic idea about shadow, the next point is how do we illustrate a shadow in Inkscape.
The basic method is duplicate the subject to create the shadow, give it a grey color and decrease its opacity. Then do the transforms like skew, stretch and move. What transforms and how much you need to perform depend on the properties of source of light,subject and surface that you saw earlier.
For 2D image editing softwares, the above idea can give good results for flat or simple sjubects. When the subject is a 2D illustration of a complex 3D object some amout of imagination and manual editing of the nodes of shadows is necessary.
Here is a small how to for illustrating shadow for a human figure. You can apply the technique for other objects also.
1) Draw ellipses using ellipses tool, rotate and arrange them as above to get a human form.
2) To draw the shadow, duplicate the subject (select subject and press ctrl+d)
select all the ellipses and do a path->union.
give it a grey (888888ff) color fill and 75% opacity.
3) Group the ellipses of subject (Ctrl+g)
For time being, place the shadow object above the subject.
Align(ctrl+shift+a, center along vertical, center along horizontal axes) them both so that they overlap each other completely.
4) Angle of source of light:
Click on the shadow layer twice, you will see the handle for skew operation.
Play with the skew operation holding shift key. This will give the angle at which the shadow is formed.
Depending on the position of source of light you can settle for a shadow.

5) Elevation of source of light
Now click on the shadow object once, you can see the squeeze or stretch handle.

play with this handle. this gives the elevation or the height of the source of light.
settle for required elevation.
So now we have a shadow of the object on a flat surface(floor).
What if there is a wall some distance behind the man, would the shadow be the same ?
lets see how to illustrate that.
A) Select the shadow and the wall surface and duplicate them.
Tthen do a path-->intersection. give this new shadow object the same fill and opacity as that of the shadow.
Send the old shadow to bottom (select shadow and press end key)
We need to do a skew to the new shadow as we did earlier for angle of shadow, this time the shadow must be vertical as below.
B) The shadow that you got is not a perfect one, we need to do the stretch operation.
Decrease the opacity of the wall so that you can see the old shadow.
Draw a reference line from the old shadow to the man's head.
Now stretch the new shadow as we had done earlier until it touches the reference line.
Now reset the opacity of wall and delete the reference line.
The final result
Applying the same technique you can illustrate shadows on complex surfaces. Here is an example of shadow on steps.
Labels: basic, illustration, inkscape, shadow, tutorial
Brilliant cut is one of the most popular diamond cuts. It consists of 58 facets, 33 on the crown (topview) and 25 on the pavillion(bottomview). I was thinking of illustrating it and got a pretty decent Diamond. Have a look at it.
A diamond by ~rockraikar on deviantART
I just thought of sharing how to draw this. I have two png files at deviantart.com for top as well as bottom view.
Top view of diamond and Bottom view of diamond show how to draw them.
I haven't written more about filling with gradients there. Its pretty simple. Use a gradient with white & light greyish colors. It would be better if you have reduced the opacity of few colors because if we do an overlapping of these views , you will get a cool diamond as the one here.
I drew a cool Brilliant cut diamond Ring, looks pretty nice.
A diamond ring. by ~rockraikar on deviantART
If you have any doubts then please do mail or comment. You can also subscribe to my rss feed here.
Happy Inkscaping.
Labels: deviantart, diamond, inkscape
I wanted to have a globe with those latitudes & longitudes on it.I was doing it manually earlier by duplicating and resizing, but there's the clone tool to do that easily. Here is a tutorial on how to do a simple globe with latitude/longitude. I have a very bad color sense so you can surely do a better job with colors. :)
Here is what we can have
1) draw a perfect circle (holding ctrl key) with no fill and black stroke.
2) Now we need to do some cloning.
Select the circle and go to edit-->clone-->create tiled clones.
Select 'simple translation' for symmetry and following settings for shift and scale.

3) We will get something like this.Now select them all and go to edit-->clone-->unlink clone (or shift+alt+D)

4) Now draw a straight line from top center to bottom center to get the equator / meridian.
5) Now duplicate this and do object-->rotate 90 degree.We have the latitude & longitudes. Now select these and go to path-->combine.
6) Now lets get back to the original circle give it a radial gradient.And place the latitude/longitude globe over it. ( Use align and distribute tool to center the circles)
7) You can also give a radial gradient to the latitude/longitudes, to get something like this.
8) Now you can write something at the center of the globe with bezier tool using the latitude/longitude as a grid.
9) Now select these letters and move sideways for editing. Give them a color fill and remove the stroke.
10) Do a path--> union of these letters and apply path-->simplify.
11) Give the text some suitable color, do some resizing(decrease height holding shift) and place it over the globe.
Further you can do things like giving the text or the globe a shadow effect etc like the one by heathenx here.

[ Edit: Stumbled upon this youtube video. Its really cool how you can build up on the globe layout... though its pretty tough to draw ]
The whole how-to in PNG format is available at deviantArt here. Happy Inkscaping.
I am fascinated with Bézier curve and playing with it a lot these days. No graphic design software is complete without Bezier curves. The mathematical definitions here seem complicated, but the animations(Constructing Bézier curves in wikipedia) make for such easy understanding.
When working with Inkscape, this tutorial gives you the basic idea of editing bezier curves. Illustrating complex objects needs some mastery of bezier curves.
Here's an understanding my mind has about bezier curves.
Each bezier curve has two end points (p1 and p2) and two control points (c1 and c2).
Control line is line joining control point and corresponding end point(p1,c1 or p2,c2).
The shape of bezier curve depends on the position of control point, that is
a) distance between control point and the corresponding end point (control length).
b) angle made by control line with line joining end points (control angle).
The control line from an end point is tangent to the bezier curve starting from that end point.
A straight line is a bezier curve where control angles are zero.
A complex object can be drawn using multiple bezier curves.
Though control length may seem less important(in deciding the curvature) but when the end points are near, it makes a lot of difference.
Labels: bezier curve, inkscape
Illustrating objects to give it a 3D look requires a few transforms, unions, differences & most importantly the gradient. Here is a simple circle you can draw. The technique used here applies only for basic shapes and that too for particular orientations.
Only 3 objects is all you need to get this cool 3D looking ring.
here are the steps:
step1: Draw an ellipse (let the opacity be around 75% for our visualization)
Duplicate it and scale it to a smaller size holding shift & control.
step2: Duplicate these ellipses and move them out.
Duplicate them once more and shift them vertically up by few pixels(as in image)
step3: Select the two ellipses, duplicate them and move them out.
then do path-->difference
We have our object 1.
step4: Select the two smaller ellipses from the object in step 2, duplicate them and move them out.
Now do path-->difference. (check out which object should be above which one )
We have our object 2.
step5: Select the two larger ellipses from the object in step 2, duplicate them and move them out.
We need to draw a rectangle. Its width same as the width of the ellipse
and height equal to the vertical distance between the ellipses.
Select the lower ellipse and the rectangle and do path-->union. Move this object to bottom.
Select both these objects and apply path-->difference.
We have your object 3.
step6: Now what you need to do is assemble these objects.
Zoom in and arrange them.
step7: Next we need to color them.
for object 1, a plain fill is OK.
for object 2, we need a linear gradient with variation 'dark to light to dark'
for object 3, we need a linear gradient with variation 'light to dark to light'
make the opacity to 100%
PS: when aliging objects, there may be some gaps/white spaces between them.
to hide it, give the object a stroke with the same color/gradient of the fill.
You can do similarly for triangle and square shapes. A representation is here in the PNG & SVG files.
Grouping these objects, you can do cool 3D illustrations like this and many more....
the svg.
For complex objects, and even for simple objects with different orientations, above technique is not suitable.Will try to cover that in next post.
Happy Inkscaping :)