PDA

View Full Version : Vissim (3.70) to Lightwave...Help!



3djab
03-25-2004, 11:04 AM
I recently left this message in the Lscript forum, and I thought it might help if I posted it here too. I work for a transportation consulting firm in California. I'm doing some R & D for our simulation group and we are attempting to create higher resolution animations of our traffic analysis data. To make a long story short, we use a program called "VISSIM". The company, PTV, is based in Germany. The U.S. distributor is "itc". (www.itc-world.com) This program creates traffic/intersection scenarios based on the data that we input. It also creates very crude looking animations in avi format. Really cheesy looking! (IMHO :))We want very hi-res animations. (2 minutes long maximum) The problem is that the program does not output data in a format that any 3d program can recognize. It will out put X,Y,Z data and time related to those coordinates. (In excel spreadsheet form) The other problem is that we may have close to 100 to 300 cars coming in and out of frame within those two minutes! And it all has to be accurate to the analysis data! (whew!) My question is: has anyone out there in the Lightwave world heard of know of an LScript or plug-in (possibly a follow-path type) that can handle this kind of info? Some kind of automated control of the spreadsheet data that relates to controlling a vehicle/object on screen? Any help or leads to answering or solving this situation would be greatly appreciated. Thanks in advance.

omeone
03-25-2004, 03:11 PM
We use the same software and have exactly the same need. I was to look into this a while back but didn't get the chance to do so properly cos of other jobs.

None of the users of Vissim in our office are trained yet and couldn't tell me if it exported to any format.

The format you describe might be *.flc (Autodesk Animator), which should be very easy to import or translate into LW as it is quite basic.

If it is *.flc polytrans can probably convert it to *.fbx, which I think LW will import.

sorry my replies are so sketchy, best I can do for now. I would be interested in the process for exporting from Vissim, and can try a few tests from my end here too.

and yeah, how crap is that screen capture recording avi maker!
Another nice thing about being able to 'bake' a simulation to LW, would be the ability to remove those rogue vehicles that break red lights and drive under buses...

3djab
03-26-2004, 04:24 PM
I looked in the Vissim manual, and I couldn't find anything regarding the *.flc extension. I am working with one of our traffic engineers and he exported a *.fzp file which contains the XYZ, time and speed information. (Vissim also exports in so many different file extensions, you would think that one of them would be able to be used in LW or in 3DSMax)
Anyways, It's in spreadsheet form (Excel)...
I keep thinking that there must be some way to use the spreadsheet editor in Layout and drop in all of the X data in the X column, the Y data in the Y column, etc., etc. I know I must be close. I just hope I can find some Lightwave wizard to help me with this. :)

Lightwolf
03-26-2004, 04:36 PM
Shot me a PM with your mail adress, and I can send you some C source codes that you could modify.
It takes a bunch of input values in a spreadsheet form and creates envelopes out of those that can be loaded as motion paths into a scene.
Very crude, but it works :)

I'd offer more help, but I'm in crunch right now, and will be for the next couple of days/weeks.

Cheers,
Mike

omeone
03-27-2004, 04:38 PM
Must be all the rivets in that bridge Lightwolf ;)

Can you attach a sample file 3djab?
If it exports to something readable in Excel, it is likely that is will export something in ascii aswell, or can be coverted to that.

With ascii coordinates I could import the points in Microstation, export to Lw and use them to plot a curve / motion path.

If the info is simple and well laid out, I can write a basic macro for importing and organising the data in Microstation.

(Its a shame, we have 3 Vissim licenses and no users, and its not exactly cheap sw!)

Lightwolf
03-27-2004, 05:05 PM
Originally posted by omeone
Must be all the rivets in that bridge Lightwolf ;)

Lol... yep, thousands of them... and awful bluescreen footage for an interims presentation that has to be rotoscoped by hand... eurgh...

Cheers,
Mike - yawn :)

omeone
03-29-2004, 03:51 AM
Im opening the Vissim manual now... (and the hives are already breaking out)

The last time I looked into this I found an interesting thread where Lightwolf had helped someone use particles in traffic simulation.

Im thinking with the enhanced paricle control in [8], some bright spark could write a plug that would be quite useable.

I think the original solution was simply just a controlled birth rate and path following, 8's new enhancements will allow more manual control over the particles, I can see two things that a plugin would need:

1. the ability to allow a certain percentage of the particles to birth differnt rates of vehicles - cars / buses / trucks, though that wouldn't be too important.

2. A traffic light effector that would allow vehicles to form a queue and restart at given time intervals.

3. (maybe) I dont know how well this is supported already, or in the new tools, but the differnet particle types would have to have preset acceleration / speed / deceleration curves for peds, bikes, cars etc.

In the end it wouldn't be generating the reports that Vissim does, but the visual output would be far superior, and that's the output that has heaviest influence on those making the final decisions. for a tiny fraction of the cost (incl. LW). Plus it would give individual control to those stray vehicles and occasional crashes that ruin whole simulations.

anyway, just sowing seeds ;) diving nose forst into the manual now

omeone
03-29-2004, 03:58 AM
ugh, um no, I take it all back....

non signal controlled junctions would be a nightmare, for any plugin writer

omeone
03-29-2004, 07:34 AM
Just an update,
Ive gone through the export formats in the manual, the most promising _sounding_ one being GAIA (*.gai) as the description suggests it will work, but there is no technical documentation on that format, and I can't find anything on the www.

But by reading it's format in Notepad it looks as though it is for translation to other simulation engines and not visualation apps as the manual suggests.

Ive sent a mail to PTV tech-support in Germany for their advice (cos they dont do phones apparantly) and their website says a 24 hour response is normal...

omeone
03-29-2004, 08:38 AM
Further update
Ive got this sorted now,
*.fzp files ;)
I'll wait for the response from their tech-support to see if they have a better ways before I go into full detail, as it'll be a fairly manual process, it needs the use of a CAD programme to plot the curves and each vehicle will need to have it's time slot maually offset from the beginning of the animation in LW by hand according to the beginning of it's simulation time.

also unfortunately Vissim reports the position of the front of the vehicle, whereas I tend to have my vehicles origin centred on the back axle, but Im sure there can be a workaround for that.

noiseboy
03-29-2004, 09:17 AM
I'm not sure whether this would help but Al Street has a plugin which can create custom motion importers from csv text file etc, whether it would apply to you I dont know

http://www.ats-3d.com/

TransMotion Utilities_ Pack

3djab
03-29-2004, 09:35 AM
Wow...I haven't checked this since late Friday night. Some of the responses are a little over my head, but I appreciate the information that I am reading. It all may help in the long run. I'll be working with our programmer today and one of our traffic engineers to see how far we get. Looks like it's gonna work the way we're hoping it will. Looking forward to seeing what the end result is going to be. The one thing that has me a little concerned is the rendering time for the amount of cars that we need for the different intersection scenarios. But I'll worry about that later.
I'll post my results later. Thanks to everyone.

omeone
03-29-2004, 11:37 AM
noiseboy

that looks perfect! thank you!

3djab

looking forward to seeing the results, you might consider some lo-res car packs from the likes of Dosch design, lowpolygon and others. FPrime will come into it's own with heavy scenes like these.

omeone
03-31-2004, 02:21 AM
further update:

Thanks to noiseboy's suggestion, I have been in touch with Al Street, and he has written a custom version of his Transmotion Customizable Motion Importer which will allow simple import of the Vissim data. There is some small details to be worked out, and I'll post the final outcome here later.

omeone
04-02-2004, 02:48 AM
Final update ;)

Al Street has finished this script and all tests so far prove it to be perfect.

It's working name was Mimi (Multiple Item Motion Import), though it might be released as fzp2lw. I expect he will have details on his site soon.

The plugin simply import the motion data, vehicle number and creates keys based on the Simuation time interval set in Vissim.

It creates a null for each vehicle so you can replace them with models when ready to render, and as a sweet little bonus it automatically sets all the objects with Align to Path ON for Heading and Pitch and sets all their keyframes to linear.

If anyone is in a hurry to get this now, you could probably e-mail him to request a copy.

omeone
04-02-2004, 02:53 AM
...and here's a screen grab of it in action on Dublin's most notorious and dangerous traffic juction - The Red Cow Roundabout, now with added Trams.

3djab
04-02-2004, 09:32 AM
Thanks omeone. I've been swamped with other projects and will get back to this one next week. The code that Lightwolf sent me works and generates something similar to the Red Cow roundabout, but for just one vehicle. If I have some time today, I was going to try multiple vehicles. The script that Al Street has written looks great. Will have to get that plug-in when it's ready.
(Thanks for your interest in this Lightwolf and omeone. Appreciate the help and info.)
Here's another question: my supervisor asked me if there was a way to import the signal light data so that it would change colors accordingly. I don't know that much about vissum, but is the signaling data also exportable in the *.fzp file?
What would I have to do model-wise that would see that data?
I'm assuming that I would have to model a traffic signal post with lights and somehow be able to change colors according to the data. Just throwing it out there for comment. Thanks.

omeone
04-03-2004, 01:02 PM
Al's script is ready, Im sure he mail it to you if you bought the Transmotion Pack and asked for Mimi. or FZP2LW.

Yes you can export the Traffic Light signal data too, but I would do this seperately, personally I wont use a converter as I tend to only animate one post per junction and use expressions to drive the rest.

As for animatring the lights, it's either editing a Light's intensity channell with the graaph editor or as I do - edit a sufaces luminosity value in the Graph Editor

3djab
05-07-2004, 03:48 PM
Well, thanks to Omeone and Al Street's plug-in, I successfully exported vissum data into Lightwave as motion files.
I tweaked with the keyframes to get smoother movement on some of the paths (usually braking at the intersection or making a turn) but overall, the import was flawless. Attached is a small sample of my W.I.P. (We're about 50% on the way to where we want to end up result wise.) The render shows an aerial that I'm using as a base and the sky is Skytracer 2 (baked). I used Global Illumination and the default light, placed so as to create similar shadows to what is on the aerial. I tried using Dosch Design trees but it was taking forever to render. (two hours to render 6 frames at 800x600 res...motion blur and medium anti-aliasing!)
I emailed Dosch to see if there was a way to make the trees less of a rendering hog, but no response yet. (Any tips anyone?!) The cars are awesome to work with. Anyways, more to come later. Will add buildings, lightposts and other stuff. Thanks! (Lightwave and LW community rules!):D

3djab
05-07-2004, 03:58 PM
Here's one more sample with the Dosch trees.:D

omeone
05-10-2004, 02:22 AM
looking good mate :)

trees... hmmmmmm

There is no real simple, fast or cheap solution here. It either takes a lot of learning and work or a lot of $$$. You really need to decide a few things before adding any considerable amouts of trees to a scene: mainly what LOD (level-of-detail) Vs. what your machine can handle, generally If I'm going over 10 trees in a scene, I start optimising my trees as high res ones will start to slow things down.

Once youve decided on what type of trees to go with (and there are many many options, you'll need to either make them yourself or buy them, making them can be alot of learning and work and to get them looking real good takes a bit of experience too.

Depending on distance from camera you have (at least) the following options in order of quality and complexity:

1. Clipped single poly plane set to always face the camera

2. the same single poly plane, made double-sided and cloned 3 times in a hexagonal pattern, something like this

_\/_
/\

3. trees like these (I'd recommend these) http://www.newtek-europe.com/uk/community/lightwave/tracey/3.html (bottom of the page)

4. Free plugin tree generators from flay.com (Eki's modpack, Treecage)

5. commercial plugins, dynamic realities' Tree Druid, or this may be called 'nuts and bolts' now :-/

(if you decide on 4 or 5 above, I'd recommend reading Dave Jerrards tutorial "Tees, it's a breeze" to get a better understanding of the principles involved)

6. Standalone external Tree generator apps for example: XFrog, which also has a LOD 'tuner' programme for making several different versions of the same tree with various polygon counts, you can then use LW to swap the objects depending on distance to camera. XFrog also sell a huge library of trees. This is a great solution, but very expensive.

7. 3rd Party premade trees, like Dosch etc.

a few tips that might help To optimise the dosch trees: dont use leaf textures unless you're up very close to the tree, use QEMLOSS 2 or 3 to reduce the polygon count (use Merge Trigon X [flay.com] after QEMLOSS operations), dont use sub-patches. Maybe use Dave Jerrard style leaf clusters instead of Dosch leaves. To get rid of very small tip branches that might be hidden by leaves - use merge points with a low tolerance. Put a little random scale and rotation into clones.

Finally check out a plugin by Happy Digital called HD Instance, this cots over $100 but is worth it, this allows you to load only instance of each tree model needed into a scene, and then use markers to place clones of the tree only during rendering, usually giving you huge processing and time savings.

omeone
05-10-2004, 02:27 AM
for some reason I cant edit the above post, so there's a few spelling mistakes and words left out :mad: - if ya need anything clarfied, just ask.

ingo
05-10-2004, 07:32 AM
Originally posted by omeone
.....
Finally check out a plugin by Happy Digital called HD Instance, this cots over $100 but is worth it, this allows you to load only instance of each tree model needed into a scene, and then use markers to place clones of the tree only during rendering, usually giving you huge processing and time savings.

Does it work well with high-poly trees ? I have a scene now with 500 trees, makes 9.300.000 polygones, maybe this could help here ?? Is rendering faster or needs less memory ?

Just a curious tree lover

omeone
05-10-2004, 07:36 AM
both, the more polys / clones in the scene - the more advantage the plugin affords, be sure to read all the info on their site, incl. limitations.

3djab
05-10-2004, 05:39 PM
Thanks for all the input. Have you tried Tree Designer or Leaves Designer? It was recommended on my other post and I looked on the website and it looks great. (www.polas.net) Any thoughts?
I'm gathering as much information as I can before Wednesday. (Project status meeting) Anyways, I checked out the other sites you recommended, so right now we're taking a look at everything. Thanks!

omeone
05-12-2004, 01:53 AM
soryy 3djab, I missed your last question, tree and leaves designer from P. Olas... this seems to me to be a very custom solution for generating trees that need to be seen close up, it allows you a lot of control, IMO - more than you need for your scenes, I would think you would prefer to simply insert a tree into the scene rather than build a very specific branch pattern?

Maybe the only real parameters you want are size, age, and general species in that order?

3djab
05-12-2004, 03:17 PM
Yes, you are correct. I basically only want to import the trees as is and place them where I need them. What has your experience been with X-frog? Right now, it looks like the way to go for our purposes. I have the budget for it. What's the process that you would use in conjunction with Lightwave. (I'm using both platforms, and it looks like it's only PC based. What do you recommend my approaching this and how does the plug-in come into play in this situation? Thanks!

omeone
05-12-2004, 03:53 PM
not much experience to be honest, except playing with the demo for 4.1 for the last few days, it may be possible for you to buy a tree library with Lightwave objects, and not need to buy the actual tree building programme, as you could buy XFrog-tune seperatley, but dont quote me on that!

best to comb their website and contact them if needs be.

the details of the lightwave plugin are on the site too, but I cant remember them too well at the moment...

3djab
05-12-2004, 04:19 PM
Yes, you are correct. I basically only want to import the trees as is and place them where I need them. What has your experience been with X-frog? Right now, it looks like the way to go for our purposes. I have the budget for it. What's the process that you would use in conjunction with Lightwave. (I'm using both platforms, and it looks like it's only PC based. What do you recommend my approaching this and how does the plug-in come into play in this situation? Thanks!