Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Rotating a Cubic and Controling the polygon opacity

  • Rotating a Cubic and Controling the polygon opacity

    Posted by John Kevien on April 22, 2008 at 2:59 am

    I am wondering how to make it!

    A cubic rotating randomly from its center pivot,and the face(polygon) which facing to the camera become clearly(100% opacity) when it rotating toward to the camera direction. Of cause, the faces(polygons) can be seen a little(between 0 to 100%) while they can be seen by the camera.

    I hope I make my question clearly!

    And another problem. How can I make a Cubic,just using six three dimensional solid layer and then what….??

    Thanks in advanced!!

    Trent Armstrong replied 18 years ago 2 Members · 1 Reply
  • 1 Reply
  • Trent Armstrong

    April 29, 2008 at 1:34 pm

    To easily make the Cube, put a 200×200 Solid in the comp and apply these expressions:

    TO Y ROTATION:
    i = index – 1;
    i * 90

    TO ANCHOR POINT:
    w = width / 2;
    x = value[0];
    y = value[1];
    z = w;
    [x, y, z]

    *Duplicate that layer until you have the four sides of the cube. Add a camera, put it on the bottom of the layer stack, and move the camera so you can see that the layers make the cube.

    Then make two more duplicates of your Solid, remove the Y ROTATION expressions and put these two expressions in for X ROTATION respectively:

    LAYER 5:
    i = index;
    i * 270

    LAYER 6:
    i = index – 1;
    i * 90

    That’s your cube. You can change the size of your solid and it will effect the whole cube.

    As for the transparency issue …

    apply this expression to the Opacity of each of the solid layers

    delta = toCompVec([0, 0, 1])[2];
    linear(delta, 600, 1500, 10, 65)

    This whole thing obviously works best if you are using squares to build the object.

    Cheers,
    Trent

    Trent Armstrong – Creative Cow Leader
    https://www.dallasaeug.com

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy