6 Replies Latest reply on Oct 10, 2009 8:59 PM by RaycerX

    Doing a Word Cloud Part 2

    RaycerX Level 1

      I'm trying to do a Word Cloud similiar to the ones you see on sites like this: http://www.roytanck.com/tag-cloud/


      With some help from this forum I was able to learn how to get the words to orbit around a null object while always having them face (auto orient) towards the camera.


      The problem I'm having is that when I create a camera for the words to orient to they bend in towards the camera creating a very undesirable effect. I've been messing around with all different camera parameters to try and "flatten" them out, but to no avail. I've attached a screenshot so you can see what I'm talking about.


      Any ideas on how to fix this would be much appreciated. It's driving me up the wall.





        • 1. Re: Doing a Word Cloud Part 2
          bogiesan-gyyClL Level 3

          Without seeing the lines that are holding the werdz in position or their bodning boxes, it looks like simple wide angle distortion to me.


          Sorry not be able to offer any helpful advice, I have none. I'm very interested in how you progress, though, fascinating project. Wish I could help. Good luck.



          • 2. Re: Doing a Word Cloud Part 2
            Todd_Kopriva Level 8

            I think that the problem is that your camera is too close. Pull the camera way back, then zoom in. With the camera so close, it's obvious that the layers out toward the edges are pointing more in toward the center to orient toward the camera.

            1 person found this helpful
            • 3. Re: Doing a Word Cloud Part 2
              Mylenium Most Valuable Participant

              As the otehrs said, your focal length is much too short. You need to dolly out and increase the focal length, possibly also compensating by changing the text size. The problem you see is particularly ovious due to how the align to camera option works. In fact part of the distortions is because of that as well and it can also be remedied by the described procedures.



              1 person found this helpful
              • 4. Re: Doing a Word Cloud Part 2
                Rick Gerard Adobe Community Professional & MVP

                I don't think your focal length is too short, I think your words should be oriented to a null that is positioned way behind the camera instead of orienting towards the camera. A wide angle lens on the camera would allow you a greater perspective change with a smaller word cloud and a much smaller set of words.


                Try creating a null called "look at nuull" then add this expression to your word layer's orientation property:


                L = thisComp.layer("look at null");
                a = L.toWorld(anchorPoint);
                T = thisLayer;
                b = T.toComp(anchorPoint);
                lookAt(a, b)

                Now position the null at the camera position and make the camera it's parent. You'll notice that the null's position now reads 0,0,0


                Set the z value to something wild like -5000 and then orbit the camera around your word cloud. You'll have the effect you're looking for.


                You can also randomly position your word layers in 3D space by using this expression with the word layer's anchor point:


                seedRandom(index, timeless = true);
                x = value [0] + random(-200, 200);
                y = value [1] + random(-200, 200);
                z = value [2] + random(-200, 200);
                [x, y, z]

                The plus and minus values set the dimensions of your word cloud. In this example it's a cube 400 X 400 pixels at the center of the comp.


                Hope this helps. If I had a little more time I'd build you a sample comp. There's also a way with some expressions that I can't compose without researching the vector math a bit that would keep all of the word layers oriented toward a distant null while you parented the words to a central turntable null in the center of the cloud. This would allow you to rotate the cloud instead of orbiting the camera. That would be a more elegant solution that I'll have to think about for a moment.

                • 5. Re: Doing a Word Cloud Part 2
                  bogiesan-gyyClL Level 3

                  As usual, a jaw-dropping and awe-inspiring post about scripting from Rick.

                  I do not understand scripting and I struggle with expressions, call me an AE Luddite, but I'm starting wonder if merely running the fairly standardized Webpage animated tag/link digestion and display system might not have been easier in the long run.


                  I have nothing credible to offer to this thread and I am in awe of anyone who can work with scripts at all.



                  • 6. Re: Doing a Word Cloud Part 2
                    RaycerX Level 1

                    Thanks for the very informative and in-depth solution you gave me. I'm going to give it a try and I'll report back on how it works. My knowledge of Expressions is very basic at this point, but your suggestions will definitely come in handy for this and other projects.


                    Thanks again,