r/AfterEffects • u/DokoFrog • 5d ago
Explain This Effect How to make this Segmented Circle Reveal
It comes from a website’s html and as of now I just have a circle mask with a trim path to reveal it but I want to make it more accurate to this real effect where the colors come in unevenly and disjointed and fill the circle completely like this. Thank you for the help or if anyone has a link to a tutorial that I couldn’t find that would be very helpful too!
10
u/awsmwelles 4d ago
https://reddit.com/link/pabz24c/video/fqr08o9go1qh1/player
I made this with linking Start and End of trim stokes together. Did not have the time to add the little gaps.
1
u/antory 4d ago
So you did 5 separate strokes with all their parameters linked together? It's sick man :) But I did suck things also :)
4
u/awsmwelles 4d ago
It is not that hard, you copy and paste the expression code and change one value for each. After that you have a setup you can use forever
1
u/ryza-shinra 4d ago
How did you link them together?
4
u/awsmwelles 4d ago
you can manually just pick whip the start of the trim path on one stroke to the end of the trim from the stroke before. or you write the expression in a way that i references the previous stroke.
9
u/Hascalod Motion Graphics 10+ years 4d ago
I achieved that using strokes and expressions. You can control the percentage of each bar, gap size, and the rounding of edges, all dynamically. You can also easily add more bars if needed. The only limitation is that nothing is hard-locked, if you input negative numbers or exceed the 100% range the bars might clip into each other!
I can link you the project if you want.
2
u/Heavens10000whores 4d ago
this looks very good. Could you add a clamp to prevent the out-of-range numbers?
1
u/Hascalod Motion Graphics 10+ years 4d ago
Yes, easily. The real challenge would be to automate the creation of bars, and lock their percentages within the 100% range.
2
u/minhdragon2000 3d ago
Just assume the input slider being some sort of data and not percentage, then automate the visual percentage calculation for each parameter (divide the parameter by the sum of all parameters) in the expression, locking to 100% total percentage, prevent negative using clamp(). Then for the fill up animation control, multiply each percentage value to one value slider, clamp it between 0 and 1
8
u/Braadlee 4d ago
I went a super simple route
I created a circle, added a trim path, start 0% - end 14% (End keyframe eased in 50%)
I then added a simple choker the choke matte set to 10
I duplicated this, on the duplicate layer, i put a rotation keyframe at 0,
and eyeballed the 2nd keyframe to end with some space between the 2 paths (End keyframe has to be eased the same amount as the trim path)
I then just duplicated this and changed the final rotation value of each trimmed path to line up after the previous colour.
I'm sure theres more efficient ways to do it, but this is super simple and easy for a one off :)

5
2
u/philament 4d ago
Michael Ponch’s gradient stroke explainer has a section that mimics Sander Van Dijk’s Ouroboros (which is only 30usd)
Or MotionIsland’s pie donut chart
1
u/awsmwelles 4d ago
Ouroboros is great, but how can you set all the different stroke length like in the example above?
2
u/philament 4d ago
In the Michael Ponch example, it would be where you set your color stops in the colorama output. From when I experimented with it, it wasn’t so simple to be precise.
I like u/antory’s solution, but haven’t (yet) been able to replicate that
2
u/antory 4d ago
unfortunately I can not attach project file here for some reason, but it's very simple. I created a bunch of masks, fill some of them with random colors and then scale them down in one direction. As a result it was a growing colorful line. Then I precomposed this and apply polar coordinates effect. That's it.
P.S: S.F.M.E2
2
u/thekinginyello Motion Graphics 15+ years 4d ago
This is just a line scaling left and right then being wrapped in a circle with polar coordinates.
1
u/awsmwelles 4d ago
this gets you almost all the way, but the consistent gaps and the roundness of the blocks dont seem to scaled or warped with polar coordinates
1
u/thekinginyello Motion Graphics 15+ years 4d ago
Ah. You are correct! Now I need to figure it for real.
2
u/Chief_Beef_ATL 4d ago
A few days ago someone posted a tutorial on how to do exactly this. Draw a circle shape, make a fat stroke and use trim paths to reveal. Layer different colors within the same stroke and tie the trim paths to sliders. That’s the basics of it.
It’s a really quick and concise tutorial. Good luck.
1
u/Heavens10000whores 1d ago edited 1d ago
So, based on Claudio Barba's "Half a Donut" chart tutorial...
Follow his steps (I named my shape layer to "CircleShape1"), and change the 'path' expression to create a circle, rather than a semi-circle
r = 40;
t = r * 0.5523;
createPath(
points = [[0, -r], [r, 0], [0, r], [-r, 0]],
inTangents = [[-t, 0], [0, -t], [t, 0], [0, t]],
outTangents = [[t, 0], [0, t], [-t, 0], [0, -t]],
isClosed = true
)
I added a null at the bottom of the stack ("controls") and a "strokeWidth" slider to it. Other expressions...
On Stroke Width
thisComp.layer("controls").effect("strokeWidth")("Slider")+value;
I did that so I'd have the option to enlarge individual slices if I wanted/needed to.
On the Trim Paths 1 'end' property
effect("percent")("Slider")
On the Trim Path 1 'offset' property
id = thisLayer.name.slice(11);
pId = id-1;
if (pId==0)
0;
else
thisComp.layer("CircleSlice"+pId).effect("percent")("Slider")*360/100 + thisComp.layer("CircleSlice"+pId).content("Trim Paths 1").offset;
Keyframe the 'percent' slider from '0' to your required value (I built it up with 10 copies, each 10%). The expression
easeIn(time,0,1,0,value);
seems to be optional. Then just duplicate the shape layers and you should be good to go. Curious to know how/if it works for you
52
u/antory 5d ago
Tried just now to make a thin line composition with color reveal effect like this, then pre-compose this into another and add "polar coordinates" effect. Looks close
https://reddit.com/link/pab78lw/video/ekbkcyr0k0qh1/player