Random particle scatter
Drop a stable, reproducible position on every layer in one expression. Great for paint splatter, snow, or sparkle layouts.
“Put these layers at random positions on the canvas. Give me seed and amount controls, make it work in 3D too.”
seedVal = ctrl.effect("Seed")("ADBE Slider Control-0001");
amountPct = ctrl.effect("Random Amount")("ADBE Slider Control-0001")/100;
w = thisComp.width;
h = thisComp.height;
centerPos = [w/2, h/2];
seedRandom(seedVal + index, true);
randPos = [random(0, w), random(0, h)];
centerPos + (randPos - centerPos) * amountPct