Using some expressions, we can animate layers and modify their look, based on the transparency and colors of another layer.
Hope you find this useful. Any comments and feedback are appreciated.
📰 NEWSLETTER (Subscribe if you want access to more secrets and tools...)
https://motiongraphicsandcheese.subst...
You can also gain access to the (Super secret) Project files folder via the NEWSLETTER link above.
STUFF I USED IN THIS TUTORIAL:
Dan Ebberts site (Sample image expression):
https://www.motionscript.com/design-g...
Inertial bounce expression:
https://www.graymachine.com/top-5-eff...
FREE "knoll unmult" plugin (To remove black color):
https://support.maxon.net/hc/en-us/ar...
EXPRESSIONS:
Here we are creating a variable "layer" that refers to the layer "TEXT_Ori".
"sample" is another variable defining a 2 dimensional area, so 5x5 pixels.
"coord" is taking this layer's position and adding the position of the layer "MOVER".
And then we are using the expression "sampleImage()" to see what the main color value is at the "coord" coordinates, and making sure its sampling at the current time ("time") and that it is sampling after effects are applied ("true"). This should be applied to a property with a color E.g. Tint, Color control, CC toner, etc.
layer = thisComp.layer("TEXT_Ori");
sample = [5,5];
coord = transform.position + thisComp.layer("MOVER").transform.position;
layer.sampleImage(coord, sample, true, time)
This one is similar to the previous one, but here we are saving the information returned by the "sampleImage()" expression. Then we are creating a static random seed, based on the index of this layer, and right after, the "r" variable that is giving us a random value between 0 and the value we specify in the Slider effect, on the "CTRL" layer.
We then use the value from the "A" variable in a "linear()" expression, so that we can have the scale of this layer dynamically change, based on the alpha of the pixels bellow it. We are looking at "A[3]", which is the alpha channel value in a RGBA array, and saying: if the alpha here is zero, then be zero scale, but if alpha is 1, then be scale 42. And since we are using the "linear()" expression, its interpolating from 0 to 42 dynamically. Eg. if alpha is 0.5, then scale is 21.
At the end we are adding some randomness to the scale, by adding "r" in both X and Y values, so that each layer has slightly different scale:
layer = thisComp.layer("TEXT_Ori");
sample = [4,4];
coord = transform.position + thisComp.layer("MOVER").transform.position;
A = layer.sampleImage(coord, sample, true, time);
seedRandom(index, true)
r = random(0,thisComp.layer("CTRL").effect("Scale Random")("Slider"));
linear(A[3], 0, [42,42]) + [r,r]
This is a simple expression that looks at the scale of this layer, and uses an if/else statement to change the value.
So if scale X ("A[0]" ) or ("||") scale Y ("A[1]" ) is less ("<") than zero, than be zero, otherwise ("else") be 100. This expression was applied to opacity:
A = transform.scale;
if(A[0] < 0 || A[1] < 0){0}else{100}
Chapters:
00:00 Intro
00:14 Creating the text
04:59 Creating the grass
10:46 Grass color expression
15:26 Grass scale expression
21:15 Grass rotation expression
22:52 Grass opacity expression
25:11 Creating the drop
30:10 Animating the drop
33:24 Animating rest of scene
35:07 Text details
HARDWARE I USE.
These are affiliate links. (So, I would get a small percentage of the sale)
I would never recommend something that I don't use and like myself.
Wacom Tablet. I have always loved the Wacom Intuos tablet, both for drawing and general work. And looking cool.
US https://amzn.to/48Wu6Mk
UK https://amzn.to/47XGES6
DELL Color accurate Screen. Ensures your videos live up to your high standards.
US https://amzn.to/3vOHF1v
UK https://amzn.to/47QFPKY
Blue Yeti Microphone. Makes you sound more professional and...delicious
US https://amzn.to/3Og672k
UK https://amzn.to/3w1kscn
Sony Headphones. Comfortable for long time and great sound.
US https://amzn.to/48PDq4t
UK https://amzn.to/3vTRAmw
Corsair Mouse. Precise and I can change sensitivity.
US https://amzn.to/4bfqPcj
UK https://amzn.to/4b6mGHA
Nitro Chair. Comfortable and good lumbar support.
US https://amzn.to/4bhmFAE
UK https://amzn.to/4bbV2sS
Tags:
#tutorial #aftereffects #animation #expressions #procedural #text #effect #rig #setup #plant #grow