ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Random population people icons on map

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Dax Castro
Random population people icons on map
on Apr 16, 2018 at 6:44:25 pm

What I am looking for is a script that will enable 50-100 people icons pop up on a map. Would love to be able to have them at random scales between two values. I know there are lots of posts about random placements, but I cannot find one that particularly fits my case and I am a script idiot so I am reaching out.

Right now I just have a pre-comp with an icon in it that just scales in. Basically pops up/appears.

This voiceover might better help give you a mental picture of what I am going for.

"The population of Nebraska has grown from 2million to 20 million in the past 5 years"

The people just seed in random areas at random scales.

Thanks for the help in advance.

Dax


Return to posts index

Dan Ebberts
Re: Random population people icons on map
on Apr 16, 2018 at 7:03:14 pm

These might get you started:

// scale
minScale = 50;
maxScale = 150;
rampTime = .25;
seedRandom(index,true);
s = random(minScale,maxScale);
ease(time,inPoint,inPoint+rampTime,[0,0],[s,s])

// position
minX = 0;
maxX = thisComp.width;
minY = 0;
maxY = thisComp.height;
seedRandom(index,true);
random([minX,minY],[maxX,maxY]);

Dan



Return to posts index

Dax Castro
Re: Random population people icons on map
on Apr 16, 2018 at 7:15:50 pm

Good to know I was on the right track. the second part of your script was one I was playing with but couldn't get it to produce any animation. I put the expression in the position layer, right?

Thanks for the quick reply!
Dax

Dax


Return to posts index


Dan Ebberts
Re: Random population people icons on map
on Apr 16, 2018 at 7:20:24 pm

Yes, it's a Position expression. What kind of animation are you looking for?

Dan



Return to posts index

Dax Castro
Re: Random population people icons on map
on Apr 16, 2018 at 7:28:20 pm

I created the effect manually but figured there had to be a way to script it. This is what I did manually.







Dax


Return to posts index

Dan Ebberts
Re: Random population people icons on map
on Apr 16, 2018 at 7:33:16 pm

I don't see any position animation, but it looks like the scale expression needs a random delay:

// scale
minScale = 50;
maxScale = 150;
maxDelay = 1;
rampTime = .25;
seedRandom(index,true);
s = random(minScale,maxScale);
d = random(maxDelay);
ease(time,inPoint+d,inPoint+d+rampTime,[0,0],[s,s])


Dan



Return to posts index


Dax Castro
Re: Random population people icons on map
on Apr 16, 2018 at 8:00:00 pm

The goal would be to:

1. Set 1 comp "person"
2. Appy Script that
- Randomly populates the entire page (I can apply mask to manipulate where it shows up)
- Randomly sets delay so the appearances stagger.

Sorry I am doing a terrible job at explaining the goal.
Hopefully that helped.

Thanks!
Dax

Dax


Return to posts index

Dan Ebberts
Re: Random population people icons on map
on Apr 16, 2018 at 8:37:09 pm

Ah, sorry. I thought you were looking for expressions. That's a little trickier, especially the masked area part. Certainly not something I can just post off the top of my head.

Dan



Return to posts index

Dax Castro
Re: Random population people icons on map
on Apr 16, 2018 at 10:16:28 pm

No worries. The mask part is easy. I would just pre-comp that layer and apply a mask. Basically, I am looking for a script to fill the screen with a specific symbol of random sizes and random appearance times within a specific time range.

"Fill up the screen in 5 seconds with X copies this specific image and vary the scale from 30-70% of actual."

Hey Dan, just wanted to thank you for being so responsive to everyone on the board. You really have helped me learn many new things.

Thanks
Dax

Dax


Return to posts index


Dan Ebberts
Re: Random population people icons on map
on Apr 16, 2018 at 11:12:54 pm

It sounds very straightforward. Hopefully someone has time to crank it out for you.

Dan



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]