random distributed in 3d
Moderator: byronnash
-
- Posts: 1
- Joined: December 4th, 2008, 6:21 am
I need my layers random distributed in 3d space all faceing to centre. any sugestions? please help, tnx
Add a Null, make it 3D, and position it where you want the center to be (call it "Null 1").
Then apply this expression for the Position of the layers:
(this will place them randomly around the Null, at maximum distance of +/- 200 pixels in [X,Y,Z] from it)
And this expression for the Orientation of the layers:
(this will make them orient toward the Null)
Koby.
Then apply this expression for the Position of the layers:
(this will place them randomly around the Null, at maximum distance of +/- 200 pixels in [X,Y,Z] from it)
Code: Select all
seedRandom(index,true);
thisComp.layer("Null 1").transform.position + random(-200*[1, 1, 1],200*[1, 1, 1])
(this will make them orient toward the Null)
Code: Select all
lookAt(position, thisComp.layer("Null 1").transform.position)