Random X Z but all same Y
Here’s a hack from a Colin expression, on the position of a 3D layer (Alt click the Position Stopwatch then Paste in the expression):
minX = -500;//Minimum x depth value
maxX = 1000;//Maximum x depth value
minZ = -500;//Minimum z depth value
maxZ = 2000;//Maximum z depth value
seedRandom(index, true);
x = random(minX,maxX);
z = random(minZ, maxZ);
[Math.round( x), position[1], Math.round( z )]
Change the numbers (pixels) to spread or narrow the field, you could set up a slider on a null and easily change the spread. The Z is -500 so it falls in front of the default camera.
Here’s Colin’s original post, it was for Random Z:
https://forums.creativecow.net/cgi-bin/new_read_post.cgi?forumid=2&postid=879394
—————–
And here’s one from Dan with a range for the Y axsis:
Dan Ebberts – 12:43pm Aug 3, 06 PST (#1 of 1)
Something like this should get you started:
minX = 0;
maxX = thisComp.width;
minY = 0;
maxY = thisComp.height;
minZ = 0;
maxZ = 1000;
seedRandom(index,true);
random([minX,minY,minZ],[maxX,maxY,maxZ])
Dan
NOTE: YOu just need to Apply the expression to one 3D layer, select that property (Position)then Edit>Copy Expression Only…
Then select all the other layers you want distributed, and Paste.