• Working with vector graphics in Photoshop. Vector in Photoshop

    05.04.2014 59959

    It may happen that you suddenly need to convert a regular raster image into a vector format. If you have never dealt with before vector graphics or you have very vague ideas about it, then probably the first thing that comes to your mind is to find a converter program on the Internet, load a raster image into it and, as usual, get the finished result. But it's not that simple.


    You shouldn’t rely on so-called raster-to-vector converters, since not all of them provide desired result. Most of these programs simply convert one format to another, for example, JPG to EPS, but this does not change the essence. And all because a raster and a vector are fundamentally different things and there is no way to convert them directly. If a raster image is a set of dots - pixels, then a vector image is essentially mathematical formula, therefore the approach to it should be completely different.

    By the way, the same EPS can store both vector and raster objects. And yet, there is a way to convert an ordinary picture into a vector, only it is not called conversion, but tracing or vectorization. There are two main types of tracing - manual and automatic. When manually tracing, open in vector editor The raster image is outlined on a new layer and then colored. With automatic vectorization, all these actions are performed by the program.

    For example, in a vector editor Adobe Illustrator A separate option is provided for these purposes. To convert a picture into a vector, open it in the editor, select it with the mouse, and then select in the top menu “Window” -> “Image Trace”.

    This will open a small toolbar where you can select the most suitable template. By default, Illustrator converts the image to black and white vector "silhouette".

    To create the most realistic image, you should choose a preset "High precision photography". Instead, you can also set maximum value for parameter "Color Accuracy" using the slider, while the remaining parameters will be selected automatically. Before starting the vectorization process, make sure that the mode is still set "Color", and the palette "Full tone". Click the button "Trace" and wait for the conversion process to complete.

    Vector drawings are increasingly being used in various printing tools to create beautiful drawings made of wood, plastic, metal, paper and other materials. Today, we will figure out how you can make a vector drawing with your own hands using Photoshop. Having spent very little time, we will get a high-quality vector drawing, and we will be able to use it in the future without any problems.

    How to convert a drawing to vector?

    First of all, it should be noted that only drawings that are depicted on a white background can be converted into vector format. If the background is not white, then first you need to remove everything unnecessary and clear the background.

    1. Using the selection tools, we select only the element that we want to convert into a vector drawing and copy it to new layer, called "figure". Then create another layer and fill it completely with white; this layer can be called “background”. Now, move the “background” layer under the “shape” layer and merge them. We call the resulting image “Base”. Copy the “Base” layer twice and name them “Base_1” and “Base_2”. We turn off their visibility.

    2. Let's begin our operations to convert the drawing into vector format. First of all, apply the “Isohelium” correction to the “Base” layer in order to get the drawing in black and white format. The first correction does not always result in the drawing we need, so we can make several copies of the layers and make corrections with different meanings until we get what we need.

    So we got the most normal effect.

    3. Next, we apply the Diffusion filter to the resulting image to remove jagged edges. The path to enable the filter: “Filter - Stylize - Diffusion” (Filter-Stylize-Difuse). In the window that opens, select “Anisotropic”.

    4. The next step is to smooth out the edges so that they become sharper, to do this, click “Image - Correction - Levels” (Image-Adjustment-Levels). IN open window move the left and right sliders closer to the center. In order to see the result of the correction, it is best to enlarge the picture to 300% before opening the levels.

    5. We repeat points 3 and 4 in the same order.

    6. Turn off the visibility of our main layer and turn on the “Base_1” layer. Perform the action “Image - Correction - Isohelium” (Image-Adjustment-Threshold). Set the parameter at level 138.

    7. We perform the operations specified in paragraphs 3,4 and 5 with this layer.

    8. Create a new layer and fill it with black. Let's call it "Background". Set it below the “Base” layer. In the “Base_1” layer, change the mode to “Difference”.

    Here's what we get:

    9. The picture turned out to be a little scary, but we'll fix that now. Make the “Base” layer active and add a layer mask. Then, using an eraser, we can remove excess areas on the girl’s face and body.

    10. Now we have a drawing, now we need to convert it to vector. We use " Magic wand", select the entire black area of ​​​​the drawing, and on the image, press the right mouse button, in the menu that opens, select “Create work path”. Set the value to 1.0.

    Despite the fact that Photoshop is a raster graphics editor, its toolkit also includes some vector tools. Vector tools are intended primarily for creating editable curves - contours. In order to refresh your memory, let us remind you that the difference between raster and vector graphics consists in the method of storage and description graphic information. Vector drawings are stored in the form of mathematically described curves, which do not lose quality when scaled, and can be easily and flexibly edited at any time. First, let's look at the principle of constructing vector curves.


    Vector contours are built on segments that have key nodes and control points. Key nodes limit the segment on both sides, and control points allow you to control the bending of curves.


    Group tools are used to create curves Pen. Tool Pen Tool designed to create curves at key nodes. The principle of operation of this tool is to indicate the key points of a contour segment. If, when specifying a control point, and without releasing the mouse button, move it, then a segment containing control point . Further mouse movements directly affect the control point, and, in turn, the bend of the segment. The next left click will set the next control point, and so on.



    The Pen tool can work in two modes - creating curves and creating so-called shapes - closed vector areas. Switching between these modes is done with the buttons - contour creation mode, - shape creation mode. If you work in the shape creation mode, then the contour you create will always be considered closed and, as a result, filled with the color you selected. Physically, in the Layers palette, a layer mask is created based on vector drawing. The layer itself is filled with the color of your choice (you select the color in the properties palette).



    The principle of working with a vector mask differs slightly from the principle of working with a raster mask; only the means differ. If, when working with a raster mask, you changed it using drawing tools, then in this case changing the shape of the mask occurs using vector tools.


    In order to convert a vector mask into a raster mask, you need to call context menu vector mask and select the item Rasterize Mask. The result is a regular layer mask. Otherwise, working with a layer mask in the vector version is no different from working in the raster version.


    Vector drawings are convenient because you can very conveniently change the shape of the curves of this drawing at any time. There are a number of tools for this. For example, the tool (adding key points - nodes) - adds key points on the curve at the place where you click. The tool can delete extra points on a path by clicking on the point to be deleted. In fact, switching to these tools is not at all necessary. Pay attention to the switch Auto Add/Delete on the Properties palette. If this mode is enabled (checked), the Pen Tool will automatically switch to the add point tool (when you place it over the path) and the delete point tool (when you place it over an existing point). If the mode is disabled, then deleting and adding points will only be possible when using the appropriate tools.



    The bending of curves is controlled through control points. To select a control point, use the tool Direct Selection Tool. Selecting the node to edit (clicking with this tool on the edited node). Then by moving the control points you influence the bend of the curve in the area of ​​the selected node. You can also move selected nodes using this tool. Tool Path Selection Tool designed to work with the curve as a whole, as with an object - for movement and transformation. For vector objects, the Free Transform mode is used, exactly the same as for raster areas.


    An important tool for working with key nodes is a tool called Convert Point Tool. The purpose of this tool is to transform node type. In Photoshop vector graphics, there are two types of key nodes - smoothed And corner. The meaning of smoothed key nodes is that the control points of two curves converging at one node Always on the same virtual line.



    Another type of knot, as we said, is called a corner knot. The meaning of this type is that virtual lines passing through the control point of one of the segments and the common key node of both segments can converge at any angle.



    The type conversion tool works as follows - if the node is smooth (and by default nodes are created smooth), then clicking the conversion tool will change the node type to corner. If, after pressing the mouse button, you do not release it, but simply drag it, you will be able to control the bending of the segment at a specific node.



    We started by highlighting two modes of operation of the Pen Tool. The first is the mode for creating shapes, and the second is the mode for creating contours. Let's take a closer look at the mode of working with contours.


    In this case, your path will not automatically fill and form a vector layer mask and layer. In this case, your outline will be purely virtual and unrelated to layers. To work with such contours, there is a palette called Path. All operations with contours are concentrated in this palette.



    In the Path palette, contours (paths) are placed as layers in the Layers palette, and one vector layer can contain several unrelated ones vector outlines. The bottom line of the Path palette contains icons for controlling paths. The painfully familiar pictograms with a trash bin and a blank leaf have not changed their purpose in this palette, i.e. respectively, this is deleting the vector layer and creating an empty vector layer.


    Until now, we have been wondering why these vector tools are needed in such a completely raster editor as Photoshop. A simple example of using vectors in Photoshop is again working with selections. As you can see from the figure, a number of icons in the Path palette are designed to transform an outline (path) into a selection outline and vice versa. In fact, after gaining some skills in working with contours, you will understand that it is much easier to adjust the vector contour to the shape of the selected area than even using a fairly flexible quick mask. So if you want to edit a selection, you can always convert it to a path (outline), then edit it and convert it back to a selection. If you want to use traditional operations like Stroke and Fill for selection paths, then they are also at your disposal.



    Logical operations work somewhat unexpectedly. You can create paths in any of the logical modes, be it addition or subtraction. At this stage you will not notice any action. But don't be fooled by the fact that you found a bug in an almost flawless program. In fact, Photoshop remembers in what mode you created the outline (the office writes...) and as soon as you tell the program to create a selection outline from your jumble of paths, Photoshop will remember everything and perform all the operations that you prescribed to it when creating the paths. The dialog box for creating a path selection outline allows you to set the most important settings concerning the outlines of the selection (but this is only if you use the Make Selection command from the Path palette menu).



    Please note that you can set the feathering radius (Feather), enable or disable Anti-Aliased smoothing. In the Operation section, you can set the logical mode for the newly created selection. The options in this section become available only if one selection outline already exists. Accordingly, if you select the New Selection operation, the created selection will replace the existing selection; the Add to Selection option will add to an existing selection a selection created from a path; Substruct from Selection - will subtract the created path from the existing selection.


    Tool Free Form Tool allows you to create a vector path in the mode simple drawing, like a brush. Hold down the left mouse button and simply move the mouse to draw the contour you need. This tool has one main feature, which likens this vector tool to the Magnetic Lasso tool - this is an option Magnetic. The principle of operation is the same, the tool looks for contrasting boundaries and draws a contour only there. Otherwise, the contour created by this tool does not differ from a regular contour.

    • Views: 55273

    Tools for working with vectors in Photoshop appeared quite a long time ago, but they began to be used in work relatively recently. This is due to the fact that it is very for a long time they were “raw”, etc. a vector in Photoshop is not a specialized tool for work, and it has not been modified. But everything changed with the release of Photoshop CC.

    Why do you need a vector in Photoshop?

    First I want to tell you why I use a vector in Photoshop. There are many proven vector editors. The most common are Illustrator, CorelDraw, Xara. Most often I do web design, which means my work is not the end result. Those. Before becoming a website, interface, or application, the layout will be sent to the layout designer. Most layout designers are fluent in Photoshop, but are very superficially familiar with Illustrator. Therefore, the desire to “stuff” everything into one file is quite logical. It’s great when the layout designer receives one PSD that contains a complete layout and even with the ability to edit elements. Change the color of a button, change the radius of a menu shape, increase or decrease a block without losing quality - in 2 clicks and 1 minute! Vector in Photoshop allows you to do this without any special skills.

    Features of working with vectors in Photoshop

    If you have worked in any vector editor before, much will seem familiar. But you'll have to get used to a lot. All work in Photoshop is built with layers, this also applies to all vector tools.
    1. To easily edit a vector in Photoshop, you need to place each shape on a separate layer.
    2. Operations of “merging”, “subtracting”, “overlaying” are best applied to no more than two objects.
    3. After the operation of “merging”, “subtracting”, “overlaying”, the contours of the original objects remain available for editing.
    4. Raster styles can be easily applied to all vector objects. It's very convenient.
    5. You can apply transparency to vector objects and apply filters to them.
    6. Individual layers and groups of layers with vector objects can be easily cloned within a document or copied to another PSD document.
    7. Label each layer and group layers - this will save a lot of time.

    Basic primitives

    As in any vector editor, a vector in Photoshop has ready-made primitives. Basic primitives:
    “Rectangle”, “Rectangle with rounded corners”, “Ellipse”, “Polygon”, “Line”, “ Free figure" For each shape (at any time), you can set the thickness/type/color of the stroke and fill. Additional properties are available for specific primitives. For example, for a polygon you can set the number of corners, and for a rectangle with rounded corners you can set the radius of the rounding.

    Basic Tools

    To draw an arbitrary vector or edit an existing one (including the outline of primitives), you need to use the tools “Pen” (draw an arbitrary outline), “Pen+” (add new anchor points to the finished outline), “Pen-“ (delete anchor points from the finished outline), “Free Pen” (draw an arbitrary outline by hand), “Angle” (change the bends of the contour curves, set the types of connections between anchor points).

    To illustrate the process, a short video from which you will learn:
    1. How to create a primitive
    2. How to draw a free vector shape
    3. How to edit the outline of a primitive
    4. How to edit the contour of an arbitrary vector shape

    Basic operations with vectors in Photoshop

    There are 4 operations available in total: “Merge Shapes”, “Subtract Front Shape”, “Merge Shapes in Overlay”, “Subtract Shapes in Overlay”. All these operations are available through the main top menu Layers > Merge Shapes, or through the “Properties” toolbar (top menu Window > Properties).
    Attention! Before you start any merging operations vector shapes make sure that the layers of these shapes are selected in the “Layers” toolbar (turn it on F7 or Window > Layers).

    A short video illustrating the basic operations of “merging shapes” in Photoshop.

    Change color, size and apply styles

    Now we come to the most interesting part. A vector in Photoshop allows you to change the size both up and down without losing quality. To do this, select the desired layers in the “layers” toolbar, press Ctrl+T (or Command+T if you have a MAC) and drag the markers of the selected outline with the mouse to adjust the size. To change the size proportionally, you need to hold down the Shift key.


    Brief video:
    1. Resizing the vector shape
    2. Change the fill color of the vector shape
    3. Add Style to the Vector Shape

    Download example PSD (free)

    To make it easier for you to figure out how to use a vector in Photoshop and see how these tools can be used in practice, I am posting an Infographic file made by me entirely using vector tools.

    Ask a question

    If something doesn’t work out for you or you have any questions, write in the comments and I will help you figure it out. You can also watch the video using vector tools.

    Instructions

    Draw a picture or select a photo. Scan image, photograph it, that is, transfer it to digital format. Import the image to your chosen graphic editor. As you gradually zoom in, notice that image gradually breaks up into separate ones, each of which is painted in its own color. These squares are called rasters, and they are the basis of your image.

    Analyze the file size. Choose the one that suits you color model(RGB, CMYK) which will help to display correctly. Using the editor, remove or add details, adjust the frame, sharpness, color scheme. Select (the optimal display value on the screen). Resolution (raster), that is, the calculation is based on the number of pixels that your image contains horizontally and vertically. Small resolution is considered to be up to 500 pixels along one edge, medium resolution is up to 1024 pixels along the edge, everything else is considered high resolution. Large ones “eat up” a lot of memory and can take a long time to load onto the network.

    Select the compression algorithm you need and save the image. For small images and animations of two or three frames published on the Internet, *.gif is suitable; the optimal ratio of quality and file compression is provided by the *.jpeg format; for working with transparent backgrounds and backgrounds, especially in small pixel images, *.png is used. These formats are mainly used in web design. The *.bmp format provides very high quality color rendering, but the files are large in size, and the *.tiff and *.raw formats, despite the size of the resulting file, allow you to save data obtained directly from digital apparatus, convey the smallest shades of color and are widely used in professional photography and in printing.

    Please note

    The disadvantage of raster images is the impossibility of scaling them without losing the quality of the original file.

    Useful advice

    For optimal performance With a raster image, be sure to find out the final format you need (resolution, dots per inch, picture size).

    Sources:

    Vector graphics is a way of representing objects using geometric primitives - points, lines, polygons. In contrast, raster graphics use fixed-size matrices consisting of dots (pixels). Software converters are used to convert an image into a vector format.

    You will need

    • Adobe Illustrator

    Instructions

    Please note

    Many vector graphics editors have a function for converting a raster to a vector. just run some coreldraw or inkscape, import a raster image there and start the conversion.

    Useful advice

    How from bitmap make vector, Adobe Illustrator, tracing. Typically, tracing is used for images only with solid colors and with extremely clear contours, since the presence of gradient or simply complex colors leads to the formation of a very large number of vector contours.

    Sources:

    • how to convert a rastovo image into a vector one

    Raster graphics is a way of expressing an image in the form rectangular matrices. Each cell of such a matrix represents a colored dot. An element of such a grid is called a pixel.