ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Producing randomly sized squares that must correspond to an underlying grid?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Stuart Reid
Producing randomly sized squares that must correspond to an underlying grid?
on Jun 7, 2018 at 5:11:28 pm

Hello all, long time lurker, and grateful recipient of lots of second-hand information from this wonderful site!

Now, I have to produce some gfx for a company who like random squares. (!) However, these random squares have to follow some rules

1) There will be between 12-20 squares on screen at any one time, random solid colour, coming from offscreen on the y axis
2) They must never intersect but they can touch
3) They must adhere to a grid system, roughly 120 x 90
4) The squares can scale, but only after a few moments of static positioning
5) IF the squares grow, they must either
(a) scale in both x+y, by multiples of the grid
OR (b) scale in the y axis only, by multiples of the grid
6) Have a randomised time on screen, before going offscreen on the y axis

It's a head-scratcher. I've tried working with Red Giant GridSquares but after 2 days I cannot work out how to make the squares scale either/or, and scale in multiples of the underlying grid.

Any help on this would be much appreciated, thank you.


Return to posts index

Kalleheikki Kannisto
Re: Producing randomly sized squares that must correspond to an underlying grid?
on Jun 8, 2018 at 2:03:56 pm

Those requirements are going to make it tricky no matter how you approach this.

What I would probably do, if I were tasked with such, would be to animate a few single squares in their own comps, following those rules, and looping. Then duplicate into the master comp so as to get a total of 20 squares, offset the duplicates in time, change their color and possibly even time remap for additional randomness.

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

Alex Printz
Re: Producing randomly sized squares that must correspond to an underlying grid?
on Jun 8, 2018 at 6:50:24 pm

Yeah your best bet is a single precomp, with a square box falling into the center then out of the center point and not going outside the X-boundaries of the comp. Make sure they're square an a simple size (e.g., 100x100, in a comp 100x2000)

Then work on making a generator inside a master comp. make a grid generator that counts repeats/offsets inside of a shape layer based on property group indexes and numProperties, and then make duplicates of the precomped square layer base their position and scale off of those grid repeats from their own name (e.g, square-A_2). Split the layer name by the -, and then the _ to access the row and column data to represent X/Y values and times.

Then all you need to do is make a master controller with in/out sliders for times, and in/out rates. Make each layer have a random seed that is within those in/out times. Add some generator>fills or hue/saturations to each of them that are referencing the master controller. I'm not entirely sure offhand how to make sure that the grids fall in their rows in order so that they don't intersect each other in the Y-axis, but I would think that could be built into the layer names.

Good luck, going to be quite a bit of scripting and sounds like a fun project!

-Alex


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]