The problem

I use pst-solides3d (part of pstricks bundle for LaTeX) to generate the following surface. PSTricks generated effects

The surface is not a mesh, but a collection of disjoint quadrilateral patches, each with a uniform color. The overall effect looks like a gradient effect, but it is not true smooth gradient (if you consider 3D rendering, it usually cannot produce vector format graphics). I want to turn it into a smooth gradient surface just like in AI.

The problem with blend (of these quadrilateral patches) is that it does not produce a satisfying result. So I had to take the pain to work with gradient mesh. To create such a strange shape of gradient mesh is also difficult. It does look better with very coarse mesh (see the following), but it is still very time consuming. gradient mesh rework (only the front piece)

The question

So my question is, is there a way to translate the mesh generated by PSTricks into a gradient mesh in AI?

Alternatively, if there is a better way to do this, I would also like to know it. Thank you.

  • Its a good question which has no easy workable solution. Reason being that adobe does not expose the gradient mesh to the scripting layer (Atleast thats been the case in all illustrator versions i have used). Which makes it a bit hard to manipulate the meshes with code. The sdk can do it but its but the documentation is a bit lacking.
    – joojaa
    Nov 13, 2014 at 7:39
  • @joojaa Thanks very much for your comment. I didn't realize this because I am not familiar with scripting. I only use scripts provided by other people. And now I know from you that it is not possible. So about this SDK, does it work directly at the postscript level? If it is, I can just ask the package writers to consider it XD.
    – Troy Woo
    Nov 13, 2014 at 7:55

1 Answer 1

  • Use the half of the main shape and make five perpendicular path following the central axis
  • Each line has 2px weight, and stroke color or gradient from color A to B or viceversa like the image below.


  • Use the Blend Tool to make a blend from line to line from top to bottom
  • Menu Object > Blend > Blend Options > Specified Steps


  • Send the Blend back, select it with the main shape and make a Clipping Mask


  • Use the Reflect Tool to duplicate it


  • With the Direct Selection Tool select each path to adjust the gradients

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.