The clone stamp tool is perfect for this. Each clone gets its own Transformation parameter that can you keyframe in the timeline for your layer, for example: Effects -> Paint -> Clone 1 -> Transform: Clone 1. For the properties you want to be random you can include a random expression. Here are three for position, scale, and rotation. If you don't like the random value they select for any given property then change the first parameter to seedRandom from "1" to a different value.
seedRandom(1,true); var randomX = random(0,1000); var randomY = random(0,800); [randomX, randomY];
seedRandom(1,true); var s = random(20,200); [s,s];
seedRandom(1,true); var r = random(0,360); [r];
If you want to make these expressions configurable you can drop some Expression control sliders onto your layer (or a new null layer) and link the parameters to random() or seedRandom() to those sliders.
You can draw a cartoon star like that very easily with the shape tools and then use repeaters and other shape tool functions to randomly position them around the scene. You can even have randomly jiggled strokes on each one so that they are all different.
You know what? It won't take very long. Gimme a second.
This is done with one shape and a repeater Here's the project file
If you want to mess with the positions, rotations, etc., just mess with the relevant options under the "Wiggle Transform" property. There are all kinds of things you can do with this.
Now, you could also do something like this with expression and have a whole bunch of layers with their properties tied to expression control effects on a controller layer, but this way is much faster.
I've been away and just returned to this question. For whatever reason I couldn't get Horshack's expressions to work. I'm sure it's my inexperience in expressions. I'm going to try Szalam's project file
In any case, here's my attempt at Horshack's solution. For my own education perhaps Horshack can show me where I went wrong with the clone stamp. It did not affect my single star.
Like the random scale. Really helps with stars.
While you're at it... could you add random color. For example I would enter 4 different colors and that would be added to the overall random mix???
BTW for this project I am not going to use stroke colors. It will all be fills -- without strokes. So (for example) I can have red stars, blue stars, white stars, green stars)
If not easily done I can just use layers and give the star a different color -- using an alpha channel. Having the scaling really helps give me the randomness I need.
The expressions I provided were meant to be applied on each clone stamp's Transform property group. You've applied them to the layer's transform property group. You can get to the first clone stamp's group by going to Effects -> Paint -> Clone 1 -> Transform: Clone 1
I figured I did not put it in the correct place. I'm relatively new to AE and very new to expressions.
Hee hee. I will revisit your solution -- however at this point I'm already pretty much committed to using Szalam's solution because it's working for what I need at this moment.
You can get different colors a number of different ways. The easiest would be to just make four different star layers with the different fill colors you need and then just put a different random seed in each Wiggle Transform operator.