
1. Re: CREATING A 3D PRYRAMID (TETRAHEDRON) in After Effects
Mylenium Apr 3, 2013 7:58 PM (in response to Matt Dubuque) 
2. Re: CREATING A 3D PRYRAMID (TETRAHEDRON) in After Effects
Matt Dubuque Apr 3, 2013 8:42 PM (in response to Mylenium) 
3. Re: CREATING A 3D PRYRAMID (TETRAHEDRON) in After Effects
Mylenium Apr 3, 2013 8:48 PM (in response to Matt Dubuque)It is 3D, the comp just doesn't have a camera. The objects were meant to be used as layers in a parent comp with continuous rasterization enabled, that's why I did not add a cam. Though the expressions could be broken somehow. That stuff is so old and I seriously need to give it a second look...
Mylenium

4. Re: CREATING A 3D PRYRAMID (TETRAHEDRON) in After Effects
Matt Dubuque Apr 3, 2013 9:19 PM (in response to Mylenium)Adding a camera did not seem to help. matt

5. Re: CREATING A 3D PRYRAMID (TETRAHEDRON) in After Effects
Pierre Devereux Apr 4, 2013 1:29 AM (in response to Matt Dubuque)Hi Matt,
It seems we are traveling the 3D road together! I am appreciating your posts, and am piggybacking a lot of info from them  Thanks!
I will be getting my Trish and Chris apprentice book in the next few days, so once I get cracking on that, I hope to join the conversations with some helpfull info, and/or questions.
Pierre

6. Re: CREATING A 3D PRYRAMID (TETRAHEDRON) in After Effects
Rick Gerard Apr 4, 2013 7:02 AM (in response to Pierre Devereux)1 person found this helpfulArranging different shapes into any primitive object is nothing more than making some calculations based on the length and angle of the sides of the shape. This math can be as simple as simple addition and subtraction for a cube (see the other posts) or as complicated as this one for the radius of the circumsphere for a regular tetrahedron:
You could scratch out the numbers on a pad and then input the values manually, or you could use the index (layer number) as a multiplier in an expression to automatically calculate distance from the center of the object and orientation for any regularly shaped object that has the possibility of forming a regular polygon. The formulas you'll need are here.

7. Re: CREATING A 3D PRYRAMID (TETRAHEDRON) in After Effects
Matt Dubuque Apr 4, 2013 10:34 AM (in response to Rick Gerard)Thanks Rick, that's helpful.
First I would like to explore if I can somehow get a very close first approximation in a similar manner to how I was recently able to get my house of cards to assemble itself into the shape of a cube.
So I would like to try, as a first pass and as a lesson in getting comfortable in manipulating layers in 3D space, to use four separate views (front, right and custom 1 and 3) and manipulate the various x, y and z handles on the various layers.
But because this is not a cube, somehow I'm a little challenged as to whether to use the world axis or view axis viewing mode while doing so.

8. Re: CREATING A 3D PRYRAMID (TETRAHEDRON) in After Effects
Matt Dubuque Apr 4, 2013 10:36 AM (in response to Pierre Devereux)Hi Pierre, good decision and the accompanying 50 hours of videos they produced dovetail perfectly with the book. You might want to sample them with a 7 day free trial at lynda.com..... keep in touch!

9. Re: CREATING A 3D PRYRAMID (TETRAHEDRON) in After Effects
Klaus_Brandenburg Apr 4, 2013 12:21 PM (in response to Matt Dubuque)Basically you need to create a star shape and reduce the points to 3 in the polystar shape settings. put the anchor point exactly to the bottom of the shape and duplicate the shape three times. rotate and position your shapes so you get this baseform :
Then it's only about rotating the yellow and dark orange shapes with the same value until they meet. simple as that

10. Re: CREATING A 3D PRYRAMID (TETRAHEDRON) in After Effects
Rick Gerard Apr 4, 2013 10:06 PM (in response to Matt Dubuque)1 person found this helpfulI would not try and rotate triangles into a 3D primitive by eye. You'll never get it. It's easy with some grade school math and a null as a helper.
Try this.
 Create a Polygon any where in the comp window while holding down the shift key.
 Open the Contents of the shape layer and change the number of sides to 3 for the polystar path .
 Open up the Polystar transform properties and set the position to 0,0
Now you have a triangle exactly in the center of your comp and the base should be paralel to the X axis.
Use the anchor point tool to carefully move the anchor point to the center of the center of the base edge.
 Add a null to the comp and make both the shape layer and the null 3D objects.
Here comes the math. Wikipedia says the base to side angle for a Tetrahedron is 54.7356º. Your going to have to double that.
54.7356* 2 = 109.4712
That was the first gradeschool math.
Copy that number to your clipboard.
 Now duplicate the Shape layer, rotate it 180º in Z, select the X rotation property and paste in 109.4712.
One of the sides is now perfect.
 Parent the duplicate to the null and rotate the null 120º in Z. (Why 120º? That's more grade school math. Your shape has 3 sides. a full rotation is 360º. 360 / 3 = 120).
 Duplicate the original layer again, Rotate it 180º and then rotate in X 109.4712, parent it to the null and rotate the null another 120º in Z so that it's at 240º (that's the last grade school math you'll need to do today. If you want AE to the calculation for you you can type in 120 * 2)
 Now do it again but at the end parent all of the shape layers to the null and rotate the null 90º in X. There's your Tetrahedron.
It should take you just a few minutes. Trying to eyeball the rotation and change back and forth between world and views is going to drive you nuts.
Like I said before, Simple Math is the key to all of these things. You can do the same thing with any shape. Just look up the base to face angle and do some simple arithmetic. Use a null to help you rotate things around and you'll be done.
Work on your trig a little and you'll be able to figure the center of the of the shape, offset the anchor point by that ammount, set a multiplier by the layer index and then add that as part of your expression and you'll be able to recreate any shape you would like by simply duplicating layers.
Here's the CS6 AEP. It took me longer to write this post than to make this comp.

11. Re: CREATING A 3D PRYRAMID (TETRAHEDRON) in After Effects
Klaus_Brandenburg Apr 4, 2013 11:50 PM (in response to Rick Gerard)Just checked my project and I eyeballed my rotation to 109.5° so I guess both approaches will lead to a satisfying result.

12. Re: CREATING A 3D PRYRAMID (TETRAHEDRON) in After Effects
Matt Dubuque Apr 5, 2013 1:54 PM (in response to Klaus_Brandenburg)THANKS SO MUCH Rick and Klaus!
Back to work for me..... deeply appreciated! matt

13. Re: CREATING A 3D PRYRAMID (TETRAHEDRON) in After Effects
leelg Sep 28, 2013 10:46 AM (in response to Rick Gerard)Rick, I have tried your procedure and cannot figure out why it does not work. I am using CS3 but don't think that is the problem. Everything works fine until rotating the null layer for the third side. I have followed the procedure very carefully but have not figured out exactly how your proecedure is supposed to work. Thanks for any help.

14. Re: CREATING A 3D PRYRAMID (TETRAHEDRON) in After Effects
leelg Sep 28, 2013 1:16 PM (in response to leelg)I was able to get Rick's procedure to work by duplicating the original triangle shape layer three times right after setting the anchor point to the center of the base. The other layers need to be created before rotating the null layer.
When the null layer is rotated the original shape moves (because it rotates around the base) which requires the additional sides to be moved to overlap the original shape. Once the shapes are perfectly overlapping, rotate 180 in the Y and 109.47 in the x to add each additional side.
A real piece of cake once I understood the concept.

15. Re: CREATING A 3D PRYRAMID (TETRAHEDRON) in After Effects
KarlHugoE Sep 30, 2013 11:50 AM (in response to leelg)Hi leeleg,
I am feeling nonetoobright with this. I am trying to make the pyramid but can't sem to get the order right.
Which you mind sharing the order of your steps?
Are you rotating the null by 180 in the Y and 109.47 in the x to add each additional side?
Thank you!

16. Re: CREATING A 3D PRYRAMID (TETRAHEDRON) in After Effects
leelg Sep 30, 2013 1:48 PM (in response to KarlHugoE)Karl,
The procedure is pretty straight forward once you visualize what you are trying to do. That is the hard part.
Here is the procedure I fine tuned:
1. Turn snaps on (that kind of helps at times) and use a fairly course grid
2. Create an equilateral triangle
3. Move the anchor point to the exact center of the base (you will need to zoom in to be exact). It is easier if you keep the base snapped to a horizontal grid line. It might take some practice to see how changing the anchor point and position work in order to get precise placement. Changing the values does not snap but if you move the position of the triangle with the mouse, it will snap. I tried to keep the center of the base snapped on a vertical line but that will depend on the size of the triangle and your grid size. If you snap when creating the triangle, keeping the base on the grid and centered is easier.
4. Replicate the triangle three times (four total faces  all bases snapped and the anchor points in the center)
3. For some clarity, change the color of each face so you can more readily see what is happening and change the layer names to match. That will avoid confusion.
4. Turn on 3d for all of the faces
So what you have at this point is four identical triangles of different colors laying on top of each other. They wil look 2d even though you have 3d enabled.
Conceptially, what you are going to do next is invert one of the triangles so it is below the others while keeping your primary triangle in place. Since the anchor points are identical, changing the Z value will rotate the second triangle around the Z axis (the one pointing directly at you). The effect is just like a hand a clock going in a half circle.
5. Set the Z rotation of the second triangle to 180 (half a circle). The other triangles are still hidden behind the main triangle.
6. Set the X rotation of the second triangle to 109.47122. That will fold the side up (away from you). Imagine the main triangle is the base and the sides are being raised on the other side.
You should now have two perfectly placed sides (the one facing you and the one folded up) and the other two behind the main triangle.
Ok, here is the tricky part.
7. Add a Null layer and make it a parent to the first and second triangles. Leave the third and fourth triangles unchanged.
8.Make the null layer 3d
9. Rotate the null layer Z axis 120 degrees. That will rotate the main triangle and second triangle so the anchor point is on the upper left side. That is not a problem because all we care about are the anchor points of the remaining two triangles.
10. Move the third triangle until it perfectly overlaps the primary triangle. The anchor point should still be on the base of the third triangle.
11. Rotate the Z axis of the third triangle 180 and the X axis 109.47122. You now have three perfect sides.
12. Make the null layer a parent to the third triangle so it will rotate with the other two.
13. Rotate the null layer Z axis to 240 degrees
14. Move the fourth triangle until it perfectly overlays the first.
15. Rotate the Z axis of the fourth triangle 180 and X 109.47122
Your tetrahedron is complete.
Make the null layer a parent to the fourth triangle and you should be able to rotate the whole thing or add a camera layer to walk around it. I created another null layer and made it a parent to the first null layer and used it to reposition the anchor point so I could rotate the tet around a central axis. Getting the anchor point in the center is a bit tricky.
Hope this helps. Let me know if you find any problems with the procedure.
Lee

17. Re: CREATING A 3D PRYRAMID (TETRAHEDRON) in After Effects
leelg Sep 30, 2013 1:50 PM (in response to leelg)I should add one thing. You need to reposition the third and forth triangles because the 120 degree Z rotation is around the anchor point which shifts the position of the first and second.
lee

18. Re: CREATING A 3D PRYRAMID (TETRAHEDRON) in After Effects
KarlHugoE Sep 30, 2013 6:09 PM (in response to leelg)Thank you!

19. Re: CREATING A 3D PRYRAMID (TETRAHEDRON) in After Effects
RobertHorn2012 Feb 1, 2014 4:36 PM (in response to Rick Gerard)Rick, is it possible to use this method with a pyramid that fits HD screensthais a pyramid that is roughly 1920x1080? If so, what would I do different? And how would I approach the bottom. Thank you for all your help over the years.
Here is an example of what I'm working on.
Wide Triangle CS6 AEP https://www.dropbox.com/s/mgd324bwlr7fuzi/wide%20triangle.aep
thank you,
Robert
AfterEffects CS6

20. Re: CREATING A 3D PRYRAMID (TETRAHEDRON) in After Effects
Rick Gerard Feb 1, 2014 6:07 PM (in response to RobertHorn2012)A pyramid is not the same aspect ratio as an HD screen but you can create one as big as you want. If you make your pyramid from shape layers you can make the 3D object any size you like and the edges will be sharp. The only hard part is attaching the anchor points exactly at the edges and rotating exactly the right amount....A pyramid is actually easier than a tetrahedron. I would consider this a very basic AE project. The only skills required are parenting, simple expressions to tilt up the sides, and accurate positioning of anchor point.
3D pyramid Project (CS6) for you to enjoy...

21. Re: CREATING A 3D PRYRAMID (TETRAHEDRON) in After Effects
RobertHorn2012 Feb 1, 2014 6:49 PM (in response to Rick Gerard)Thank you, Rick. This is very helpful. What would the difference be to make a tetrahedron with the same aspect ratio as an HD screen? I would like to learn that as well. Much of my artistic focus has been an obsession with triangles lately, and I really appreciate your help and with these projects.
thank you,
Robert

22. Re: CREATING A 3D PRYRAMID (TETRAHEDRON) in After Effects
Rick Gerard Feb 1, 2014 8:42 PM (in response to RobertHorn2012)There is no way to make a tetrahedron in a 16:9 aspect ratio, but you can do the same thing, just with triangles.... A tetrahedron is symetrical so 1:1 not 16:9.
I'm not sure what you are asking. Folding up some kind of box with the sides the same aspect ratio as a screen just means figuring out the geometry and creating the sides with the right shapes.
Please post a sketch or an example...

23. Re: CREATING A 3D PRYRAMID (TETRAHEDRON) in After Effects
RobertHorn2012 Feb 1, 2014 8:55 PM (in response to Rick Gerard)Thanks, Rick. I'm gonna keep plugging away. I think you're righti just need to figure out the geometry. I think I will have it soon. Thanks, again!

24. Re: CREATING A 3D PRYRAMID (TETRAHEDRON) in After Effects
Rick Gerard Feb 1, 2014 9:27 PM (in response to RobertHorn2012)Take apart the project file I posted.... Use A triangle for the base instead of a square.
To distribute the triangles around the edge simply temporarirally parent one of the side triangles to the null and rotate it until the edge lines up.... 360/3.... simple math 120º, then remove the parent, select the next triangle, and rotate again.
It should take you about 5 minutes.
If you need to do something more like a tent with rectangular sides use the same technique. Start with a rectangle, then duplicate the rectangle, one for the left side and one for the right side, then make a triangle for the top. Set the anchor points on the edges, then add an angle control and ust the expression I posted to rotate the top and bottom side on their edge until they form a tent. Then Rotate the left and right edges up until they meet at the top, then rotate the triangle until it covers the end, grab the top vertex and move it until it touches the matching edges of the left and right sides, duplicate it and parent the triangle to the null, then rotate the null 180º and you're done.
If you don't want the to be at right angles then you'll have to make the sides a trapezoid... It will just take a little freehand work or, if you want to, some math, or some guide lines.
Here's a tip.. Hold down the Alt/Option key when you use the Shape tools to create a polygon or a rectangle and you'll get vertices... Makes things easier.
Another tip... Turn on the grid and snap to grid and use the pen tool to make your shape layers.
Spent about 10 minutes on this using your original AEP file.... It's close.