Joe Clay | Dec 15, 2017
This week we look at a useful way to map a precomp's frames to its position on screen. This allows us to fake a 3D rotation as things move across screen. You basically animate shape layers to the extreme positions, add our expression, and you're done. You can also do this with 3D layers. Just rotate them a little bit and bring them in. In this example I animated the trees by putting a null in the middle of them, parenting a camera to that null, and then rotating the null 60° over 180 frames. Then, back in After Effects, you can either parent these layers to a null and animate the null's position or just animate their position directly.
//Remap time to rotate house as they dolly by s = this.source.name; end = comp(s).duration; x = this.toWorld(this.anchorPoint); linear(x,2052,-152,0,end);
This was changed from the version in the video where the duration of the layer was hard coded into the expression. This will grab the duration of the layer from its source precomp. That should allow the precomps to be at a different frame rate from the main comp if that is desired.
If you have any questions, ask them. If not, see you next week!
Become a Patron
If you'd like to help support Workbench, check out our Patreon page. Thank you for even considering clicking this link to support what we're doing. We appreciate it. Patrons get all sorts of benefits, from additional files to early product releases depending upon the tier.