Effect that takes place

I came across an animation illustrating a series of diagonal lines takes place as a fan. The work is pretty simple, but I didn't know how to build this legacy and I was wondering if there could be an expression to create this kind of effect.  I appreciate any suggestions.  Here is the link below for the animation.

IRA

http://www.mediafire.com/file/36y0yi88mnh42vk/unfold%20effect.mov

It's just an exercise in basic mathematics. If you place a control slider on a layer zero, and then use the index (the number of layer) as a multiplier you can fan the layers by simply adjusting the slider. Add to this an if else statement to count the number of layers and stop to increase the angle when the circle is filled and you have the solution.

If you put the layer zero with the slider at the bottom of the layer stack this expression should work for you:

ctrl = thisComp.layer("Null 1").effect("Slider Control")("Slider");
numSeg = thisComp.layer("Null 1").index - 1;
val = 360 / numSeg

if (ctrl < numSeg) {
     mult = (ctrl * (index -1))*(val)/numSeg
}
else if (ctrl >= numSeg) {
     mult = (index * val)
}
value + mult

CTRL is the value of the slider control

numSeg counts the number of layers of line in the model by subtracting 1 by the number of layer from the layer of null (null must be down)

Val calculates the angle between the layers when they are uniformly distributed in a circle

If the statement indicates whether the CTRL (value of the slider) is below the number of segments can multiply the value of cursor multiplied by the number of layer 1 (so the top layer does not turn) and then divide this value by the number of segments.

The other if the statement indicates if the value of the slider is equal or greater than the number of layers, rotate the layer by layer number multiplied by 360 divided by the number of layers. This evenly distributes the layers around the circle.

The value + mult to the end just says take the initial rotation value and to add the new value of the rotation of this layer. This works if you set the rotation angle of the departure first layer. If you want to control after duplicate layers then replace the 'value' with the expression angle controller.

All you have to do to make this work is to set the anchor point to one end of a line segment, add a cursor of expression to a null value, put nothing down, then add the expression to the line layer and duplicate as many times as you want.

Tags: After Effects

Similar Questions

Maybe you are looking for