8 Replies Latest reply on Jun 5, 2015 10:40 AM by Peter Spier

    How to add Perspective in InDesign...  even if it's rough!

    Stix Hart Level 5

      I find myself doing heaps of putting logos on garments for concepts/proofs these days.  I know if you want to get it perfect you use PhotoShop, I don't want to get it perfect, I want to do it fast and that means using InDesign!  This is an example:

       

      1.png

       

      On ths one I could just about crop it off and it'd look OK, often though I want to compress one end to give it perspective, sort of like this but with the content of the frame (which is typically a placed PDF BTW) being compressed too:

       

      2.png

       

      Any tips?  If InDesign can't do it would Illustrator (which I very rarely use and don't know much about) be faster than PhotoShop?  Much much much rather do it in InDesign somehow...  I know about the Free Transform Tool but that only combines rotation with shear, which is not what I want in this instance, although I do use it as well.

        • 1. Re: How to add Perspective in InDesign...  even if it's rough!
          Petteri_Paananen Level 4

          Unfortunately you won´t find a deasent perspective tool from InDesign, Illustrator has much more potential in that area....

           

          But... I think you could handle that kind of small perspective adjustment with shear tool....

           

          shear.jpg

          1 person found this helpful
          • 2. Re: How to add Perspective in InDesign...  even if it's rough!
            Steve Werner Adobe Community Professional & MVP

            This is the case where it's better to use another tool. Try the Perspective tool introduced in Illustrator CS5.

            1 person found this helpful
            • 3. Re: How to add Perspective in InDesign...  even if it's rough!
              Stix Hart Level 5

              Hmm, I was worried that was going to be the answer.  My Illustrator version is only CS3, so I'll have to keep on using PhotoShop for now.

              • 4. Re: How to add Perspective in InDesign...  even if it's rough!
                [Jongware] Most Valuable Participant

                Gosh, it has been a few years since this post: http://forums.adobe.com/thread/464428

                 

                "Perspective" requires a similar approach -- it'll not yield anything like real persperctive, but a simpler variation that just compresses the text left-to-right. If that's rough enough for you,  shall I take a look if it can be done in ID?

                • 5. Re: How to add Perspective in InDesign...  even if it's rough!
                  [Jongware] Most Valuable Participant

                  Here is a Javascript -- it is as rough as I thought

                   

                  For some reason the amount of perspective relies on both the width and height of the original, so if it scales too much, adjust the factor by hand. If it scales too little, just run it again on your selection!

                   

                  You need to run this on a copy of your original objects! Convert any text to outlines, and make sure the selection doesn't include groups. Then select all objects you want to include and run the script.

                   

                  //DESCRIPTION:Add perspective to object
                  // A Jongware script 6-Feb-2012
                  
                  if (app.documents.length == 0 || app.selection.length == 0 || app.selection[0].hasOwnProperty("baseline"))
                  {
                            alert ("Please select one or more objects first");
                            exit();
                  }
                  
                  // Get entire width and height of selection
                  leftx = app.selection[0].geometricBounds[1];
                  rightx = app.selection[0].geometricBounds[3];
                  
                  topy = app.selection[0].geometricBounds[0];
                  boty = app.selection[0].geometricBounds[2];
                  
                  for (i=0; i<app.selection.length; i++)
                  {
                            if (app.selection[i].geometricBounds[1] < leftx)
                                      leftx = app.selection[i].geometricBounds[1];
                            if (app.selection[i].geometricBounds[3] > rightx)
                                      rightx = app.selection[i].geometricBounds[3];
                  
                  
                            if (app.selection[i].geometricBounds[0] < topy)
                                      topy = app.selection[i].geometricBounds[0];
                            if (app.selection[i].geometricBounds[2] > boty)
                                      boty = app.selection[i].geometricBounds[2];
                  }
                  
                  
                  // leftx and rightx now holds the entire width,
                  // topy and boty the entire height
                  // we need this to apply a gradual contraction per each point
                  // points above the vertical center move up, below move down
                  
                  
                  factor = 10;
                  
                  
                  for (i=0; i<app.selection.length; i++)
                  {
                            add_perspective_to_obj (app.selection[i], leftx, (topy+boty)/2, rightx-leftx, boty-topy);
                  }
                  
                  function add_perspective_to_obj (obj, originx, originy, width, height)
                  {
                            for (path=0; path<obj.paths.length; path++)
                            {
                                      //          Grab the path points
                                      p = obj.paths[path].pathPoints.everyItem().getElements();
                  
                                      newp = [];
                                      //          Move them around
                                      for (pp = 0; pp<p.length; pp++)
                                      {
                                                // Adjust vertical position according to horizontal
                                                relativehpos = (p[pp].anchor[0]-originx)/width;
                                                relativevpos = (p[pp].anchor[1]-originx)/height;
                  
                                                py = p[pp].anchor[1];
                                                py = py + factor*(py-originy)*relativehpos/relativevpos;
                  
                                                ply = p[pp].leftDirection[1];
                                                ply = ply + factor*(ply-originy)*relativehpos/relativevpos;
                  
                                                pry = p[pp].rightDirection[1];
                                                pry = pry + factor*(pry-originy)*relativehpos/relativevpos;
                  
                                                newp.push (
                                                          [
                                                                    [ p[pp].leftDirection[0], ply ],
                                                                    [ p[pp].anchor[0], py ],
                                                                    [ p[pp].rightDirection[0], pry ]
                                                          ]
                                                );
                                      }
                                      obj.paths[path].entirePath = newp;
                            }
                  }
                  
                  • 6. Re: How to add Perspective in InDesign...  even if it's rough!
                    Steve Werner Adobe Community Professional & MVP

                    But for those of you with Creative Suite Design Premium 5 or 5.5, I do encourage you to try the Illustrator method. Much easier and more visual.

                    • 7. Re: How to add Perspective in InDesign...  even if it's rough!
                      SebastiaoV Level 1

                      Sorry for reviving and old post

                       

                      Indeed it would be great to have in InDesign the option of perspective and be able to edit any corner of the block of text. Distort is very far off in many cases.

                       

                      I tried to execute the script on InDesign CS6 but i get some sintaxis error.

                      Captura de pantalla 2015-06-05 a la(s) 14.28.26.png

                       

                      I did try to do the same perspective effect in Illustrator but when i paste back into InDesign i get a white background on text. Is that right or i can modify from some Preferences?

                       

                      Thanks ;-)

                      • 8. Re: How to add Perspective in InDesign...  even if it's rough!
                        Peter Spier Most Valuable Participant (Moderator)

                        I would try putting this script into a "Version 6.0 Scripts" (without the quotes, but case sensitive) subfolder.