Join Mordy Golding for an in-depth discussion in this video What are vector graphics?, part of Illustrator CS4 Essential Training.
Before we go any further let's take a moment to really understand what a vector graphic is. Now, the term vector is tossed around a lot especially in the world of graphics and not everyone has a core understanding of what that means and again, the more that you know about how Illustrator works, the better you can take advantage of its features and functionality later on. Now when we talk about vectors, we are usually comparing it to something else called pixel-based graphics. So let's get those terms down from in here. We have something called pixel-based or raster-based images. Sometimes they are also called bitmaps. Those are the kinds of graphics that a program say like Photoshop creates.
Then again, you have vector graphics or object-based graphics. Those are the kind of graphics that Illustrator creates. So let's see exactly what that means. I'm using a file here called vector_graphics.ai. If you have access to the exercise files, you'll find it there in Chapter 1. What I'm going to do is I'm going to go to my Layers panel here and turn on this first layer called Grid. So let's imagine just a sheet of graph paper for a moment. You have a whole bunch of basically these little squares, and if you think about it in mathematical terms, and I know I'm not a big math person, I don't like talking about math, but that's the core understanding of what these graphics are and that we are doing with computers here.
So basically imagine you have the sheet of graph paper and each square represents a little dot that you can color in. Now imagine you had a bunch of magic markers and you wanted to draw some kind of a picture, and the rules of the game are that you have to fill in each particular square on that grid completely with only one color. You can't have two colors within the same box and you also can't have a box that's only half-filled with colors. So every box itself has to have some kind of color attributed to it, and if you looked at it right now I would basically say that every box in that grid is still white. This is the way that Photoshop works, through pixel-based graphics.
A raster, basically, the definition of raster would be number of boxes width, and number of boxes height. So basically you can see I have a whole range of boxes from left to right here and a whole bunch of range of boxes from top to bottom. Now going ahead and coloring each of these in, I can then create a graphic. Now I'm going to go over here to where it says raster. I'm going to turn on the raster layer. So this is basically how you might go about creating a graphic or a raster image let's say inside of Photoshop for example. I'm exaggerating these pixels here, but basically at the core part of how Photoshop works, you have a grid and each of those elements or those dots inside of that grid, which we refer to as pixels, is filled with a color. And again, like we said before, you can't have a pixel that is half filled or that contains more than one color.
A pixel can only contain one color. Now as you see right now, I have these boxes that are filled in black. These are filled white and these are filled with this orange color, and I'm trying to create an image of maybe a surfboard. Doesn't look that great, but that's because this particular image here has what we call a low resolution. Resolution refers to basically the number of squares that you have in your grid. So you may have heard, let's say for example, digital camera's have something called megapixels. How many megapixels? 5 megapixels, 10 megapixels, so on and so forth. Well, basically a pixel is the smallest dot or size of a square that you can fill in with a color. Megapixels refer to the thousands or millions of pixels basically that you have in a particular image.
Now obviously, if I cram a whole bunch of pixels into an image, these boxes start to get smaller and smaller. So that would allow me to have more and more detail in my image. Now if I would for example have a digital camera that had a resolution of 100x100 for example or something like that, you would get very, very big blocky squares that I'm seeing right here. Now if you have an expensive camera that has many megapixels, then of course those pixels are so tiny that the human eye doesn't really pick up on them and therefore, it appears if it's a regular photograph that has all those continuous tone, but really down at the bottom of the core of that are each of these pixels. And the reason why that's important to us as designers or people who use graphics is that when you start to enlarge those photographs, then those pixels start to come into view.
You may have noticed that when you're using a program like Photoshop,and you have an image, that image maybe set at a certain resolution. It may look great at the resolution that it was created at, but if you want to enlarge their graphic, then these boxes start to become visible. Just for example, if I zoom out for a second here you might see that that particular piece of artwork starts to look a little bit more smoother, and again it's a very low resolution, just exaggerated. Imagine that little message on the cereal boxes that says "Enlarged to Show a Texture," right? They just want you to be able to understand and see what this particular raster image is. But if I zoom in really close as I get bigger, basically when you enlarge a Photoshop file, it's not adding more pixels, it's basically taking those pixels and just making those pixels bigger and bigger. So now the squares just get bigger and I see them. So let's contrast this now with vector graphics.
So I'm going to turn off the Raster layer here in my Layers panel. I'm going to turn on the Vector layer. So now what I'm seeing here is the way that vectors work. Vectors are all based with math. I'm taking that exact same grid. I'm taking that coordinate system basically. I have X number of boxes, X number of boxes, but instead of actually having to fill in each of these individual pixels, what I'm doing is I'm plotting anchor points and these boxes that I have right here are the areas where you might see those to your anchor points. And those anchor points define the area where that shape is going to be and you have basically a path that gets drawn through those particular anchor points.
We'll talk more about how you create those paths and the settings for what makes them curve and how much do they curve and when it's a straight line, we'll deal with that later, but for now, it's important to understand the core concept that these dots that I have right here are anchor points that are basically points plotted on a grid. And you took Geometry in school, you know that when you have let's say a graph, you can plot a certain point and that point has a coordinate. For example, if you have an X and a Y axis that this particular point may have a specific coordinate of X-20 and Y-35 ,or something like that.
Now the reason why that's important is that if I decide now that I want to enlarge or scale this particular graphic, what Illustrator something does is that it takes that math and it just enlarges that particular image or those anchor points and it re-plots them and it recalculates using math where those belong on a grid. So you can basically take any graphic that you create inside of Illustrator, and you can scale it to any size, that's whatever I mean you could take, is the size of literally a postage stamp and enlarge it to be the size to fit onto the size of a blimp, and you have no loss in detail whatsoever. There is no blocking and there is no chunks; there are no pixels that come into play here.
One other benefit of working with vector images is that when it comes time to actually saving your file, in general, vector graphics tend to be smaller in file size, or I guess you can say, more easier to deal with and that's again because of how these files are saved. You can think about it, the way that Illustrator saves this file from mathematical standpoint, it just remembers the coordinates of this anchor point, this anchor point, this anchor point, this anchor point, and the two attributes, which are what we call the Stroke color and the Fill color, and we'll talk about that shortly. But for now, basically that's all that a particular file for Illustrator needs to be calculated by. A Photoshop document, however, needs to take account basically at every single pixel that exists in the file, whether or not it's painted or not. I mean, again, this would be white and let's go back to the raster image for a second here.
With Photoshop would need to do is memorize, okay, pixel number one is white, pixel number two is white, pixel number three is white, pixel number four is white, down the line throughout the whole particular image, and obviously if you think about images that have megapixels, remember? So many more pixels in the file that it has to keep tabs on what each of those particular pixels are colored. That's when a Photoshop file start to grow in size and they get to be hundreds of megabytes or even gigabytes in size. So finally, I'm just going back to the vector graphic here for a minute and I'll turn off the raster layer here. Another name for vector graphics is something called object-based graphics. And again, that's simply because of the way that Illustrator works. Because this is defined as a shape by these anchor points in this particular path here, it's not like I just have a whole bunch of pixels that live in the same area. If I click on this object right now, I see that the entire object as a whole gets selected and that's another reason why vector graphics are often referred to as object-based graphics, because I'm not working with a whole bunch of individual pixels; I'm working with an object and that object that I'm working with can have attributes so on and so forth.
So now that we have this core understanding of what a vector graphic is, let's take a look and understand exactly what these paths are, how they are created, how they are stored and the way that I can actually interact with that.
- Making efficient use of the Illustrator interface
- Creating text on a path
- Using the Magic Wand and Lasso selection tools
- Working with a pressure-sensitive tablet
- Applying 3D extrusions and resolves
- Converting images to vectors with Live Trace
- Exporting files for use in Photoshop, Flash, and other applications