ScriptSpot

Script

Simple Traffic

By 3D_Animator · Credited author: Vugar Naib · 2010-03-10

Version
1.0
Version requirement
3ds Max 2008 +
Date updated
2010-03-11
Votes
41
Description

alt="" width="720" height="225">

Hi All!

This is my first full-length script, and i hope that it will prove useful.

Best regards.

Additional Info

Update 03-11-2010 Now script warns of the error. Quickstart: 1. Select the desired objects and click on "Get Cars To Array" Note! These objects should be solid. 2. Select the desired path and click on "Spread Cars" Note! In addition to the flow of moving objects the script also adds a layer into the layer manager for easy selection of the flow. 3. To change any settings, select the flow in the layer manager, enter the desired value, and click the "Reset Cars" Note! Script warns of the error, but if some actions returns error i recommend to restart Simple_Traffic.ms. FP Rand - Random positioning value within the distance between objects in parallel to the flow (in percentage). WP Rand - Random position value perpendicular to the flow. 4. To replace objects in the flow matrix, select desired objects, press on "Get Cars To Array" then select traffic and press on "Reset Cars" Flip Follow - Changes the direction of the flow to opposite. Flip Cars – Reverses the objects in the flow on 180 degrees.
Videos
Attachments

Tags: animation constraint, traffic gen, traffic animation, follow the path, free maxscript

Comments (34)

Theobarbosa · 2020-04-29

Nice Script! I´m just having one problem:

"You must select the flow to reset cars"

But I can find flow in layer explorer (3ds 2020).

Thanks

addnode in undefined error in maxscript

babusuresh8055 · 2016-03-28

Hi,

I have house creator scipt to create 3d floor plan.
For the very first its works well.
If i used for second time it got error d as (Unknown property:"addnode: in undefined )
Do you knew where i did the mistake.
Can you Please solve out for me.

wheel turning alternative...

lordraidis · 2014-11-25

I noticed something that might help-- though it's true that the script indeed does NOT rotate the wheels geometrically, the same look can be achieved by simply rotating the wheel texture based on the average speed of the vehicles. I did this for a test and it looks quite great :)

Awesome

hanselmoniz · 2014-11-13

I use this script for vehicles as well as people.... There are only two problems i face with it.. one if you want to merge/delete something it gives errors. Two the vehicles move fine but the wheels do not rotate..So it cannot be used for animations

My dear friend hanselmoniz =)

3D_Animator · 2014-11-13

My dear friend hanselmoniz!
This script makes the animation of traffic for long-range plan which are not visible to the rotation of the wheels =)

For rotating a wheel use Ant Traffic Simulator

Regards!

Awesome script.. ive found a good turnaround though

hanselmoniz · 2015-06-18

Thanks. its a great script anyways.. nowadays i use civil view which has got a good option to animate vehicles with rotating wheels here you can use a multi-spline shape only you should have your vehicle as a editable poly and the wheels should have material id 14 and 15... this works for simple animations though and not forked networks or vehicles in the same lane with varying speeds.... for complex networks it is better to use the vissim ani.txt sim output from vissim or sim file from quadstone paramics

Thanks and kind regards

3D_Animator · 2015-12-07

Thanks for your interest!!!
Regards!!!

Awesome script

hanselmoniz · 2014-05-27

The Script is very useful. It would be excellent however if we could have rotating wheels too. Just like civil view functionality

3D_Animator · 2014-09-04

I have many ideas for this script, but at the moment i worked hard, and i don't have free time for upgrade this script.
Regards.

Error

zules · 2013-04-26

Hi !

Nice script thank you ! But I got an error as : "--Unknown property: "addnode" in undefined "

Any idea where it comes from ?

By the way, when I try to use it it also sometimes spread my poly all around and not along the selected spline... Any advice about the pivots pints and where they have to be ? When I reset them (on poly + spline) I got the error I writted first...

Thank you !

killer_boy · 2013-04-11

very nice, thanks a lot & BRAVO :)

3D_Animator · 2013-04-19

Welcome! :)

wearestardust · 2013-02-15

Hi there,

great script, but is there a way how I could easily make it compatible with grouped objects?
For example: I need headlights attached to my cars and to get them to move with the cars, I need to either link them to the mesh or group them, but neither of these options work with your script...:(

Your object must be solid(single mesh) Or...

3D_Animator · 2013-03-24

Hi wearestardust
Your object must be solid(single mesh)
Or use attachment constraint for attached headlights to cars

caracola213 · 2013-01-28

Thank you for the information! I searched all over google for this.

You are welcome :)

3D_Animator · 2012-06-22

You are welcome, and thank you all for comments :)

christinoccs · 2012-06-05

AWESOME,it works perfectly on Max 2012, GREAT plug-in, THXxxxx

Thanks!

The Mind Forest · 2012-06-01

Looks really cool!

Speed Variation

syedsaudshahid · 2012-05-30

The Script is very useful, but i am missing speed variation.

Speed control.

stenionet · 2010-11-15

How can we calculate the speed of the cars in miles or kilometers?

Can you tell how to animate the wheels?

z0mbie · 2010-11-20

amazing

3D_Animator · 2010-09-05

i'm glad that it come handy.😎

To Latka X-treme

I will try to add this as soon as possible, but no promises.😳

 

stenionet · 2010-08-14

3D_Animator

Your script is very good. I am using it a lot.
Thanks.

habibasola · 2010-08-09

Very, very nice thank you

Latka X-treme · 2010-08-07

I like this script, since at my work I had to make lots of traffic animations which would have been really easy using this! I only miss one thing: will there be an update with I can easily make a generated traffic's animation looped? (I know there is a frame number where it's actually looped, but it'd be awesome if at least the script would tell where it does.)

W DIGITAL · 2010-04-20

great script!
but you should show in the video at the end how it works with all options on, let it show for 5seconds

you move the mouse around so much, its very hard to see the end result :)

but it seems to work great!

fajar · 2010-04-14

it would be great if added some of random heigt and rotation too.....

Thank

3D_Animator · 2010-03-19

Sorry guys, I am not a professional script maker, but i try😳

Yesterday I made a little change, and now script warns of the basic errors.

Otherwise I recommend restarting the script 😆

solozar · 2010-03-11

The useful script, but... too much errors and astably works :(

Michele71 · 2010-03-10

Very, very nice and helpful! Thanks! One point for you ;)

3D_Animator · 2010-03-10

To  Michele71

Thank you very much.

I am very pleased.

wicq08 · 2010-03-10

very impressive, but why dont you addmotion to the cars so they look real when moving

3D_Animator · 2010-03-10

Sorry this is my mistake.
Please check again.

kilad · 2010-03-10

Looks nice, but can`t see your video, it`s private...