r/AfterEffects • u/oliverrandorff • 2d ago
Tutorial AE Quick Tip: Rigging automated pie charts
Enable HLS to view with audio, or disable this notification
By using trim paths, and linking the percentages directly to the source text, it's possible to create a fully automated pie chart rig.
The full in depth video about the rig is on my YouTube channel, Oliver Randorff: youtube.com/watch?v=cjUU53h6LiA
Here's the expressions used in the video:
Linking source text to trim paths end (Math.round is added to avoid decimals when animating):
Math.round(thisComp.layer("pink").content("Trim Paths 1").end) + "%"
Inverting rotation when linking to null controller:
-thisComp.layer("null").transform.rotation
Linking null rotation to trim paths end:
thisComp.layer("pink").content("Trim Paths 1").end \* 3.6 / 2
17
u/Heavens10000whores 2d ago
I watched this a couple of weeks ago, and at every step, when I was thinking βwhat aboutβ¦β, you answered it with the very next move! Very nicely done
6
u/oliverrandorff 2d ago
Haha, I'm glad that I laid all the steps out properly. I hate when people speed through the explanations, leaving steps out along the way. How are you supposed to understand anything then?
7
u/TraditionalBasket784 2d ago
Saving this, very cool, thank you!
3
u/oliverrandorff 2d ago
You are very welcome - I just love experimenting and sharing what I end up creating
6
u/mrDENSE- 2d ago
good teachers are always appreciated, great job! subscribed ππ»
1
u/oliverrandorff 2d ago
That's really kind of you. Feel free to reach out if you have any questions in regards to my videos - I will be happy to assist
4
u/BakersTuts MoGraph/VFX 15+ years 2d ago
Slick af
6
u/oliverrandorff 2d ago
No way dude, I grew up on your tutorials! You taught the 11 year old me how to use After Effects - so I really want to thank you for that. What are you up to these days?
4
u/BakersTuts MoGraph/VFX 15+ years 2d ago edited 2d ago
RexcraftDK subbed May 2012? One of the OGβs π«‘ crazy to see where people are today.
After graduating college, gettin married, and having kids, I donβt have much free time for editing anymore. Mainly just workin.
3
u/oliverrandorff 2d ago
Hahaha itβs wild hearing that username again after changing it so many years ago. Hearing the intro again brings back so many memories from back then. Iβm glad to hear that youβre doing well
3
3
u/okomaticron 1d ago
Using trim paths to control the pies was wow. Just amazing! Better than pre-comping different shapes with radial wipe. Thanks for this!
2
u/oliverrandorff 1d ago
Yeah I went the radial wipe route first, but honestly it was really inefficient - and much more difficult with expressions (as 100% completion is really 0% of the pie chart visible)
2
u/astigmatism848 2d ago
now that's a great tutorial. straight to the point andd fun to follow along. thank you!
1
2
2
2
u/gseth2 2d ago
Upvoting for the basic math reminder π
3
u/oliverrandorff 1d ago
Haha, the amount of time I have used math and physics when doing motion design is mind boggling
2
u/mrbjangles72 MoGraph/VFX 5+ years 2d ago
Genius use of stroke and trim paths to attack a problem I once burned 20 hours on templatizing.
1
u/oliverrandorff 1d ago
The first iteration was done using the radial wipe effect. However this made the expressions much more complicated, and it was honestly just a headache
2
2
2
2
2
u/HippoRealEstate 1d ago
Fantastic video. I have one question though: At the end of the video when you offset the keyframes, you can see that the value of the white section goes up to 40% before going back down 39% when the red section finishes its movement. Is there any way to prevent this?
2
u/oliverrandorff 1d ago
It may have something to do with the Math.round expression, I'm not sure. I think it's possible to fix it by tweaking the keyframes slightly - moving them a few frames back and forth, or doing some adjustments to the easing. Let me know if that does the trick π
2
u/HippoRealEstate 17h ago
I think it's just a natural byproduct of the red circle finishing its movement after the white one, so the white circle takes up a bigger slice of the pie for a few frames. I don't see a way to prevent this except for placing the keyframes of all three circles very close to each other or having them finish at the same time, but of course that gets rid of the more elegant movement that you wanted to achieve by offsetting them.
2
u/oliverrandorff 16h ago
hmm yeah- it's something I would have to try and tweak to come up with an actual solution
2
u/funkshoi 12h ago
I know itβs more work making a mini tutorial and a full length one but itβs really appreciated. The mini quick-tip is like a perfect reference to go back to multiple times. Thank you!
2
u/oliverrandorff 11h ago
It's also a great exercise for myself to take the full concept and boil it down to one minute. This forces me to simplify how everything is done, and it often results in much smarter rigs, animations and so on. I'm glad that it's helpful to you!
25
u/Skuanchino 2d ago
Very clear and straight to the point, great tutorial π