Copy link to clipboard
Copied
Hello all!
So cutting right to the chase -- I'm trying to create an After Effects preset which can be manipulated to suit the maker's needs.
The idea is simple:
- A circle shape layer has a 'radial wipe' effect. the value of which is tied to a slider on a null layer. The higher the slider, the larger the portion of the slider grows, so at value 50 the circle is a semi circle, and at 100, the circle is fully 360 degrees, so on so fourth.
- There is also a number text layer which increases with the same slider to reflect the percentage (out of 360 degrees) of the circle is complete. So at slider value 25, the number says 25% .. you get the gist.
Simple stuff, BUT -- here is where I'm struggling. The position of this number text layer has to change depending on the slider value too. The position of this text layer has to follow a particular circumference around the circle depending on the size of the cirlce and therefore the value of the slider. Hopefully I worded that right -- I've attached a couple screenshots. Picture 1 is where the text layer would be if the pie chart was at 25%, and picture 2 at 75%, just so you get what I'm getting at. Essentially, the text layer follows the circimference of an 'invisible' circle inside the pie chart, depending on how large the pie chart is at that point.
Hopefully I explained everything okay here! Please let me know if you need any further info .
Please let me know any soloutions you come up with guys, anything that helps I would apprecaite a ton.
All the very best!
Copy link to clipboard
Copied
As simple as working out the sinus and cosinus. Basic 6th grade math. Math.sin() for the Y, Math.cos() for the X or vice versa and some additional math to determine the start angle and angular offset. A simple web search can teach you that if you look for "targeting expression" and similar keywords.
Mylenium
Copy link to clipboard
Copied
Thank you for your kind answer Mylenium. I'll put your suggestion into action.
I'm pleased to find out that you passed 6th grade math, although, I don't remember being taught After Effects expressions, I may have to brush up on that a little!
Copy link to clipboard
Copied
What happens if you multiplied the slider value by .01?
Slider = 50
50 * .01 = .5
360º * .5 = 180º
Therefore if you set a slider to 50 and multiply that value by .01 you will fill half of a circle.
Nothing more is required.
If you want to get really fancy you can the multiple sliders together so when you change one to 25% the other one would change to 75% and everything would always equal 100%.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more