Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to set default behaviour of road junctions based on max turn angle or lanes? #689

Open
originalfoo opened this issue Feb 10, 2020 · 7 comments
Labels
discussion Contains debate on certain topics enhancement Improve existing feature feature A new distinct feature LANE ROUTING Feature: Lane arrows / connectors Overlays Overlays, data vis, etc. PATHFINDER Pathfinding tweaks or issues Settings Road config, mod options, config xml UI User interface updates Usability Make mod easier to use

Comments

@originalfoo
Copy link
Member

This is separate to tracked lanes (monorail, tram...) which would visually 'break' when > max turn angle. Here we are only discussing road vehicle lanes.

For some road networks, it would be useful to have mod option that, when enabled, prevents traffic taking far-side turns (cutting across oncoming traffic) in certain situations:

  • If there's more than one lane of oncoming traffic
    • I suspect some countries wouldn't even allow crossing one oncoming lane of traffic?
  • If the target road is > Max Turn Angle for source road (ie. bend too sharp)
  • A median is detected (by whatever means)

This would improve traffic on most medium, large and highway roads by limiting vehicles to only take near-side turns. It would also save asset authors the hassle of having to explain to their users the need to use TM:PE lane connectors to prevent far-side turns.

Note that, for road traffic at least, the user should still be able to choose to override the default on junction by junction basis when using either lane arrows or lane connectors. (real life example in #684 (comment))

However, when using lane arrows/connectors, it would be nice (but not essential) if we could somehow remind users about the default setting (if it's enabled) - for example they might be wondering why traffic isn't using a certain route through a junction. This could perhaps be a subtle (yellow?) bar across the exit road indicating "from your selected icoming lane/segment, this outgoing route is blocked by mod option".

Better still would be some way to visualise the normally allowed turning arc for given incoming route of a junction. That sort of UI would also be useful for lane arrows to depict the "arc of allowed exits" of a given arrow direction.

@originalfoo originalfoo added enhancement Improve existing feature discussion Contains debate on certain topics feature A new distinct feature Usability Make mod easier to use UI User interface updates LANE ROUTING Feature: Lane arrows / connectors PATHFINDER Pathfinding tweaks or issues Overlays Overlays, data vis, etc. Settings Road config, mod options, config xml labels Feb 10, 2020
@kvakvs
Copy link
Collaborator

kvakvs commented Feb 12, 2020

Get sketching
(luckily i have now a pen tablet, but unluckily i didn't yet fully understand what you need here)

Will this coexist/coincide with lane arrows/lane connectors?
How to visualise this if it does coexist with those features?
What to do if the settings of this and those other features are conflicting?
Show as "no left turn" or "no right turn" sign?
Can this be reliably stored/cached for a junction+segment pair? (i think it can)
If you want to show turning arcs, this render feature is a useful idea for all our junction tools

@originalfoo
Copy link
Member Author

Asset authors can define the max turn angle of their roads. If a road has too big/small (can't remember which) angle, then the main road shouldn't connect to it by default.

Basically this, bsaed on junction angle defined by roads (and/or mod setting):

median

There's also median road (and single-segment two-way highways) situations like this that can be filtered based on angle:

image

So, lane arrows should not, by default, point to a side road that has too sharp an angle to reach. Likewise, the sideroad should not, by default, point to a main road direction that is too sharp to reach.

Random thought: Some asset authors won't configure their roads properly, so we could have mod option that lets user define their own 'override default vanilla value' max turn angle?

We should ideally visualise to user (in lane arrow/connector tools) why a route through a junciton wasn't facilitated by default (eg. a thin bar or arc depicting turn angle limits).

As always, there are gotchas like this lurking around (this would need filtering by median detection instead):

image

Random thought: I don't know what's computationally faster - median detection or using angles. Whichever is faster should be tried first, but then again, whichever situation is most common should be tried first?

However, in real life sometimes sharp angles do get connected, for example:

irlam

So, user should be able to override default lane arrows if desired, and, by extension, also create sharp turns with lane connectors too.

Tagging related issues: #89, #503, #684

@kvakvs
Copy link
Collaborator

kvakvs commented Feb 12, 2020

For medians we can crowdsource that by hardcoding a list of most common road ids (do they have unique ids? i hope they do) which for sure have medians. And by allowing users to override/customise median setting by flagging their own assets as having or not having medians, and then submitting a text export snippet to TM:PE for updating our list.

@kvakvs
Copy link
Collaborator

kvakvs commented Feb 12, 2020

As i learn more how you want this UI to look i will sketch some ideas.
But most of what you listed above doesn't need an UI.
Namely: Default no lane arrow to a very sharp connecting road.
An UI will be required to override road turning angles.
And possibly another UI to override medians on/off and export a text snippet for submission. Ideally that text snippet would contain image URLs or Steam links to assets which we can verify manually.

@originalfoo
Copy link
Member Author

CSUR team have provided some great info on medians here: #503 (comment)

@scottmcm
Copy link

This sounds great! If I'm connecting a road at 45°, I can't think of a single time I've wanted the car to take the 135° corner -- especially not if that involves crossing multiple lanes of traffic. It would probably fix the infamous 2 one-way streets converging to a two-way street U-turn problem too.

Does the enhanced pathfinder look at angles at all today? It would seem plausible to have a small penalty for a >100° corner and a large penalty for a >125° corner, as a step towards this...

@kianzarrin
Copy link
Collaborator

I will need to update my mods if this gets done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Contains debate on certain topics enhancement Improve existing feature feature A new distinct feature LANE ROUTING Feature: Lane arrows / connectors Overlays Overlays, data vis, etc. PATHFINDER Pathfinding tweaks or issues Settings Road config, mod options, config xml UI User interface updates Usability Make mod easier to use
Projects
None yet
Development

No branches or pull requests

4 participants