gotcha

Author Topic: How To Colour?  (Read 4578 times)

June 28, 2016, 02:33:54 PM
Read 4578 times

fionnabhair

  • Sr. Newbie

  • Offline
  • **

  • 3
Moving away from text for the moment and now I'm trying to draw a tree. And colour it. And... there's got to be an easier way to do this, right?

"Fill" in Inkscape doesn't seem to mean what it means in GIMP, which is a PITA, but okay, so long as there's a way I can work around that. Here's what I've got so far:



I used the Bezier curves tool to draw some paths to create the shapes I wanted to start with. Then plan plan was to fill those shapes with a solid base colour and work from there. But. The fill tool is leaving some irritating white space on my canvass that won't go away, and even the larger white spaces, I can't just click on them and add more colour.

Now, I've tried following this tutorial to fill the gaps, but it's not going so well. Just zooming in doesn't appear to help one bit. I tried growing the fill-colour object, but the result was that the colour was either still not filling all the spaces, or outside the lines. (I'd show you a screenshot, but when I tried to undo all my colouring, I ended up undoing all my lines as well, and had to revert to a previous save when I could not just redo.) I have also tried creating a layer below my lines, using the rectangle shape tool to draw rectangles where I want my colour, and then erase the excess... but the erase tool is quite buggy and at best it didn't do anything, and at worst it erased parts of the lines I had drawn (in a different layer, remember) as well as the bits of rectangle.

So: How do I draw, and colour? The basic shapes Inkscape provides aren't the shapes I want, and creating my own shapes by drawing paths won't let me later colour inside those lines, and that's what I need Inkscape to do. Please tell me there's a simple way to do this sort of thing.

June 29, 2016, 08:02:34 AM
Reply #1

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Yes, vector graphics is different from raster graphics (GIMP)!

Arguably (I guess) the most basic part of vector graphics is the path.  (Or maybe some might say the node is even more basic?)  When the path is closed, you can use the traditional way of filling, which is to select the path, then either click a color from the palette at the bottom of the canvas, or use Object menu > Fill and Stroke dialog, where you can edit or create unique colors.

The Paint Bucket tool was added to Inkscape, to make it seem more like raster graphics.  But as you've learned, wedging a raster tool into vector graphics sometimes seems to cause more headaches than it solves.  (The Eraser tool is much the same story, by the way.  The more "vector way" to erase something is to edit the path, or perhaps use the path operations (booleans), such as Difference.)

For a little more technical explanation.  Raster graphics means that the color in an image is applied to the tiny pixels that make up the computer screen's display.  Each tiny pixel has it's own unique color, which all put together, creates the image you see.  When  you color something in GIMP, you're changing the color of the pixels.  (If you zoom in far enough on a raster image, you can actually see the pixels!) 

Vector graphics doesn't use the screen pixels at all.  Paths are defined by angles and length, and a fill can only be applied to a closed path (or the closed part of the path).  I tend to think of vector elements (paths, objects, groups, clones, etc.) as floating above the pixels, although that's technically probably not correct.  When you color something in vector graphics, you are giving a fill to a closed path.  The Paint Bucket tool actually creates is own, new, closed path!  But because Inkscape doesn't look at the pixels, it has to guess about the boundaries of the closed area it's trying to fill.  So that's why the Grow/Shrink option was created, to help Inkscape guess a little better.

Once you learn how to use the native vector tools, things will go easier.  So what you need to do is select the path which is the outline for the tree trunk.  Either select it with the Node tool, or switch over to the Node tool after you select it.  Then you will be able to "fine tune" the path, and make sure all open ends of the path are closed.  Once it's closed, you can click on a color in the palette to fill, or create a unique color using the Fill and Stroke dialog.

Ways to close a path (using the Node tool):

-- Select 2 end nodes, and click "Join selected nodes" button on the Node tool control bar.  Looks like  :jsn:  (this brings both nodes together, if they aren't already on top of each other, and puts the new resulting single node precisely between the 2 original end nodes))

-- Select 2 end nodes and click "Join selected end nodes with a new segment" button.  Looks like  :jns:  (This joins the 2 end nodes by putting a new path segment between them.  So the nodes never move, this way.)

Or if you start out with one of the shape tools (Rectangle, Ellipse, Star/Polygon) then  you can use Path menu > Object to Path, and the resulting path is automatically closed.

Or finally, when you're drawing a new path, with either Pen/Bezier or Pencil/Freehand tool, here's how to close a path while you're drawing it.  Have you noticed that there's a tiny square at the beginning and end of the path, whenever the Pen or Pencil tool is enabled (and the path is selected)?  Let's say you're drawing a circular path.  You click, click, click around, setting however many nodes you want.  When you come back around to the starting place, if you place the mouse pointer inside that tiny square (it turns red, when the mouse is in the right place, if you  have really good vision) and click once, that will end the path, and close it at the same time.

I hope this helps you understand vector graphics a little more.  One thing the whole Inkscape community needs is a nice concise "infographic" to explain the difference between raster and vector.  I'm not a very good artist (mostly I just enjoy the creative process) but I'm becoming so frustrated, I might have to try and draw something myself.  But here are the best short explanations I know: 

http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Introduction-VectorGraphics.html
http://goinkscape.com/inkscape-vs-gimp-a-vector-and-raster-comparison/

I hope this helps.  If you have any questions, just ask  :)
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann