13 Replies Latest reply on Oct 11, 2011 10:06 AM by Matt Paintin

    Text animation question

    Matt Paintin Level 1

      I was wondering if anyone could tell me how to do this or if its even possible.

       

      I have this line of text representing a line of genetic code.

       

      Ran-Text.jpg

       

      I need the order of the letters to change every 3 frames  to make it look like its randomly 'scrolling' or churning through the line of genetic information.

       

      However I need the letters to be in a specific order by the end of the animation (a duration of 100 frames).

       

      Is it possible to do this?

       

       

      Many thanks for any help

        • 1. Re: Text animation question
          Rick Gerard Adobe Community Professional & MVP

          You could animate character offset. Use a monospaced font, type in your final text and set it up like this. The keyframe values are 33 and 0 over 100 frames. That will give you a character change every 3 frames.

          Screen Shot 2011-10-10 at 5.41.14 AM.png

          • 2. Re: Text animation question
            Matt Paintin Level 1

            Thanks Rick thats very helpful.

             

            Is there a way I an do the same thing but ensure that it only uses variations of 4 characters rather than the whole alphabet?

            In this case I would need it to just use  C,T,G and A as per my original image.

             

            Thanks

            • 3. Re: Text animation question
              Mylenium Most Valuable Participant

              It's possible by using multiple text animators that overlap and you could fancy it up using wiggly selectors. By animating their values you could randomize the inbetween steps and would stil lhave a clear start and end pattern... Personally for a scenario like yours I would write a source text expression for maximum control, but that may be a bit over your head.

               

              Mylenium

              • 4. Re: Text animation question
                Matt Paintin Level 1

                Thanks Mylenium

                 

                Yes I think any text expressions are beyond me actually. Hmmm looks like this may not be as simple as I had hoped.

                 

                Im not sure how to do it with multiple animators either to be honest.

                • 5. Re: Text animation question
                  bogiesan Level 4

                  There's nothing new about DNA! We've been doing DNA animations for (what seems like) decades in AE. It can be brute-forced many ways but your production's elegance may need to take a compromising hit to accommodate your inexperience.

                   

                  In the olden days, before text animation selectors, we'd have created one master sequence that simply transitioned the 4 letters. You could fade, warp, wipe, spin, twirl... see the opening sequence for the film GATACA for an idea of how this can be done.

                  Then you bring this one movie into your crawl as many ties as you need to fill out the screen.

                   

                  If you require more randomness, you create several movies by rearranging the individual text elements of the original amster comp. Then render each and stack them up in your crawl.

                  You can also search for MAtrix-style titles and, depending on your patience and proficiency, adapt those to GATC.

                   

                  You can also create a vertical element that contains random sets of each of the letters, stacked and evenly spaced. You set hold keyframes to move the element up or down so the letter appears to change instantly. Repeat as many times as necessary. This is an ancient text animation technique first described by Trish Meyer for AEv2 or v3.

                   

                  bogiesan

                  • 6. Re: Text animation question
                    Matt Paintin Level 1

                    Thanks bogiesan

                     

                    Interestingly I did a variation on that method before.

                    I did find it a bit longwinded and it required lots of tweaking. I guess I was hoping that there a slightly more straightforward route by using the animators

                    • 7. Re: Text animation question
                      Rick Gerard Adobe Community Professional & MVP

                      Try this expression for source text:

                      dna ="CTGA"; // your letters
                      dnaFinal = "CTGAGTCACGAG"; // final string
                      s1 =  dna[Math.floor(random(dna.length))];
                      s2 =  dna[Math.floor(random(dna.length))];
                      s3 =  dna[Math.floor(random(dna.length))];
                      s4 =  dna[Math.floor(random(dna.length))];
                      s5 =  dna[Math.floor(random(dna.length))];
                      s6 =  dna[Math.floor(random(dna.length))];
                      s7 =  dna[Math.floor(random(dna.length))];
                      s8 =  dna[Math.floor(random(dna.length))];
                      s9 =  dna[Math.floor(random(dna.length))];
                      s10 =  dna[Math.floor(random(dna.length))];
                      s11 =  dna[Math.floor(random(dna.length))];
                      s12 =  dna[Math.floor(random(dna.length))]; // continue for total length of string.
                      
                      randText = s1 + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9 + s10 + s11 + s12; 
                      
                      if (time < 3) {
                        myText = randText}
                      if (time >= 3) {
                        myText = dnaFinal}
                      

                       

                      Time is set to 3 seconds. I'm not sure what your frame rate is. At 30 fps this would be 90 frames. To get each frame to hold for multiple frames just pre-compose this layer and posterize time. You might also want to add CC Force Motion Blur to make the animation a little smoother. Adjust the timing for your frame rate to get the total number of frames you want.

                       

                      The expression is a little clunky, and requires some careful repetitive typing, but it's the best I could come up with on short notice.

                      • 8. Re: Text animation question
                        Matt Paintin Level 1

                        Thanks so much for taking the time to draw up that expression Rick.

                        That seems to be working quite well now

                         

                        What would I adjust in the expression to make the group of letters span the width of the screen?

                        • 9. Re: Text animation question
                          Mylenium Most Valuable Participant

                          In Rick's example you just need to define more strings and add them together. A more versatile and adaptable way would be using a while() loop construct, but I'd have to give this some more thought...

                           

                          Mylenium

                          • 10. Re: Text animation question
                            Matt Paintin Level 1

                            Thanks Mylenium.

                            The whole math thing is an enigma to me.....I am in awe of you guys!

                            • 11. Re: Text animation question
                              Rick Gerard Adobe Community Professional & MVP

                              Myleniym, I also thought of the while() loop idea but I couldn't figure it out in my head. Where's Dan Ebberts when you need him?

                               

                              Matt,

                               

                              Just add more strings and then continue the + s# expression until you fill the screen. If you had 40 letters then the variables would be s1 through s40 and the last line before the if statements would be something like

                               

                                   randText = s1 + s2 + s3 . . . (continuing the pattern to ) + s38 + s39 + s40;

                               

                              That's what I meant by repetitive typing. Also, the dnaFinal string would be your entire final line of text with all 40 characters.

                              • 12. Re: Text animation question
                                Mylenium Most Valuable Participant

                                Myleniym, I also thought of the while() loop idea but I couldn't figure it out in my head.

                                 

                                My pleasure:

                                 

                                http://www.aestuff.myleniumstuff.de/files/text_dna_base_pairs.zip (CS4 project)

                                 

                                Use the sliders on the text layer to adjust to taste. Animating the random seed will make it look like it's scrolling. Eliminate the second strand, if you don't need it.

                                 

                                Mylenium

                                • 13. Re: Text animation question
                                  Matt Paintin Level 1

                                  Thank you so much guys for your help on this and for taking the time to do the scripts for me.

                                   

                                  Rick: before your latest reply I applied some common sense based on your script and managed to get a 50 character string working quite nicely

                                  I think that may be my limit on the math though!

                                   

                                  Thanks Mylenium for going to the trouble to send that zip too. Ill take a look and see how the two methods compare

                                   

                                  Cheers guys.