Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Randomized lab results

From: After Effects Apprentice 16: Creating a Medical Opening Title

Video: Randomized lab results

For our next improvement I think I'd like to add a little bit of animation and interest to these lab result displays that are part of the background. Right now it's just static text and static numbers. Since we have animated Vital Signs and now an animated element in our background layer, I think it would be particularly cool if those values in the Vital Signs animated as well. Therefore, I'd like to replace those static numbers in the background with animating numbers. Well, there's a few ways of going about that. You might be tempted to initially to take one of your Lab Results layers and attempt to Layer>Pre-compose it.

Randomized lab results

For our next improvement I think I'd like to add a little bit of animation and interest to these lab result displays that are part of the background. Right now it's just static text and static numbers. Since we have animated Vital Signs and now an animated element in our background layer, I think it would be particularly cool if those values in the Vital Signs animated as well. Therefore, I'd like to replace those static numbers in the background with animating numbers. Well, there's a few ways of going about that. You might be tempted to initially to take one of your Lab Results layers and attempt to Layer>Pre-compose it.

The problem with this is that text layers don't necessarily follow the same rules as other layers. This will not let me leave all attributes in the Final Comp, it's going to insist that I move all attributes into the new composition, including its position and 3D space. That's going to make things messy, because then I'll need to have the camera back there, etcetera. So instead of pre-composing my text layer, I'm going to go ahead and just create a brand-new comp with the text already in it, then I can swap that comp back and place this text layer later on. You may remember that earlier on we did have this composition of all of the Lab Results.

That was a result of us importing a layered Photoshop file as a composition. That means this composition is already at the size that I'll need to swap in for the text layers later on. So I could start with just one layer in here and duplicate this comp and continue to work with it. I'll pick one layer of Lab Results, I'm going to note the font and the size that I use; Myriad Pro, Semi-Bold, 48 points, White color, and I'm going to get rid of the numbers for one these results.

Now it is possible to use a text layer and expressions to randomize the text or numbers displayed by that text layer. It's a tricky expression. Instead, I'm going to fall back on a very old school effect called Text>Numbers. Numbers is a great old way of creating numeric values that can indeed be keyframed or randomized. I'm going to change the Font to Myriad Pro, change the Style to Semi-Bold.

I think I'll go ahead and Right Justify just so I can keep decimal points lined up. Okay, this looks good. The default color is Red, which is not our color. I'll change it to White. The default point Size is 36, and I'll make it 48, and you will need to have some knowledge or forethought as to how many digits you want and what you want their range to be. I want Random numbers, which means this is going to randomize over time. I don't need any Decimal Places for this particular value, and I asked the person who created this layer for me originally, what would be a good minimum/maximum value for something such as the sodium reading.

They say a good maximum might be say 160, so I'll choose that. I'm even going to rename this particular effect Sodium so I know its value relates to the Sodium line in my final text. Well, my final problem is that I see my numbers, but I don't see the text underneath. To change that I need to enable Composite On Original. Now this effect will draw its result on top of the existing text layer. I scrub it into position. Actually I'm going to have it overlap my text so I can make sure I've got my Y Height the same.

That looks good. And then I'll scrub it back here in space until this X position looks correct. And I'll randomize in every frame. The default is Proportional Spacing; if I turn that off, the kerning can go a little bit wonky. You might prefer that look. I think that option of turning Proportional Spacing off actually works better with this particular font, although some of the kerning is a bit strange. If you find the spacing is too random, you can turn Proportional Spacing on and change the tracking to taste to make it look good.

That's a little bit tight. I'll change the tracking out a little bit. There we go. Now normally these numbers will randomize for every frame of your composition. If you want to slow them down, you can use an effect called Posterize Time or you can just change the frame rate of this comp. I'll type Cmd+K or Ctrl+K to open up the Composition Settings. I'll set the Frame Rate down to something a little slow, like our .8333 that we used for our wiggle speed earlier on. And most important of all when you're doing strange frame rates is you need to go underneath the Advanced tab and enable Preserve frame rate, that way you will keep this pre-comps frame rate even in the later composition.

If you do not enable this, it will take on the frame rate of your Final Comp and then you'll have these crazy fast animating numbers. I'll click OK, do a quick RAM Preview to see how I like that. That's feeling a bit slow for me, so I'm going to go back to my Composition Settings. I see it rounded .8333 up to 1 anyway; 1 is the minimum frame rate allowed in After Effects. Let's take .8333 times, let's say four times as fast, let's see how that looks.

Yeah, I think I like that pacing. So now that I've created one text layer, I can go to my next text layer, tab over its old value, go to my Numbers Effect, duplicate it, create a new copy for Glucose, change its Value range; maybe Glucose would have a maximum of only say 100, and scrub it down into position. Again, I might need to move it over or even use guides to see what is a good Y Height.

Once I've got that, I can put it back to the same X position as it was before, and things should more or less line up. RAM Preview and now we've got a couple of numbers changing. You can continue to do this for all of your values and create four comps for each of your Lab Results layers and then swap that back in for the Lab Results in your Final Comp. And I'll give you a little hint, if you don't feel like doing all that work yourself, if you dive into the Idea Corner folder, you'll find compositions that already have all of these ideas built for you.

In my final version I also decided to go down to a thinner version of Myriad Pro, just Regular, so it wouldn't look quite as heavy and dominant in the background.

Show transcript

This video is part of

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ .

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed After Effects Apprentice 16: Creating a Medical Opening Title.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member ?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferences from the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Learn more, save more. Upgrade today!

Get our Annual Premium Membership at our best savings yet.

Upgrade to our Annual Premium Membership today and get even more value from your lynda.com subscription:

“In a way, I feel like you are rooting for me. Like you are really invested in my experience, and want me to get as much out of these courses as possible this is the best place to start on your journey to learning new material.”— Nadine H.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.