SIGN IN
::
SPONSORS
::
ABOUT US
::
CONTACT US
FORUMS
LIBRARY
PODCASTS
BLOGS
MAGAZINE
SERVICES
NEWSLETTERS
NEWS
STORE
EVENTS
ADOBE AFTER EFFECTS:
Forum
AE Basics
AE Expressions
Tutorials
Articles
Podcasts
Motion Graphics
Training
Cinema 4D
Re: Random layer position constrained by another layer's alpha
Cow Forums
:
Adobe After Effects Expressions
VIEW POSTS
•
ADD A NEW POST
•
SEARCH
•
CHANGE FORUM
Return to Posts Index
•
Read Entire Thread
•
Reply To This Post
Re: Random layer position constrained by another layer's alpha
by
Dan Ebberts
on Jan 6, 2008 at 8:43:27 pm
This seems to work for 2D. I'm not sure how you have your 2.5 D set up, but you should be able to do something similar.
L = thisComp.layer("island");
seedRandom(index,true);
P = L.transform.position;
offset = [L.width,L.height]/2;
minPos = P - offset;
maxPos = P + offset;
while(true){
pos = random(minPos, maxPos);
if (L.sampleImage(L.fromWorld(pos), [.5, .5], true, time)[3] > 0) break;
}
pos
Dan
Return to Posts Index
•
Read Entire Thread
•
Reply To This Post
Current Message Thread:
Random layer position constrained by another layer's alpha
by Chris Coleman on Jan 6, 2008 at 8:55:38 am
Re: Random layer position constrained by another layer's alpha
by Dan Ebberts on Jan 6, 2008 at 8:43:27 pm
Re: Random layer position constrained by another layer's alpha
by Chris Coleman on Jan 7, 2008 at 1:06:47 am
Re: Random layer position constrained by another layer's alpha
by Darby Edelen on Jan 7, 2008 at 6:10:18 am
Note:
If you are a registered user and you
do not
see your name and email in the two respective fields above, you may reset your account cookies by clicking
here
. Your post
will not be accepted
if the name and email provided above are not currently registered in our database.
Name
E-Mail Address
Subject
E-Mail me when someone responds
Just This Message
Entire Thread
None
Message
Note:
The following characters are HTML command characters, and may cause parts of your post to disappear, if not used correctly: < > &. To include any portion of the post in your response, highlight the desired text and hit the "Q" key. For more on how to post,
click here
.
Add your message signature
Note:
By clicking "Post Direct" button above, you are agreeing to the Creative Cow's
Code of Conduct
.
FORUMS
•
LIBRARY
•
PODCASTS
•
BLOGS
•
MAGAZINE
•
SERVICES
•
NEWSLETTERS
•
NEWS
•
STORE
•
EVENTS
©
CreativeCOW.net
All rights are reserved.
[
Top
]