Learn how to animate a HUD (head-up-display) using different Freepik and Flaticon resources!
Hello and welcome to this Adobe After Effects tutorial where we’re going to design a user interface or Head Up Display, known as a HUD. This is very common in videogames and we’re going to create a simple animation loop to liven it up! So let’s begin. We’ll start designing and animating the central viewer. To do this, create a new composition of 700 x 700 pixels (it’s important that it’s square), that we’ll name “Central Viewer”. Set a Frame Rate of 35 seconds and a Duration of 20. The first thing we’ll do is make a circular shape that we’ll reduce the size of, about 500 pixels so it’s completely inside the composition. Modify the stroke so it’s thin and change the color to a grey tone. Once you have it, add a Trim Path to trim the shape. We trim it 70%. When we’ve done that, we just need to animate it. Select Rotate by pressing R on your keyboard and while holding down Alt click on the Stopwatch. This allows us to write an expression. In this case, we’re going to use a “wiggle”. A wiggle creates a random value. So firstly, we need to indicate the frequency we want for that random value. Open bracket and input 1, for example, and it will move once every second. And the second part refers to the magnitude, which we’ll set at 50. Close brackets and we can view the animation. As the shape is already animated, we’ll use it to our advantage. We’ll duplicate it and make it a little smaller, about 400 pixels so there’s a distance between them. Each wiggle in our composition generates different values, meaning, that even if we duplicate the layer and it’s exactly the same, the rotation values will be different. In any case, I recommend you change the values of each wiggle to obtain different movements with different speeds. For example, we could adjust the values of the wiggle in the layer we just created. We could make it move twice a second with a magnitude of 80. If we watch it now, we see the difference between the two, both in the movement and the speed. To continue with the design of the Central Viewer, we need to repeat the same process: duplicate the layer and change the size to 300 pixels. So all the circular shapes aren’t the same length, we can use the Trim Path. We can also change the wiggle. Here, we could input 1 again and change the magnitude to 100. This way the viewer has different lengths. So we just to repeat this a few times and see how the wiggles generate values infinitely. To finish our Viewer, select the Type tool to create the Cardinal Points. Write N for North using the alignment panel to center the text. Repeat for South, East and West. To animate our cardinal points, we’re going to create a Null Object. This will stay in the middle, as our composition is square. To animate it, we need to parent the four texts to the Null object and then apply a wiggle to this in the rotation. We’ll make it move 0.5 per second, so it will move once every 2 seconds; and we don’t want a very big magnitude, 10 is fine. Now when we watch it, we see how the four coordinates rotate on the same axis. The next thing we’re going to do, is create a main composition where we’ll place all the elements we’re designing. This main comp will be Full HD, 1920 x 1080 pixels. Place the central viewer we just created in the middle. We’ll continue by creating another composition of 500 x 300 pixels that we’ll call “ Bars”. With the Pen tool, create a shape from bottom to top which we’ll animate using Trim Path. Holding Alt, click on the stopwatch on “End” and insert a wiggle with a frequency of 1 and a magnitude of 40. If you preview it, you can see how it makes a small vertical movement. But as the value of “End” is 100, the wiggle is between 60 and 140, so we need to modify the value of “End” to 50 to really see all the interpolations that we created with the wiggle. When the problem is solved, duplicate this shape 20 times and place the first one all the way to the left and the last one to the right. To finish designing this bar composition, we just need to select all the shapes (you can use Shift), and using the Align tools, distribute them. If you select Horizontal align center, then our shapes will automatically distribute themselves in the composition and they’ll be animated to infinity. So we can now add this to the main comp. Place it in the bottom right hand corner and preview to see how it’s looking. The next step is to import a map that I downloaded from Freepik. Right click on the map and create a composition from this selection. This creates a composition the same size as the map. To animate it, we’re going to use an effect called “Offset”. We can find this in the effects panel and we’ll drag it to the map. Activate the animation and on the 10th second, input -1250. You see how the map moves to the left. Activate the expressions and write “Loop Out”. Open and Close brackets. What this expression does is, repeat our keyframes to infinity. And if we preview from the 10th second, we see that the animation starts over. To give it some perspective, we’re going to make this layer 3D and set its Rotation X to -30. Now, we’ll add a few points to different parts of the map. To do this, create a 300 x 300 white solid. Apply a circular mask and reduce the size. Place this on the map, and to animate it, we’ll have to create a Null object and we’ll anchor its position to the Offset animation. To do this, spread the position out by pressing P, hold down Alt and click on the stopwatch and with the spiral, drag to the “Shift Center to” animation. This way, we see that the point doesn’t advance, but the Null object moves with the map. What we need to do then, is parent the solid with the Null and then, the point moves and it’s null at the same time. Now, duplicate the solid, and as they’re anchored to the null object, we can distribute them freely around the map and the animation will remain the same. To make the map a little more dynamic, we’re going to play around with the opacity of the solids. We’re going to animate their opacity from 0 to 100 and from 100 to 0. And it repeats infinitely we’ll apply to same expression that we used for the “Shift Center to”. It’s important to bear in mind that when we apply Loop Out, the last and the first keyframe should be the same so the animation is continuous. Copy the opacity and paste it on the other two solids. What we can observe is that, once the map on the left finishes, the points don’t appear on the right. So we need to duplicate them and add the double of the width of the composition, so in this case, 2500. Preview and now you can see how the points appear for the entire map animation. Once this is done, we can place our map in the main comp. We could apply a mask or even reduce the size and place it in the bottom left hand corner. To make it look more “techie”, with the Pen tool we could delete one or two points off the map so the corners aren’t too square. Preview to see how the animation is going with the blinking points. Finally, adjust the main comp to leave a space for a new element we’re going to make that we’ll call “Infobar” of 600 x 300 pixels. In this new composition, create a horizontal shape and add a Trim Path. Apply a wiggle expression to “End” of 0.5 and 40. We’ll lower the “End” to 50 so it has enough range. Preview and see how it moves. The next step is to duplicate the same layer and delete the Trim Path. Apply a lighter color and narrow the bar about 10 pixels. Place it at the bottom to act as a guide. Finally, we need to create a text, that we’ll call “numbers” on the right of the bar and we’ll apply an expression in “Source Text” called “Math.round”. Open brackets and with the spiral, link it to “End”. Close brackets and we have our expression. What does Math.round do? It rounds up whatever value we give it. As we gave it “End”, it will round up the values of “End”. “End” is a wiggle, so we have a random value that appears depending on the movement of the bar. To finish the design, we’ll add a percentage. Put it in place and this composition is finished so we can add it to the main comp, underneath the map. So it’s coming along nicely, but you see that the map doesn’t really have a background. So what we’ll do is create a solid the same size as the composition and a bit lighter. Place it right at the bottom so it works as a background and lower the opacity to 15. You can now see the background in the main comp, just place it properly to fit in the design. We can modify the mask. And the bottom part of the comp is finished. The next step is to create a new 800 x 600-pixel composition that we’ll call “Info”. On this, we’ll write different texts that we’ll animate, for example “Fuel”. But before we duplicate, we’ll apply an animated opacity. So add the opacity variable, set it to 50 and modify the Offset. Make a keyframe at -100 and another at 100. Preview to see how the opacity moves through the letters. Apply a Loop Out to that same effect and our effect is now infinite. Now, duplicate the text and we can create different data, for example “Battery”. Duplicate again and call the new layer “Days”. Make them bigger and place them in the middle. Add a text above that we’ll call “Numbers” and apply an expression to the Source Text called “Random”. Open brackets and now we need to input two variables separated by a comma. These two variables mark the range of the random number, so our expression will give us a number between 1 and 1000. Preview and see the effects working on the text. Align with the other texts and now we can import different icons that we can download on Freepik. Like a moon, for example. Make it smaller and place it next to “Days”. Then, duplicate the layer and with Alt, drag another new icon, for example our “Speaker”. Lower it a bit. Then make a horizontal shape and add a zig-zag. Apply Smooth and adjust the size. We’ll animate it using a Trim Path and we’ll trim “Start”. Modify the “Offset”. Make it start at 0 and create another keyframe on 1. So this animation is infinite, repeat this step and apply Loop Out. Preview to see how it looks. For the Fuel icon, use a bar that we created in the bar composition. Go to that comp, copy a bar and paste it in Info. Make it smaller to adjust to the size of the text and duplicate it twice more. Move one to the left and distribute. We could make them thinner and align them with the text. For the battery, draw an ellipse, align it with the text and lower the opacity. Add a Trim path and trim 75%. The next step is to duplicate the same shape, delete the Trim Path, and we have our ellipse design. The same as we did for the other shapes, animate the Offset of the trim Path. Apply Loop out again. Now our circle rotates infinitely. Finally, align all the data and place it in the main comp. Preview and see if it works well and sits in with the rest of the compositions. Let’s make it a little bit smaller, as it’s a bit close to our central viewer. To complete the information, we could go to composition and duplicate the “Days” text and rename it “number”. Delete the “Animator” and apply the Math.round expression. In the brackets, write “time”. So the value it gives us is the time of the composition, so on the first second, it will give 1. What we’ll do is multiply by 0.5 and we’ll add 10. What does this do? It reduces time by half, so instead of second number 2, it will give us back 1, and by adding 10, we make the day start on the 10th. Close brackets. To keep adding elements, go to the main comp and write a text that says “Data”. Duplicate, move the paragrapgh to the right and place it wherever you like. You can apply an animation in the “Source Text of Time and then we’ll see that we get the exact time of the composition. To keep decorating, what we’ll do is go to the Info comp and take the “Numbers” animation. Place it on the right of our composition and reduce the size. Duplicate it as many times as you want and distribute it. To finish up, let’s add some buttons that you can download on Freepik: play, rewind, stop and pause. Place them underneath the central viewer. First the play button, make it smaller and duplicate it. Select the layer you just made and drag it with Alt so it keeps the same properties. Now, just create the rest. As a final touch, you could add a background. This is a texture I downloaded from Freepik. I’ll lower the opacity to 7% and make a dark colored background that I’ll place underneath the layers. Finish adjusting the rest of the compositions and we have our final result.
The transcript in this language is not yet available. We are working on it, please come back later!