Skip to main content
Inspiring
October 5, 2017
Answered

Perspective correct images within AI... Possible?

  • October 5, 2017
  • 2 replies
  • 1449 views

An image might better explain what I'd like to do:

Currently, I do a TON of perspective correction by correcting the image in PS and then placing into AI.  It would be nice to be able to do this completely within AI.  Perhaps through envelope distort? Are envelopes scriptable?  I can take care of the maths of the transform I'm just looking for some direction on where to start, or if it's even possible?

This topic has been closed for replies.
Correct answer Silly-V

Some of the stuff is not scriptable, but luckily, this command works to make an envelope with a top object:
app.executeMenuCommand("Make Envelope");

Thus, you can with script change the shape of your path you want to be used as a 4-corner perspective plane and then do the above line to make the envelope. Come to think of it, this could be used to say, map a new entire facade on to a building, or something.

2 replies

jsavage77Author
Inspiring
October 20, 2017

   Anyone know if there's a way to get the envelope distort to act like the free distort tool, or if there's a way to script the free distort tool?  I've got the correct shape being generated for the distort, but for some reason when I apply the envelope to the image some straight lines become curved  (even though my top object is not curved). I'm assuming it has something to do with AI adding handles to the anchors, but I've tried retracting all the handles and the distortions become worse.

Silly-V
Silly-VCorrect answer
Legend
October 5, 2017

Some of the stuff is not scriptable, but luckily, this command works to make an envelope with a top object:
app.executeMenuCommand("Make Envelope");

Thus, you can with script change the shape of your path you want to be used as a 4-corner perspective plane and then do the above line to make the envelope. Come to think of it, this could be used to say, map a new entire facade on to a building, or something.

jsavage77Author
Inspiring
October 6, 2017

Perfect! Thank you so much!  Does anyone know a slim library I can include to work with matrices?  I only need the following matrix functions:

multiplication, determinant and inverse.

Silly-V
Legend
October 7, 2017

This is the kind of thing I would use more knowledge in. Let me know if you end up finding such a suitable library?