Mobile app version of vmapp.org
Login or Join
Jessie844

: How do I correlate different effects' values to another dynamically? So, expressions in After Effects allow you to tie the values of one object's animation to another, such as a percent meter

@Jessie844

Posted in: #AdobeAfterEffects #Animation #Effects #Mathematics

So, expressions in After Effects allow you to tie the values of one object's animation to another, such as a percent meter bar correlating to a hidden number value from 1 to 100 (see image attached, Adjustment Layer 1).

What I'm trying to accomplish is somehow tie the level of pixelation of the image (using Mosaic, more than likely) to a changing value.

Anyone know the proper math formula to write this out? First, how do I add an expression to a Mosaic effect's horizontal and vertical blocks values?

To be clear, 0 is 0% image compression, and 100 is 100% compression. I've worked out the slider and its changing values, just not the pixellation of the image.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Jessie844

1 Comments

Sorted by latest first Latest Oldest Best

 

@Jessie844

OK, I've figured it out. First, alt+click on the stopwatch icon next to the layer's value you want to add an expression – in my case, the level of Mosaic horiztonal blocks and level of vertical blocks. I added an additional adjustment layer, and change the values to go from 100 to 0 with new keyframes, instead of 0 to 100. The higher the number of blocks, the less pixellated the image appears.

Next, the expression is manipulated as follows:

Math.round(thisComp.layer("Adjustment Layer 2").effect("Slider Control")("Slider"))*5


What's happening here is the math is rounded to an integer (no decimals values), and correlates to Adjustment Layer 2's slider control values. Since 100 blocks is still very pixellated, I multiplied the value by 5 to appear more in focus. I hope this helps someone out there! :)

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme