So I found a little info....These functions (at least the box creator) are from Digital Anarchy. I create six shape layers in 3d select them and run the box creator. It's a liitle hard to figure out but.... The function works in 2014 but seems to be broken in 2015 (big surprise) and returns an error.

I have been debating about giving this away but I have decided to do so. I hope you enjoy. I call it boxMaker.ffx .

Here's how it works. You start by creating a minimum of 1 or as many as 6 comps. The comps are the size of the sides of your box. If you just create one solid it must be square. If you create 2 then they can be rectangles. Three may be the most often used combination of comps.

For example, if you want to create a box that is 800 X 200 X 500 then the front and back comps would be 800 X 200, the left and right side comps would be 500 X 200 (matching height) and the top and bottom comps would be 800 X 500 to match the width of the front and the width of the side. This complies with the way a standard box is measured.

Inside each of these comps you put a background (preferably a shape layer or a vector object so you can collapse transformations) and whatever else you want to create the artwork for the sides of your box. You make all of the layers 3D. You separate the layers above the background by subtracting one pixel in z from each to avoid unwanted rendering problems.

When each side and the top of the box is created you create a new comp which I like to call box. It doesn't matter what size this comp is but it should be at least big enough to include all of the layers so you can see what's going on. Each of the custom comps you have created for the sides are added to the timeline. You arrange the layers like this:

Front

Left Side

Back

Right Side

Top

Bottom

The next step is to make all of these layers 3D and collapse transformations. Then you apply the animation preset I have included above.

An expression for Anchor point is added that adjusts the anchor point of each layer according to the size of the layer. An expression for Position is added to each layer that centers the layer in the comp. An expression for scale is added to each layer to make the layers 100% scale. Finally, an expression for X and Y rotation is added to each layer that appropriately rotates each layer into position to create a perfectly aligned box - as long as the layers are laid out correctly.

Here are the expressions:

Anchor Point:

if (index > 1)

L = index -1;

else L = index + 1;

z = thisComp.layer(L).width/2;

[width/2, height/2, z];

if (index > 4)

[width/2, height/2, thisComp.layer(1).height/2]

This adjust the anchor point based on layer order using simple logic statements.

Position and scale are simple. Position:

[thisComp.width/2, thisComp.height/2, 0]

Scale:

[100, 100, 100]

The magic happens with rotation. First x rotation:

i = index;

if (i < 5) 0;

if (i == 5) 270;

if (i == 6) 90

And finally y rotation:

i = index -1;

if (i < 4) 90 * i;

else 0

It's pretty easy to figure out how the logic works in these expressions.

Once the Box layer is assembled you nest that in your main composition and collapse transformations. Now here comes the trick. You make the nested Box comp 3D. Now you can position it anywhere in 3D space, animate it or fly the camera around the nested comp. It acts in every way like a real 3D cube in your comp.

Here are some screen shots using three comps for the sides of the box:

NOTE: this is Custom View 1 to show how the Box comp is created:

And here's the project file: boxMaker.aep and the Animation Preset: boxMaker.ffx (note, your browser may add a .txt extension to the files - if it does just remove it)