• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Highway Traffic Simulation

Community Beginner ,
Feb 06, 2017 Feb 06, 2017

Copy link to clipboard

Copied

Hello there. I'm working on a project in which I am animating a highway filled with cars. (For your convenience, I have included a style frame. You'll notice the cars are on the left side of the rode because my client is British.) Besides animating each car individually, is there a more economic way of populating the highway with flowing traffic? I welcome your ideas. Thank you.

highway.jpg

Views

1.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Enthusiast , Feb 07, 2017 Feb 07, 2017

You could select multiple cars then move them to animate them together (ie. move multiple cars in one go). Another idea: maybe a null layer with all the cars that are going in a straight line in one direction (set all of them to have their parent the null layer). That should also allow you to slightly vary the individual car speeds I think (ie. alter a few frames for individual cars, but move all that are going in a straight line with the null layer?).

Another idea: (maybe a bit like Szalam's sug

...

Votes

Translate

Translate
LEGEND ,
Feb 07, 2017 Feb 07, 2017

Copy link to clipboard

Copied

You could look into using a particle effect of some kind.

Particular lets particles follow motion paths.

Foam lets you dedicate pathways too with a grayscale map to reference (precomposed, of course).

Alternatively, you could animate one car on each path and use an expression like this to make a bunch of other cars follow it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Feb 07, 2017 Feb 07, 2017

Copy link to clipboard

Copied

You could select multiple cars then move them to animate them together (ie. move multiple cars in one go). Another idea: maybe a null layer with all the cars that are going in a straight line in one direction (set all of them to have their parent the null layer). That should also allow you to slightly vary the individual car speeds I think (ie. alter a few frames for individual cars, but move all that are going in a straight line with the null layer?).

Another idea: (maybe a bit like Szalam's suggestion but without the expression): animate 1 car, then copy the keyframes to a layer for a different car, but select the keyframes and reposition them along the timeline (so each car in that lane follows the same path but so many frames later) - this should work even with the curved roadway. After copying and repositioning them along the timeline, you could slightly alter them to make different cars move slightly differently.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 07, 2017 Feb 07, 2017

Copy link to clipboard

Copied

I would draw a motion path for the cars in a lane, set a mask path keyframe, then copy it and then select car 1 in that lane, then press Alt/Option + p then Ctrl/Cmnd + v to make car 1 follow path 1.

Now I would adjust the speed of car 1 by dragging the last position keyframe right or left.

Then, if all of the cars in that lane were supposed to follow car 1 I would set up an expression for car 2 that used the index of car 1 (layer number) as a multiplier for time to offset car 2 in time so it stayed a constant distance behind car 1. I would then copy the expression only using the Edit>Copy Expression Only menu and paste it to the rest of the cars for lane 1. They will now all follow car 1 perfectly.

If you want to have different speeds for different cars you can use the copied path for each car in lane one and paste it and adjust it for the other cars.

If you really wanted to get creative you could add a slider to the expression. If the slider was attached to each car layer then you could individually adjust the speed of each car, but if you added a slider to a master controller layer, you could change the speed of all of the cars at the same time.

I haven't got the time to write out the expressions for you and I don't want to try without taking the time to open up AE to make sure that they work but it's a pretty simple matter to figure out the right multiplier for the index and add it to the valueAtTime property for the first car's position.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 09, 2017 Feb 09, 2017

Copy link to clipboard

Copied

LATEST

Thank you for your great answers! I think I'll do a mix of Gerard and AI1.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines