11 Replies Latest reply on Sep 16, 2009 8:26 PM by JETalmage

    Gradient fills that radiate inward or outward

    dbfletcher

      I would like to be able to create a gradient fill between to paths that are create buy using the "offset path" command.  I want the fill to go either from the outside path toward the inside or vise versa.  Is this possible?  I am very very very very new to illustrator and i have been googling for hours but i dont think I know the correct terminology to search on.  I have attached a image using a circle that shows the effect i am after.  But I want to apply this to odd shaped paths.. but still have a smooth gradient from the outside path to the inside.

        • 1. Re: Gradient fills that radiate inward or outward
          [scott] Level 6

          For odd shaped objects the two options to use would be either a Blend or a Gradient Mesh.

          1 person found this helpful
          • 2. Re: Gradient fills that radiate inward or outward
            Jacob Bugge MVP & Adobe Community Professional

            db,

             

            I would like to be able to create a gradient fill between to paths that are create buy using the "offset path" command.

             

            Actually, you are describing the first step in creating the blend for unstroked paths. Just select the two paths and:

             

            2) Object>Blend Options, choose Align to Path, especially if you may rotate/whatever later, and choose Smooth Color or Specified Steps; with a suitable number, the latter will normally result in a smaller file, and it is needed if either or both objects has a gradient;

            3)Object>Blend>Make.

            • 3. Re: Gradient fills that radiate inward or outward
              dbfletcher Level 1

              Thanks! That appears to be exactly what I was looking for.  I dont think I ever would have stumbled upon that myself.... "blend" never entered my brain for creating a gradient.  But like I said I am very new to illustrator.  Thanks for the nudge in the rigth direction!

               

              Now let me throw another twist in.  That procedure does create a nice linear transition from one path to another.  Is there a way to make the gradient appear to be a concave or convex gradient between the two paths?

               

              Doug Fletcher

              • 4. Re: Gradient fills that radiate inward or outward
                Jacob Bugge MVP & Adobe Community Professional

                Doug,

                 

                Now let me throw another twist in.  That procedure does create a nice linear transition from one path to another.  Is there a way to make the cradient appear to be a concave or convex gradient between the two paths?

                 

                Presuming you refer to the colouring rather than the shape, you may add an intermediate shape (to create a blend of three shapes) with a colour outside the range of the original colours, in other words paler or darker than the basic blend colours (simple gradients/blends often have a convex/concave appearance in themselves). That shape may be formed by using half the hitherto used offset, or by creating a one step blend between the shapes. This may be extended.

                 

                To create what appears as a non uniform gradient, you may  use an intermediate shape that is closer to either of the original ones, with a colour midway between the basic blend colours, or an intermediate shape midway, with a colour that is closer to either of  the basic blend colours.

                 

                If you refer to the shape, the intermediate shape(s) should be changed to fit your need.

                • 5. Re: Gradient fills that radiate inward or outward
                  dbfletcher Level 1

                  Thanks.. that gets me closer but i am still missing something.  Perhaps it will be clearer if I explain what my end goal is.  I am using illustrator to make "depth maps" for another program.  I have attached my attempt at the "concave/convex" surface and the resulting file from the other program.  It does look ok in illustrator, but when i import it is clear that i still have very linear transitions between the three paths.

                   

                  Doug Fletcher

                  • 6. Re: Gradient fills that radiate inward or outward
                    Jacob Bugge MVP & Adobe Community Professional

                    Doug,

                     

                    Referring to the first image, you may use two white rectangles with slightly different size to create a wider ridge if you wish.

                     

                    I have no clue why it just looks like bevels in the second image. You may try Object>Expand and experiment with the options. Or you may try Object>Flatten Transparency and keep it at 100% Vector.

                    • 7. Re: Gradient fills that radiate inward or outward
                      JETalmage Level 6
                      Thanks.. that gets me closer but i am still missing something.

                      The simple answer is that you have chosen a particularly weak program for using blends to accomplish what you are trying to do.

                      If you are genuinely interested in the technical reason, read on:

                      I am using illustrator to make "depth maps" for another program..."concave/convex" surface

                       

                      In your example (using stroke weight and color of two or more blended, but aligned, paths), you are trying to (A) use the stroke weight and color of twor more blended, but aligned, paths to create grayscale values that another program can translate to 3rd-dimension altitudes (which you can do), and (B) have editable control over the curvature, or "fall off rate," of the grayscale altitude change (which you can't). Here's why B isn't working:

                       

                      Unlike other drawing programs, Illustrator's comparitively basic blend feature does not provide options to control the acceleration of path attributes (color, stroke weight, etc.) in a blend. When Illustrator blends are attached to a path, the spacing of the intermediate steps is affected by the curve handles of the spine path, (sometimes useful; just as often undesirable) but not the rate of change in attributes.

                       

                      Including more key objects, unevenly spaced, in the blend (Jacob's suggestion) will cause the several sets of intermediate groups to differ in spacing, but not the number of steps between sets. And again, unless influenced by the curve handles of a spine path (not an option in your example), the spacing is linear for each set. So the same problem exists: Jacob's method affects spacing between adjacent key objects, but not the rate of change in attributes.

                       

                      It does look ok in illustrator, but when i import it is clear that i still have very linear transitions between the three paths.

                       

                      For understanding's sake, it's easier to see what's going on if you space the key objects apart:

                       

                      1. Draw a rectangle. Make a copy of it and drag it some distance rightward.

                      2. Give the left (original) rectangle a thick black stroke.

                      3. Give the right rectangle a thin white stroke.

                      4. Blend the two, using one step.

                       

                      You now have a blend with one intermediate step. That intermediate step is 50% gray, and is situated halfway between the two keys.

                       

                      5. Edit the Blend Options to change the number of steps to 3.

                       

                      You now have a blend with three intermediate steps: Their strokes are 75%, 50%, 25% gray. Obviously, this distribution in gray value is very linear. So is the distribution in stroke weight.

                       

                      6. Undo the Blend Options change, to get back to two keys, with one intermediate step. Now we'll try Jacob's suggestion for injecting a curve into the distribution of grayscale values.

                       

                      7. Object>Blend>Expand. Ungroup.

                       

                      Now you have three paths.

                       

                      8. Color the middle one's stroke white. The idea here is to "skew" the grayscale distribution by moving 50% gray more toward the left. That will certainly happen, but in a moment, you'll see why this does not invoke a curve in your height map.

                       

                      9. Select all three and make a new blend, again using Specified Steps: 1.

                       

                      Now you again have a blend consisting of 5 total steps. Values are, left to right: 100%, 50%, 0%, 0%, 0%. Clearly, 50% has moved off-center. But does this a curved distribution make? No:

                       

                      10. Edit the Brush Options and change the Specified Steps to 3.

                       

                      Now your values are: 100%, 75%, 50%, 25%, 0%, 0%, 0%, 0%, 0%. Clearly, you have moved the gray ramp leftward, and compressed it. But also clearly, you can see that the rate of color change is just as uniform (linear) as it as before. Okay, let's try moving the middle key off-center:

                       

                      11. White Pointer: Select the middle key path and move it leftward.

                       

                      Note that all you've done now is further compress the spacing. The gray ramp is still uniform in its rate of change. What now? Well, you could try attaching this blend to a path, then using the path's curve handles to cause the spacing of the intermediate steps to become progressive. But the coloring and the stroke weights would still be uniformly distributed. Moreover, using that trick to impose non-uniform spacing wouldn't help in your example anyway, because your stack of blended paths need to be aligned and stacked, not spaced.

                       

                      So altering the above blend to add as many intermediate steps as you want for what appears to be a smooth transition is still not going to give you a curved (accellerating) gray ramp. Used as a height map, you'll find that you have suceeded in moving the point of the highest altitude around, or broadening the top plateau, but the gray slopes on either side will still be linear.

                       

                      Are there workarounds in AI? Yes. (Just about everything in Illustrator is a workaround.) But consider how comparitively simple this task (and a multitude of others dependent upon the same functionality) is in a program that provides accelleration control of blends:

                       

                       

                      The positions and colors of the key objects in both blends are identical. The top blend is the default, linear.

                      But in the bottom blend, the rate of change of the attributes (not the spacing) between the two key objects has been altered by a curve function. (There is a similar dialog with which to control the rate of change in spacing.)

                       

                      You don't say what version of Illustrator you are using. The above explanation assumes CS3 or earlier. I have not heard of CS4 having added any accelleration / distribution controls for blends.

                       

                      JET

                      • 8. Re: Gradient fills that radiate inward or outward
                        dbfletcher Level 1

                        Perhaps I missed it.. but are you recommending any PARTICULAR program that does this?  I really appreciate how complete your explaination was, however, you lead me to bleive there are several programs that can do this.. but I must of missed what they are.  Can you elaborate on a few?  Are there addon to illustrator that would allow this?

                         

                        Would I just be better off to go true 3d and export depth maps from there?

                         

                        Doug Fletcher

                        • 9. Re: Gradient fills that radiate inward or outward
                          JETalmage Level 6

                          Did you state a PARTICULAR "other program" that you are using the AI artwork in for height maps?

                           

                          The screenshot shown is from Xara Xtreme, because I happen to have it installed on this laptop. Corel Draw also offers separate object and color acceleration controls for blends.

                           

                          Would I just be better off to go true 3d and export depth maps from there?

                           

                          Depends on what you mean, and the capabilities of the particular 3D program. Sounds to me like a circular method to actually model something in 3D, just to end up with a grayscale image that you would then use in a 3D program as a height map to recreate the 3D object.

                           

                          Some 3D programs (Byrce and Cararra, for examples) provide bitmap editors specifically for painting grayscale height maps. Or, you can do it in Photoshop.

                           

                          But I assume from your desire to do it in Illustrator, you want the grayscale art to be editable as vector artwork.

                           

                          JET

                          • 10. Re: Gradient fills that radiate inward or outward
                            dbfletcher Level 1

                            The end use for these files are "patterns" for a 3D woodcarving machine (www.carvewright.com).  That machine uses 256 shades of gray to determine the Z axis.

                             

                            I started using 3D tools (demo versions) as I had used lightwave many years ago so I was somewhat familiar with building and navigating in 3d.  However it then seemes like illustrator or inkscape might be far faster and more effiecient to create some patterns.  I'm just trying to find the right tools to make the best use of my time.

                             

                            I hope that helps explain my position better.  I appreciate all the help.  And I am an extreme novice with illustrator.  Maybe 10 hours total use time, so nearly everything is new to me!

                             

                            Doug Fletcher

                             

                            PS.  I did choose illustrator so the artwork would be scaleable (vector), but this isnt an absolute requirement.

                            • 11. Re: Gradient fills that radiate inward or outward
                              JETalmage Level 6

                              Download a demo of Xara. It's pretty simple (short learning curve), and surprisingly capable. And it's not expensive. It's heavily focussed on live raster effects applied to vector objects, and is very fast at that kind of stuff. Since your need is for final output to be raster, it might be just the thing for your application.

                               

                              JET

                              1 person found this helpful