Breaking down three different ways to control the visibility of layers by adding an expression to the opacity property. All three methods provide you with easy to apply transitions. 
Fade based on position keyframe
The first example is controlling when a layer shows up so that you can quickly highlight part of the screen just by setting the position. 
Fade based on in-point and out-point 
When you add a layer to your timeline, have it fade in and fade out without setting keyframes, just let the in- and out-points be the trigger. 
Fade in and out by layer marker
Imagine you want to set a layer to appear, then disappear repeatedly. With this example, I use even numbered layer markers to trigger the opacity to go from 0% to 100% and odd numbered markers to do the opposite. Working out which is odd and which is even is incredibly simple, thanks to the remainder operator (%), but don't worry if you're unfamiliar with that, I break down how it works.

You may also like

Back to Top