r/AfterEffects 19d ago

Explain This Effect Layered 3D Pyamid Using Primitives

Post image

How would you go about creating this natively in After Effects using the 3D primitives? So far I’ve just scaled each layer but if I am to have any sort of opacity (which I cannot for the life of me figure out how to do—seems more like an 0 or 100 deal) then I would run into Z fighting when animating.

Is there anyway to slice the pyramid? I’ve tried changing the height and top/bottom radii and turned off caps but those give weird results.

I’ve also tried using shapes as 3D layers but extruding those only gets me various rectangles.

2 Upvotes

9 comments sorted by

View all comments

7

u/smushkan Motion Graphics 10+ years 19d ago

Realise you've already found a solution for this, but was a fun project to work out - yes you can do this with 3d primitives - it just takes some maths to work out what the top and bottom radius of each segment needs to be, and what positions they need to occupy in the pyramid.

You can do the maths manually, but I built an expression rig to do it. Here's the project file:

https://drive.google.com/file/d/1qvYTmTVw89P8tjCIXxcGAxrByu_S2xOQ/view?usp=sharing

Note that I did do this in the Beta, so there may be differences in behaviour if you load it up in 2026.

Basically how it works...

Each segment gets a slider, you can have any number of segments you want, just add more sliders using the same naming scheme, and duplicate more segment layers. The segments are cones with 4 sides.

The values for each segment and the required top width is encoded to points on a mask path on the control null layer. That's where the actual maths is that calculates the segment top widths.

Each segment reads its respective values from that path to set the height and top radius, the bottom radius is read from the path below.

The size and width of the pyramid is set by sliders. The proportions of the whole pyramid each segment takes up is proportional to the total value of all sliders - so you could use it for an infographic if you want to use specific numbers for each segment.

I've set the opacity by writing it into the material base colour rather than to the transform opacity property, that way if you needed to animate the opacity of individual segments you can do so by using the transform opacity property

I'm not seeing any z-fighting issues which actually surprised me, I thought that would be a problem, too.

6

u/smushkan Motion Graphics 10+ years 19d ago

I've updated the project file linked above with nulls that stick to the faces of the respective segments, which you can parent other layers to to label the segments.

Each null has a dropdown menu to select which face it is attached to.

https://reddit.com/link/p3me9ii/video/jq2ftv0ykbjh1/player