Expression Question

aftereffects
tips-and-tricks

#1

Hi, I am working on an AE template and I need to control the opacity to the shatter effect which accept values only between 0 and 1.
What I need is to use a scale of 1 to 100% instead of 0 to 1.
Maybe I need to multiply values any idea?

Thanks


#2

If you connect the opacity value to a slider control and multiply by 0.01, you’ll be able to control the opacity via the slider with 1-100 scale.


#3

Thanks for your time unfortunately I don’t know how to add that extra “multiply” line so that I got the desired result.
What I mean is that I have already setup the slider 1-100 bit only 0-1 is affecting the opacity!
Can you help with the multiply addition please?

Thanks


#4

Well, just add * 0.01 to the end of the line you get when you pick-whip the slider. Example:

comp("Comp 2").layer("Gray Solid 1").effect("Slider Control")(1) * 0.01;

Let me know if that’s clear enough. :slight_smile:


#5

WoW worked !!! Respect !!! :slight_smile: