Jump to content
Sign in to follow this  
LuisFelizTirado

Adding road traffic in FSX?

Recommended Posts

Guest cwright

Hello all, I've looked through the FSX SDK's but I couldn't find any info on this. So my question is: is it possible to add road traffic to a specific road?And if so, how?And a second, related question: is it possible to add VTP lines in FSX? Best regards, Chris

Share this post


Link to post
Share on other sites

Hello Chris,To get the automobiles, draw a line and compile it as FWX. It does not have to be over a road at all, but anywhere you want (off-road madness!)Please note that Traffic Direction=B (Both ways) will not work, so if you want that, you will have to draw two lines, each one going in a different direction.VTP lines made for FS 9 will work in FS X.Best regards.Luis

Share this post


Link to post
Share on other sites
Guest cwright

Luis, thanks for that.For road traffic, I assume I would need to create a suitable shape file and run it through the shp2vec tool?The problem is that I know virtually nothing about shape files. I tried to find out a couple of years ago but no go. The shape file definition document might just as well have been written in Serbo-Croat. What I need is the Idiot's Guide to Shape Files. Does such a thing exist?About vector lines: I'm using this method e.g.:VTPDataArea 1, 1, 0, 0VTPLayer 8, 0VTPNumTexturesInLayer 1, 0VTPTextureId 1, 0VTPPolyCount 1, 0 VTPPolyMethod2 31, 1, 0VTPPolyMethod2Ex 52VTPWidePoint 8314, 1, 11322, 0VTPWidePointWidth 1VTPWidePoint 8315, 1, 11323, 0VTPWidePointWidth 50VTPWidePoint 8314, 1, 11336, 0VTPWidePointWidth 50VTPWidePoint 8325, 0, 11350, 0VTPWidePoint 8325, 0, 11363, 0VTPWidePoint 8335, 0, 11377, 0etc....Is this still okay or has it been superceded by a newer method? Certainly the VTP lines I create with AutoAsm using this method don't appear in FSX.Many thanks.Best regards, Chris

Share this post


Link to post
Share on other sites

Luis,Have you figured out how to get traffic to cross bridges? I'm very impressed that MS does this with the default bridges...Jon

Share this post


Link to post
Share on other sites

... and it seems after a little thought this should be a simple as specifying elevations in the shapefile, not so?Jon

Share this post


Link to post
Share on other sites

Do you know, Jon, that is an excellent question. I cannot figure why it has not come up yet. We have all been to busy to study these details, probably.Back to the drawing board to see if that works. The FWX shapefiles shouldn't normally have a z value, but it is an interesting idea.Chris, we are all in the same situation concerning this shapefile business. It is not a format that is particularly common in the rest of the world, so I have no source material available for my projects in shapefile form.Oh, well, it keeps us busy and our brains active.I guess you can take a look at the thread on autogen excludes for ideas. Shapefiles can be made with fGis quite easily - they are just vectors, and all one needs is the proper geo-referencing.I made freeway traffic using SBuilder, since I know how to use it and can draw over a background, but it exports BLN, not shapefile, so it is a little longer.As for the question of compatibility with FS 9 terrain, I pretty thoroughly checked this and everything seems to work mostly well except:- FS 9 terrain excludes do not exclude FS X terrain;- vtp land class polygons will not display over FS X water like they did over FS 9 waterSo, it is a puzzle to me why your AutoASM lines don't show up. If they display in FS 9, then they should be good in FS X.Best regards.Luis

Share this post


Link to post
Share on other sites
Guest cwright

Luis, thanks very much for the info. I just discovered the thread on autogen excludes and there's a lot of useful stuff that will take a while to digest. For me the ideal solution would be a program that converts simple position data to shape files. The bln to shapefile converter might be ideal for this. Is it possible to get a copy?It's encouraging to know my VTP lines *should* work! I'll take another look at that.Actually, I just realised I'm using the old BGLC from 2002. I'll try the newest from the SDK....Another thought just occurred. You said VTP lines that work in FS9 should work in FSX. But in fact I tried transferring one of my FS9 sceneries. You guessed it - the VTP lines don't show! Also I have a vague memory of a post by Dick Ludowise a few weeks ago. It implied that there was a problem with VTP lines in FSX - and I believe he said there might be a solution for it....Many thanks.Best regards, Chris

Share this post


Link to post
Share on other sites

Hello Chris,I have made lines with both the FS 2004 tools and with SCASM and they all display in FS X. I did not read Dick's comment so he would have to be the one to give more information.I shall see about BLN2SHP as soon as possible, but darn Yahoo Mail seems to be playing around with its beta version and the old version is not working for me this morning. I shall try again tonight.Best regards.Luis

Share this post


Link to post
Share on other sites

>Luis,>>Have you figured out how to get traffic to cross bridges? I'm>very impressed that MS does this with the default bridges...>>JonThe default road bridges (Extrusion Bridges) have platforms in their extrusion definitions (note that the default railroad bridges are encoded to ignore platforms). Most, if not all, of the default modeled bridges do as well.Traffic vectors are 2D. You merely need the traffic vectors to line up with the bridge surface. Note that it gets really interesting (vehicles nose-diving off the edge and potentially jumping back up) when the traffic vectors deviate from the bridge surface.-Doug

Share this post


Link to post
Share on other sites

Thanks for the explanation, Doug. Does that mean if I have platforms defined for my custom bridges, and a traffic vector is drawn across it, the traffic will follow the platform surface?And it looks like I shouldn't try to run traffic over the railroad bridges ... ;)Jon

Share this post


Link to post
Share on other sites

>Thanks for the explanation, Doug. Does that mean if I have>platforms defined for my custom bridges, and a traffic vector>is drawn across it, the traffic will follow the platform>surface?That's the idea.>And it looks like I shouldn't try to run traffic over the>railroad bridges ... ;)Not the default ones anyway.-Doug

Share this post


Link to post
Share on other sites

Chris, I tried sending you the stuff to kline.demon.co.uk, but it was refused.Could you please click on the little envelope at the top right and let me know how I could get it to you?Best regards.Luis

Share this post


Link to post
Share on other sites
Guest cwright

Many thanks, Luis.I've made some progress but I still can't get the traffic to appear. The story so far:I've added some code to AutoAsm to export bln files. I downloaded Jim Keir's bln2shp (thanks for your efforts trying to email it! And thanks to Jim Keir.)So far I've been unable to call bln2shp from AutoAsm but it works fine in the DOS window. It creates the shape files correctly for roads and freeways (traffic). After running shp2vec the roads appear correctly in FSX - but no sign of traffic. I placed it close to a busy default highway to guarantee traffic should appear in that location (Japan).I was surprised to see that the default roads surrounding my test scenery were excluded, though the default traffic still appeared. It's rather odd to see traffic crawling across empty countryside!I downloaded a database program and was able to check the dbf file. It was set to 'B' so I changed it to 'F' (you stated that 'B' does not work). The NumberOfLa is set to 2.The FWX lines show correctly in TmfViewer as red lines.The content of the xml file is:<?xml version="1.0"?>Does the value of the guid matter? I assume not.It's impossible to check the shx file as it's not text.As I said, the result is that the roads appear correctly but there's no traffic. Hopefully there's a simple answer....Best regards, Chris

Share this post


Link to post
Share on other sites

Very puzzling, Chris. I don't really know what the problem is.From what I understand, you drew roads and also traffic in the same project.Your default roads disappeared.Usually, this should mean that you did not use the -addtocells flag when invoking Shp2Vec.Without that flag, the new scenery completely replaces (removes) all default scenery within all the quad 11 that is intersected by the new scenery.For example, I drew a new rendition of St. Barts in the Caribbean and compiled as so:Shp2Vec . 0303 This was the result:http://forums.avsim.net/user_files/161746.jpgIt intersects all 4 of those quad 11. Here is the result in game:http://forums.avsim.net/user_files/161747.jpgAny new terrain, even if it is only a road, will eliminate default terrain within all quad 11 intersected.The only way to change this behavior is by adding the -addtocells flag. And probably this means that we will always use this flag.As for why your traffic does not display, it is hard to say. You obviously have the traffic turned on, and if you saw it in TMFViewer along with your road, then it is in the right place (and does not have incorrect coordinates).Perhaps you could post the source files here so that we could take a look, Chris.By the way, in the traffic dbf, you can set direction of traffic to B (both ways), but it will only give one-way traffic.Best regards.Luis

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...