Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects arranging vast numbers of solids easily

  • David Bogie

    October 1, 2007 at 1:43 pm

    Explore Digital Anarchy’s 3D tools.

    https://digitalanarchy.com/3Dassist/3Dassist_main.html

    I don’t own any of them but I’ve played with the free trial versions. Very cool if you need this kind of stuff.

    You can limp into it with Shatter and Card Dance. Use a grayscale map to control the z axis. It’s pretty easy.

    There are other such devices, maybe someone will post some links for you. However, 150 separate layers might not be possible with anyone’s AE tools.

    bogiesan

  • Kevin Camp

    October 1, 2007 at 7:03 pm

    i think this will work….

    first create a null layer (name ‘null 1’), add a slider control and set the slider value to around 200 for starters.

    now create your solid, make it 3d and enable expressions for position. paste this in the expression field:

    x = linear(index, 0, thisComp.numLayers, 0, thisComp.width);
    multiplier = thisComp.layer(“Null 1”).effect(“Slider Control”)(“Slider”);
    z = Math.abs(Math.sin(index * Math.PI / thisComp.numLayers)) * multiplier;
    [x,value[1],z]

    duplicate your solid 100-150 times… as you duplicate your layers the should distribute across the screen and recede in z space as they approach the center of the screen following a curve (the positive value a cosine curve). the z offset can be controlled for all layers by the null slider value.

    create a new comp, add a null (name ‘null 2’) and add a slider control to it. bring in the comp created above, enable collapse transormations (next to the shy layer control), enable expressions for position and paste this:

    spacingAdjust = thisComp.layer(“Null 2”).effect(“Slider Control”)(“Slider”);
    y = linear(index, 0, thisComp.numLayers, 0 – spacingAdjust – (height / 2), thisComp.height + spacingAdjust- (height / 2));
    value + [0, y]

    now duplicate the nested comp and the dupicates should distribute vertically, use the slider control on the null to fine tune the spacing.

    Kevin Camp
    Designer – KCPQ, KMYQ & KRCW

  • David Bogie

    October 2, 2007 at 1:53 pm

    It’s worth repeating for those of us who appreciate what you have done and have absolutely no clue what any of this means:

    [moldyboot] “x = linear(index, 0, thisComp.numLayers, 0, thisComp.width);
    multiplier = thisComp.layer(“Null 1”).effect(“Slider Control”)(“Slider”);
    z = Math.abs(Math.sin(index * Math.PI / thisComp.numLayers)) * multiplier;
    [x,value[1],z]

    duplicate your solid 100-150 times… as you duplicate your layers the should distribute across the screen and recede in z space as they approach the center of the screen following a curve (the positive value a cosine curve). the z offset can be controlled for all layers by the null slider value.

    create a new comp, add a null (name ‘null 2’) and add a slider control to it. bring in the comp created above, enable collapse transormations (next to the shy layer control), enable expressions for position and paste this:

    spacingAdjust = thisComp.layer(“Null 2”).effect(“Slider Control”)(“Slider”);
    y = linear(index, 0, thisComp.numLayers, 0 – spacingAdjust – (height / 2), thisComp.height + spacingAdjust- (height / 2));
    value + [0, y]

    This is my standard sigfile so do not take it personally: “For crying out loud, read the freakin’ manual.”

  • Kevin Camp

    October 2, 2007 at 4:12 pm

    [bogiesan] “for those of us who appreciate what you have done and have absolutely no clue what any of this means”

    i’ll try to explain it….

    x = linear(index, 0, thisComp.numLayers, 0, thisComp.width);
    multiplier = thisComp.layer(“Null 1”).effect(“Slider Control”)(“Slider”);
    z = Math.abs(Math.sin(index * Math.PI / thisComp.numLayers)) * multiplier;
    [x,value[1],z]

    the first line, x = linear(index, 0, thisComp.numLayers, 0, thisComp.width); is to establish the horizontal positioning of the layers. the linear() function allows a value (in this case the layer’s index) that falls between one set of values to be plotted based on another set of values. so it takes the layer’s index, looks at where that falls between 0 and the number of layers (thisComp.numLayers), then places the layer based on where it would be between 0 and the width of the screen (thisComp.width).

    the second line, multiplier = thisComp.layer(“Null 1”).effect(“Slider Control”)(“Slider”); is to set a mulitplier that will be used to adjust the z position and link that to a slider value on a null. linking to a remote slider makes it easy to adjust the amount of z offset of all the layers on the fly. this value will be used in the next line.

    the third line, z = Math.abs(Math.sin(index * Math.PI / thisComp.numLayers)) * multiplier; is to generate the z position of the layer. when you want curves, you’ll usually be looking at sine functions (Math.sin()). the position again needed to be based on the index of the layer but as it related to the number of layers (thisComp.numLayers), so that needed to be within the sine function. pi (Math.PI) was needed to adjust the frequency of the wave (to make the sine wave a single wave, rather than a bunch of waves). to use just the portion of the sine wave that was round (i didn’t want thesides to gradually recede) i needed to separate just the positive values of the sin curve (the top of the wave) by placing the entier sine function within an absolute value function (Math.abs()). finally, since the absolute value of the sine fuction returns a value between 0-1, the mulitplier is needed to increase that value to generate noticeable z postion offset.

    the last part, [x,value[1],z] just brings the values for x and z into a 3 demensional position vector [x,y,z] where the y is just the current value of the layer (value[1].

    for the second expression:

    spacingAdjust = thisComp.layer(“Null 2”).effect(“Slider Control”)(“Slider”);
    y = linear(index, 0, thisComp.numLayers, 0 – spacingAdjust – (height / 2), thisComp.height + spacingAdjust- (height / 2));
    value + [0, y]

    the first line is just to set a valiable for fine tuning the x positioning of the layers and link them to a slider on a null to make it easy to adjust all layers from one adjustment, very similar to what was done in the first expression.

    in the next line, y = linear(index, 0, thisComp.numLayers, 0 – spacingAdjust – (height / 2), thisComp.height + spacingAdjust- (height / 2)); the linear() function was used again to distribute the layers based on their index. similarly to the first expression it takes the layer index, looks at it as a value between 0 and the total number of layers, and then plots the position based on the comp’s height. i needed to make an adjustment for the layers height, that’s where the (height / 2) comes in. i hadn’t really needed this in the first expression, since the layer were pretty small, expanding the distribution range wasn’t that neccesary. but, when made the first comp, i had made it full size and i needed to make an adjustment to the range by a full layer height (half off the top and half off the bottom). in addition the adjustment (spacingAdjustment) needed to be factored in.

    the final line, value + [0, y] just brings the new y value in and adds it to the current position of the layer.

    i hope this helps people out… expression are really pretty cool, i just started getting into them about 6-8 months ago and really wish i had started several years ago… i had previously only used expressions for randomness (random() and wiggle()), and thought you’d have to be a programmer to do anything else. but since joining the cow last year, i’ve managed to take my 1982 6th grade applesoft basic programming skills and cow knowlege (with a few other sites, like dan ebbert’s motionscript.com and jjgifford.com) and really started having some fun with expressions.

    Kevin Camp
    Designer – KCPQ, KMYQ & KRCW

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