The International Simutrans Forum

 

Author Topic: Transition between different tracks/roads/etc...  (Read 5686 times)

0 Members and 1 Guest are viewing this topic.

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Transition between different tracks/roads/etc...
« on: January 05, 2009, 07:14:32 AM »
When you change between two tracks (e.g. for different speed) it would be good to have a transition tile for both track types. this could allow to have both tracks on an elevated ballast or embanked, having ballasts with different shapes, and finally placing speed limit signs.
===##===
= track type A
# transition tile for track type A
= track type B
# transition tile for track type B
Additionally, you could change track type only on straight tracks, track change could/should be forbidden in bends and switches.

This should be great also for roads, in order to allow e.g. different width of lanes



Offline emaxectranspoorte

  • *
  • Posts: 241
  • GOD BLESS AUSTRALIA
Re: Transition between different tracks/roads/etc...
« Reply #1 on: January 05, 2009, 07:18:52 AM »
Sorry for asking, but what's a ballast?




Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: Transition between different tracks/roads/etc...
« Reply #2 on: January 05, 2009, 07:21:58 AM »
Quote from: Wikipedia
Track ballast forms the trackbed upon which railroad ties (US) or railway sleepers (UK) are laid. It is packed between, below, and around the ties.[1] It is used to facilitate drainage of water, to distribute the load from the railroad ties, and also to keep down vegetation that might interfere with the track structure.[1] This also serves to hold the track in place as the trains roll by. It is typically made of crushed stone, although ballast has sometimes consisted of other, less suitable materials.

http://en.wikipedia.org/wiki/Track_ballast

Offline whoami

  • Devotees (Inactive)
  • *
  • Posts: 693
Re: Transition between different tracks/roads/etc...
« Reply #3 on: January 05, 2009, 04:46:02 PM »
For n different tracks that can be freely combined, this needs 2*n*(n-1) additional images (n*(n-1)/2 combinations of types, the transitions need to be drawn in four directions). For the five track types in Pak128, we would need 40 tiles, unless the combinations with tram tracks also count in (then there are seven types, requiring 84 images).

However, if the transition is only allowed to the next-higher or next-lower speed, the number of transition tiles is 4*(n-1).

This is only for transitions on straight track.


Edit: you seem to mean one interface tile for each track type, so only 2*n additional images are needed.
« Last Edit: January 05, 2009, 04:51:40 PM by whoami »

Offline kierongreen

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 2269
Re: Transition between different tracks/roads/etc...
« Reply #4 on: January 05, 2009, 08:52:43 PM »
I would suggest automatically generating these images in a similar way to how the landscape tiles are generated. You could have blendmaps and simutrans could automatically fade from one type into another. Even then there'd need to be a lot of images as has been stated so memory (and simutrans image limit) contraints could come into play.
All you'd need in addition to the current images would be four fading maps n->s, e->w, s->n, w->e. These could even be generated automatically by simutrans.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9418
  • Languages: De,EN,JP
Re: Transition between different tracks/roads/etc...
« Reply #5 on: January 05, 2009, 09:11:35 PM »
Four all curves slopes and switches, which would require for four ways with initial 20 images the little amount of 20*5*5*2 = 1000 images only for the rails. Same for trams, monorails and streets, and we are left without any images for the buildings :( Too much work for to little gain.

On a side note: Also in reality the transition happens within a meter or less. Only if recycled ballast is used you will see a mixture (but then again on all the way). Rail building is a very digital thing. Same for roads. Asphalt roads (with the exception of completely wore down roads) usually have a straight transition into a concrete or cobblestone road.

EDIT: spelling
« Last Edit: January 05, 2009, 09:51:08 PM by prissi »

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Transition between different tracks/roads/etc...
« Reply #6 on: January 05, 2009, 09:33:30 PM »
Unless drivers drive too much, parts of the road erode and are carried away by cars ;)

I, too, think this is not needed. Sorry.

Offline kierongreen

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 2269
Re: Transition between different tracks/roads/etc...
« Reply #7 on: January 05, 2009, 09:33:49 PM »
Forgot about slopes - switches could be synthesised from individual directions (considering the number of possibilities it's the only real way to deal with it).
But yes, 1000 extra images, even if they're automatically generated does seem a bit crazy. Though might be good to have snow/non snow transitions.

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: Transition between different tracks/roads/etc...
« Reply #8 on: January 05, 2009, 09:51:27 PM »
my idea was that i would like to do some embanked tracks, or on flat ground as well, slightly shifted on one side to keep the alignement with the vehicles. so, i wanted to do a transition between these and normal ballast, in order to smooth the change between the two types

Offline colonyan

  • Devotee
  • *
  • Posts: 526
  • Full and Warm
Re: Transition between different tracks/roads/etc...
« Reply #9 on: January 05, 2009, 09:52:07 PM »
If game was 3d, some engine might blend texture automatically......
At least it should have looked very pretty.