Gradients on a pathThis article is about creating gradients that change angle one or more times, such as a gradient on a curved face of an extrusion, and creating gradients over whose range of color you have complete control. There are two major problems, obstacles to be surmounted, when you need gradients that change angle and/or have a shape that is not square. Problem 1:Gradients (fountain fills) can only have a single angle Since extrusion faces have vanishing points, the two outer edges, if extended far enough, converge, and so, cannot possibly be the same angle. The use of a normal fountain fill must be one or the other of the two angles, or an average of the two. No matter what angle is chosen, at least one outer edge is not going to match the angle of the gradient (see Figure 1).
Now, it is true that, when doing extrusions, you could use the shading and lighting functions of the Extrude roll-up, but there are some severe side effects.
Figure 2 shows the same extruded cylinder as Figure 3, however, in Figure 2, the shading and lighting functions of the Extrude roll-up were used. There are a couple of undesirable things happening, as a result. In order to shade the extruded portion, CorelDRAW creates quite well-defined bands of color, about which you can do nothing. Also, the light source affects the original object from which the extrusion was formed, in this case, the color is darkened since the light source, to provide the proper shading, does not fall fully on the front face. Maintaining a specific color for the original object is virtually impossible when using the Extrude roll-ups lighting function. Figure 3 illustrates the problem of the single angle allowed with a gradient. The average angle (averaging the angle of the two convergence lines) was used for the gradient, and it is quite evident in this illustration that the gradient angle does not match at the either edge of the extrusion face (left or right). Problem 2:Gradients always fill based on a rectangular area Another problem with using fountain fills is the minimal control over the range of color: where specific bands of color appear, unless you happen to be filling a non-rotated rectangle. Figure 4 shows how a gradient fills the bounding area of a shape. In this case, a custom gradient with white in the middle and black on both ends results in the full black portion of the gradient falling entirely outside the shape being filled. In order to see any black in the shape itself, additional color points must be added to the custom gradient for the black. Even though it is possible to do this, the color bands in a custom fountain fill must be established through trial and error, since they are specified in terms of a percentage of the range to be filled , rather than with real dimensions
The ConceptThis method of blending lines to create gradients hinges on snapping straight lines, using the Snap to Objects (Layout menu) to nodes on the edges of an extrusion face. The lines must, if extended, intersect the vanishing point (see Figure 1). The problem here is that, at least in CorelDRAW 5 and 6, performing an extrusion on an object creates extrusion faces with way too many nodes, so many that it is hard to discern which nodes you need to use. How to Auto-Reduce Extrusion Faces
Figure 5 shows a node added at the upper right on the outside circle that will represent the color shift to white. The end color for both extremes of the blend will be a dark brown color, and since the extrusion will be an approximately a 45-degree angle, the nodes for the end lines of the blend can snap to the corners of the extrusion face. the top node and the far right node of the outside circle. The reason to add these nodes is that they will be preserved by the extrusion function, and the corresponding nodes will appear on the back edge of the extrusion face.
Its okay to go ahead and apply, by default, using the fill color for the object being extruded because youre going to do a Powerclip inside the extrusion face and completely cover the color thats there, anyway. Now bring up the Layers roll-up, from the Layout menu, and create a new layer called Extrusions (click on the Layer Edit button the right-pointing arrow just below and at the far right of the roll-ups title bar). Make this new Extrusions layer not visible (no X in the Visible check box), and then click on OK. Click on Layer 1 (or whichever layer you used for drawing your original object) in the Layers roll-up. Now Separate your original object from the extrusions (Alt+A+S or Separate from the Arrange menu). Click off to the side, somewhere, to deselect all the objects, and then click on one of the extrusion faces. Click on the Layer Edit button in the Layers roll-up and select Move To. A thick arrow will appear. Use the thick arrow that appears to click on the Extrusions layer in the Layers roll-up. Your extrusion faces will disappear not to worry; theyre still there, just on an invisible layer. Click on Layer 1 (or whichever layer you used for drawing your original object) in the Layers roll-up. Turn on the Snap to Objects, and turn off the Snap to Grid, both in the Layers menu. Click on your original object (so you can see the nodes) Draw straight lines from the nodes on the original object the ones you are using for your color-shift points to the intersection of the guidelines you placed at the vanishing point (see Figure 7). Youll need to click on the original object, immediately prior to drawing each successive line, in order to see the nodes you have left. The nodes on the original object will disappear immediately when you select the pencil tool, so if you miss, when placing the ends of the lines, just select the Shape tool (Node Edit tool) and move the ends around until they snap into position.
Click on one of the extrusion faces and do one of three things: click on the Group/Ungroup button in the Toolbar; press Ctrl+U, or select Ungroup from the Arrange menu. Click off to the side, somewhere, to deselect all the objects, and then click on the extrusion face youre going to work with (in this case, the top one). Change to the Shape tool (Node Edit tool). At this point, you may want to point to the Extrusions layer in the Layers roll-up and drag it down below Layer 1. This will cause the lines you drew to the vanishing point to appear on top of the extrusion face. With the Zoom In tool, marquee select just a portion of the back edge of the extrusion face. The portion to marquee select is just the area between any two nodes you want to keep (those that have vanishing-point lines running through them and the two outer-most nodes of the back edge as shown by the dotted blue line in Figure 8).
Select Auto-Reduce from the Node Edit roll-up. This will eliminate most, if not all, of the nodes that you highlighted. Repeat the procedure for each range of nodes to be Auto-Reduced, making sure to never highlight the nodes that are to be retained. Do the same for the front edge of the extrusion face. This results should look like Figure 10.
Now youre ready to start adding the lines, snapped to the remaining nodes, that will be used to create the blends. Adding the Blend Lines
Click on Layer 1, in the Layers roll-up. With the Pencil tool, click first on any intentionally-kept node on the front edge, and then do the final click to complete the line on the corresponding node on the back edge. It is important, if you create these lines individually with the pencil tool, to be consistent about whether you click first on the front edge or the back edge otherwise, the blend will look rather strangely twisted. Repeat the creating of lines for all pairs (front edge and back edge) of intentionally kept nodes just ignore the ones that Auto-Reduce was unable to eliminate. With the last line you drew still selected, hold down the Shift key and click, successively, on each of the previous lines you just drew, to multiple select them. With the alternate mouse button (right button, right-handers), click on the red color swatch in the color palette at the bottom of the screen (this is temporary just so theyre easier to see and to make sure that you did select all the lines, and only the lines). Select the Outline tool (pen nib) from the tool box, and click on the pen nib in the flyout (or press F12), and change the line thickness to 1 or 2 points, and click on OK. The thickness you choose for your outline will depend on the size of your object. There are two factors to take into account. You probably should try to keep the number of blend steps, between any two lines, under 200, if possible, otherwise the redraw time (as well as file complexity) is excessive. Also, for the smoothest blends, you want to have one step for approximately every half-point of distance. Typically a one or two point thickness is appropriate for these lines. After completing step 7, you should have something that looks like Figure 11.
Before you do the blending of the lines, you need to change the color. But even before that, you need to lengthen the lines. The lines, as drawn are not long enough. If you were to blend them, as is, they would look like Figure 12 the blend would not extend all the way out to the back edge of the extrusion face because blends occur in a straight line.
It is possible to make the blend curve match that of the edges of the extrusion face, but its a process of trial and error and hardly worth the trouble when there is a much easier way. Scaling the Blend Lines
Select any one of the lines (easiest way is to click off to the side, to deselect all objects and/or to move the focus out of the Transform roll-up, and then press the Tab key to select the last drawn). In the Transform roll-up, select the Scale button (third button). Specify equal values for both Horizontal and Vertical scaling start by trying 150% (you just need to get the ends of the lines past the curve so that, when blended, each blend will extend past the edge of the extrusion face), and then click on Apply. Press the Tab key to select the next line and click on the Apply button in the Transform roll-up. Repeat this step until all the red lines have been scaled. Your illustration should now look like Figure 13.
Applying the Line Colors
With the right mouse button (alternate button), click on the Banana Yellow color swatch in the color palette at the bottom of the screen. Bring up the Outline Pen dialog box (F12), click on the color button, select the More button, change the K (Black) value from 20 to 70, click on OK, and then click on OK, again, in the Outline Pen dialog. Click on the other outside red line, and apply the same color changes to the line as in the last step. Click on the next line in from either side, Shift-click on the other next line in (to multiple select), and with the right mouse button (alternate button), click on the Banana Yellow color swatch in the color palette at the bottom of the screen. Select the only remaining red line and, again with the right mouse button, click on the white color swatch in the color palette. Your illustration should now look like Figure 14. Performing the Blends
Click the left most dark line, Shift-click immediately to the right of it From the distance on your rulers, try to gauge the distance between the near ends of the lines (the ends that are farthest apart). If you really have trouble guessing, you can deselect the lines and, with the Snap to Objects on, draw a line between the two line ends and before you click on the second line end, allow the line to snap into place and, in the status bar, read the value for Distance. If you are working in inches, multiply the inches by 144; if you are working in picas, multiply the distance by 24; if you are working in points, multiply the distance by 2. In the Blend roll-up, Enter the result of the math (ugh) in the last step for the number of blend steps, and click on the Apply button. Click off to the side to deselect, and click on the line forming the right side of the blend you just created (the Banana Yellow line). Make sure the status bar reports that you have selected a Control Curve. Shift click on the next line (the white one), gauge the distance between the near ends of the lines, figure and enter the appropriate number of steps in the Blend roll-up, click on the apply button. Click off to the side to deselect, and repeat this blend step figuring and application for the remaining pairs of lines. Always make sure that, when you select what you think is the line forming the end of a blend, the status bar reports that you have selected a Control Curve. Your illustration should now look like Figure 15.
Powerclipping the BlendNow you need to Powerclip the compound object (the multiple blends) into the extrusion face. In order to do that, you need to be able to see the extrusion face, which is currently obscured by the blend. Fortunately, since you put the blend lines on Layer 1 and took the precaution of putting the extrusion face on a separate layer, its an easy matter to move the extrusion to the front.
From the Effects menu, select Powerclip. From the Powerclip flyout, select Place Inside Container. With the thick arrow that appears, click inside the area of the extrusion face. Your illustration should now look like Figure 17.
Delete the (now) unnecessary lines that extend to the vanishing point (or, if you think you might need them, create a new layer, make it invisible, and move the vanishing point lines to the invisible layer). Select the extrusion face, and, with the right mouse button, click on the X button at the left of the color palette at the bottom of the screen. Your illustration should now look like Figure 18.
HINT: To see what this object would look like under very specific lighting conditions, use CorelDRAW 6s CorelDREAM 3D to set up a 3-dimensional scene and render to a TIF file. You can then import the TIF file into CorelDRAW and recreate the effects with vector tools. Figure 19 shows the cylinder with a blend applied to the interior extrusion face, as well as a custom linear gradient at a minus 45-degree applied to the front edge.
You have now seen that, with CorelDRAW, it is possible to create gradients that have more than one angle, through the use of blends applied to straight lines which are then Powerclipped inside closed curves. You have seen how this can be particularly useful for adding realistic shading to extrusions of objects with curved surfaces. With this technique, you can overcome the two basic problems with gradients, that they can have only a single angle, and that the range of the gradient is always based on the rectangular bounding area of the object being filled. Expand your limits go forth and create. Copyright ©2005 by Byron Canfield |