Skip to main content
analytical_creator15B9
Participant
June 12, 2019
Question

Flipping a 3D Triangle on all 3 of it's sides.

  • June 12, 2019
  • 2 replies
  • 1599 views

Hi all,

I'm hoping someone will pop up to tell me this has an incredibly simple solution that I'm overlooking.

We have a project where a 3D triangle tile needs to flip over in multiple directions from each of it's sides.

It also needs to have an image layer precomp for both of it's faces.

Using a 3D triangle shape layer its easy enough to make 1 filp with an anchor point set at one side, however I cant work out how to then flip over from any of the other sides in a different direction. I've tried 3D Nulls as anchors but they don't follow the original shape after a rotation to make multiple flips on a continued path possible.

Basically I need a dynamic anchor point?

Any help with this, or just telling me that AE is not the tool for this job would be appreciated.


Thanks

    This topic has been closed for replies.

    2 replies

    Community Expert
    June 12, 2019

    There are two options. The first is to simply use the Pan Behind tool (y) to move the anchor point between rotations and then animate position to counteract the movement when the anchor point is moved.

    For example: Create a Polygon, change the number of sides to 3, Adjust the radius to give you the size you want, convert the Polygon to a Bezier path, make sure snapping is turned on, use the pan behind tool to move the anchor point to the bottom right corner of the triangle, then set a keyframe for rotation. Here comes the repetitive part:

    • Move down the timeline 20 frames and set the rotation to 120º
    • Set an anchor point keyframe and a position keyframe
    • Move down the timeline another 20 frames
    • Grab the Pan Behind tool and slide the anchor point along the bottom of the triangle until it snaps to the next vertex
    • Set keyframes for position and rotation
    • Move down the timeline 1 frame and use the Pan Behind tool to move the anchor point to the next corner
    • Set position and rotation keyframes
    • Repeat as necessary

    The timeline would look something like this:

    Here is a project file: Dropbox - Triangle Wheel.aep

    The other option is to use an expression to basically do the same thing. You don't need to convert the triangle to a bezier path, but you will need to access the outer radius to figure out how long each side is.

    I don't have the expression handy and I don't have time to write it out and test it this morning but here's how to rotate square wheels. I  made this post back in the CS3 days... Square Wheels

    If my day slows down I'll try and post the expressions that you would need to add to anchor point and Position. With the expression method, all you have to do is to animate rotation and the triangle will move along a straight path.

    If that is not what you want to do then please give us more details.

    analytical_creator15B9
    Participant
    June 12, 2019

    Hi Rick, Thanks for your reply.

    That method looks good for a 2D shape, but i'm not sure that I could apply that to a 3D axis?

    Please see the effect I am after below. My shape is fine rotating on the first axis but I need to be able to also rotate in the direction of the other 2 sides/axis. This way the shape can flip it's way across the floor in all directions. Hopefully my gif makes what I'm trying to do clearer. Thanks for any assistance with this.

    Community Expert
    June 12, 2019

    It's the same procedure for keyframing. You'll just need to set keyframes for X, Y, and Z rotation. The big trick is using the Pan Behind tool and setting keyframes when you rotate then moving forward 1 frame and setting new keyframes.

    This took about 5 minutes: Dropbox - Triangle Wheel v2.aep

    Open up the project. It flips from right to left, then moves back in Z, then rotates 30º and spins in comp-space Y on the vertical side.

    Inspiring
    June 12, 2019

    Without screenshots it's hard to tell what you're working with. When you say a 3D triangle do you mean a flat triangle in 3D space, or is it more like a pyramid? I'm leaning toward the first because you said "both" faces, but it would help to be on the same page.

    As for a dynamic anchor point, if you wanted the triangle to rotate from different places you have a couple options.

    1) Change your Anchor Point right before each move by keyframing (with Hold keyframes just to be safe) both the Position and Anchor Point properties to move it to a new location.

    2) Option one works but can get super annoying, so instead make multiple nulls. Place one null at each corner or point you want to flip from and instead of animating the parameters of your triangle you have multiple nulls with animation. This gives you the most flexibility and control. It also means that adjusting one null's parameters won't screw up the animation created by another one.

    analytical_creator15B9
    Participant
    June 12, 2019

    Hi thanks for replying David,

    Yup I'm talking about a flat triangle in a 3D space. I did attempt 3D nulls for rotation anchors as per the below screen shot:

    However once a rotation has been made the other nulls that are not parented up through the layers are still in their original position.

    Meaning I couldn't then use that null to rotate in from the same face again. I need all of the nulls to follow the triangles rotation. 

    This is where I come unstuck, and I presume that I am missing something very simple.

    Thanks for your help.