Requesting Input About Ideas for Realistic Carz Traffic

ModelerMJ

RubyTMIX, Basemapz
Hello all,

I'm starting this thread to hopefully get some input from the more learned folk here about ways in which realistic road traffic can be achieved in Trainz. I fully recognize that Trainz is first and foremost a railroad simulator; but I feel that realistic road traffic adds greatly to the experience and therefore is a "must" to include in any prototypical route. I also realize this topic has been broached before; however, I am hoping to collect more of the latest knowledge and ideas in one spot this time around.

My primary goals are:
1) Eliminate the randomly-wandering and demolition-derby effect that currently occurs on roads with more than 1 lane
2) Allow for a greater variety of vehicles, particularly to include semi-truckz in addition to carz
3) Allow for different rates of vehicles in different areas of the route
4) Potentially use scripting to vary traffic flow, i.e. according to the time of day

Currently my plan is to lay all my roads with assets that have 'carrate 0' in their config.txt files, and then go over the road system as a whole laying single-lane invisible roads that will create the traffic patterns I want. I do realize it's a lot of extra work, essentially laying the roads twice, but I am prepared to do so if it will let me achieve the overall effect I am looking for.

What I'd like to hear from y'all is:
1) Is this feasible from a system loading standpoint?
2) Could this allow a larger variety of carz, or am I still constrained to the 16(?) that can be associated with a Region?
3) Realizing that junctions can be created in roads just as they can with track -- can track marks be used on road splines, and then scripted to control the behavior of the carz?

Thanks in advance for your input and advice, and please don't feel constrained by my simple list of goals or initial questions. I also hope these questions aren't redundant or too basic; I may very well have missed the answers in my searching of the forums.


Regards,
-Mike

UPDATE: I found this post of mine from last year, which had some discussion about this topic. It doesn't turn up in a standard search for some reason but it showed up in Google as an archived post.
 
Last edited:
I don't have any answers for you but I do understand the frustration of cars being on the wrong side of the road, or going where they please etc. I know that auran also produce other traffic sims. It's a pity that they cannot be used together as a single game as well as how they ae at present, standalone.
 
ModelerM has posted what I came on here to post, does anyone know of a road that does not have cars overtaking when nothing is there, or just goes through other cars it really spoils the look of the game. I use roads,cars, drive the boats and planes as well as run a fairly complicated rail system I think each item brings something to Trainz Viewing your layout from a plane is amazing :)
 
1) Eliminate the randomly-wandering and demolition-derby effect that currently occurs on roads

That's hard-wired and traffic behaviour is something they MUST change next version. The current state of random overtakings and constant horn-sounding is simply not up to scratch.

2) Allow for a greater variety of vehicles, particularly to include semi-truckz in addition to carz
The variety is pretty much up to you, it can be changed in the 'region'. Semi trucks are an issue on curves, they look silly. there is currently no way to articulate vehicles to get that issue sorted.

3) Allow for different rates of vehicles in different areas of the route
You can already do that by varying the speed and car rate of individual roads. Use clones where you want the same road but busier/quieter faster/slower traffic.

4) Potentially use scripting to vary traffic flow, i.e. according to the time of day
I'm always wary of new 'features' which increase system load to no real effect. Do the Trainz mums racing out to pick the kids up at 3.30 really matter?

2) Could this allow a larger variety of carz, or am I still constrained to the 16(?) that can be associated with a Region?
Pretty sure its 32 not 16. 32 is a fair variety, but traffic is pretty low-impact, maybe 64 has a chance...

Andy :)
 
Seeing an increased amount of traffic at certain times is somewhat important I think. Figure that the rush hour traffic can be horrid with roads clogged, with commuter all moving along at 40kph instead of 100kph, while commuter trains whiz by at top speed allowed makes the scene more convincing.

Another thing that I wish we could implement would be different traffic for different roads. I hate it when I've added buses and semis, only to have them go down a country lane. Restricting certain traffic to main roads and freeways would be awesome. Perhaps some day this could be implemented by removing carrate and traffic parameters that are hardwired into the road config file, and moving that information to a pointer of some kind that references the traffic types allowed along with their rates at particular times. Maybe these values could be kept in a separate table too so that animated old vehicles and foreign vehicles can be included in the scene instead of only using those that are set for the current region and time period.

I have to say that coding something like this beyond what I can do, so I can suggest anything I like. :)

John
 
Hi Mike,

I too suffer your frustration about Carz in Trainz, let's see if I can contribute some ideas...

1) Eliminate the randomly-wandering and demolition-derby effect that currently occurs on roads with more than 1 lane
2) Allow for a greater variety of vehicles, particularly to include semi-truckz in addition to carz
3) Allow for different rates of vehicles in different areas of the route
4) Potentially use scripting to vary traffic flow, i.e. according to the time of day

Point 1) Andy has hit the nail on the head here - it's really up to Auran/N3V.

Point 2) You can change this by editing the Region file either directly or in CCP. Semi-trucks, which we call 'Artics' in the UK, can be added but
they won't bend and as Andy correctly said, they look silly.

Point 3) This can be achieved by linking road sections that have different 'traffic-speed' tags in their config.txt files.

Point 4) This might be possible by creating scripted roads but it's out of my league Trainz coding wise !

Currently my plan is to lay all my roads with assets that have 'carrate 0' in their config.txt files, and then go over the road system as a whole laying single-lane invisible roads that will create the traffic patterns I want. I do realize it's a lot of extra work, essentially laying the roads twice, but I am prepared to do so if it will let me achieve the overall effect I am looking for.

I had much the same idea and started out creating my own generic road assets a while ago. To publish a complete set along with a manual (which was needed for some parts) turned out to be a large task. I had to stop work on this due to an RSI problem but I can get back to doing a bit now, along with my other projects. These assets will be on the DLS and open to being re-skinned and published (with acknowledgement) in the fullness of time (or should I say "Soon" TM). If you would like and example or examples to play with then I'd be happy to send you a .cdp and the source files - these were created in Blender 2.55.0 (the last Beta) and as far as I'm concerned you may do as you wish with these and even publish them.

1) Is this feasible from a system loading standpoint?
2) Could this allow a larger variety of carz, or am I still constrained to the 16(?) that can be associated with a Region?
3) Realizing that junctions can be created in roads just as they can with track -- can track marks be used on road splines, and then scripted to control the behavior of the carz?

Point 1) This is a case of how long is a piece of string, depends mainly on your PC power and setup, there are lots of factors in there. As for Trainz 'built in limitations' only a member of the Trainz development team can give us an answer on that.

Point 2) I am sure you can get more than 16 carz on a route but can't pin down any documentation about this. Best thing to do is to give it a try by editing the config directly or via CCP.

But have a look here (and search from there): http://online.ts2009.com/mediaWiki/index.php5/HowTo/Add_Carz_Traffic_to_a_Route

Point 3) I don't think so - I believe that this one is down to Auran/N3V and the game engine source code.

I suppose there is always the alternative of using invisible (rail) tracks and drivable Carz plus AI on no traffic roads ..... (maybe a cut down version of this could be Auran/N3V's way forward for Carz?).

PM me your email if you want some asset examples.

Regards

Chris
 
Chris,

Thanks for the offer. I am actually planning to create my road assets in SketchUp, and I have been fortunate enough to have been given permission by another creator to re-use their excellent road textures so that mine will be compatible with theirs. For most of my needs, YARN and YARNish will fit the bill nicely; the areas I am focusing on are the interstates that run through my route and are visible from the track almost everywhere, and which have some rather unique interchanges and so on that are a 'must' to re-create as they are very recognizable to anyone familiar with the area.

Regards,
-Mke
 
Chris,

Thanks for the offer. I am actually planning to create my road assets in SketchUp, and I have been fortunate enough to have been given permission by another creator to re-use their excellent road textures so that mine will be compatible with theirs. For most of my needs, YARN and YARNish will fit the bill nicely; the areas I am focusing on are the interstates that run through my route and are visible from the track almost everywhere, and which have some rather unique interchanges and so on that are a 'must' to re-create as they are very recognizable to anyone familiar with the area.

Regards,
-Mke

Mike,
Does this mean you are able to create splines using SketchUp?
Gary Orr
Activerail
 
Mike,
Does this mean you are able to create splines using SketchUp?
Gary Orr
Activerail

Others have; in fact there is a conversation going on about this very subject in the RubyTMIX thread starting with this post.

Based on the info being presented there, I think that I will be able to create simple splines like roads, walls and so on that do not use LOD, which will be sufficient for my purposes. I also think it is possible to create splines with SketchUp and RubyTMIX right now, there is just a bit of manual fiddling required to the config.txt file.

Once I get into creating my own splines and get some experience with the process I expect to find it will be useful to enhance RubyTMIX to acccommodate them better.

Regards,
-Mike
 
Last edited:
I too find the current road traffic vexing and the workarounds insufficient for the amount of effort it takes, I would welcome seeing any improvement over the current system.
 
Back
Top