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

Improve Lane Connection Arrow Heads #1500

Open
kianzarrin opened this issue Mar 28, 2022 · 13 comments
Open

Improve Lane Connection Arrow Heads #1500

kianzarrin opened this issue Mar 28, 2022 · 13 comments
Labels
enhancement Improve existing feature LANE ROUTING Feature: Lane arrows / connectors UI User interface updates

Comments

@kianzarrin
Copy link
Collaborator

kianzarrin commented Mar 28, 2022

image
from #1492 the following changes was made to lane connection tool:

  • lane curves are never transparent regardless of user settings (controlled through a bolean constant)
  • gray borders for active lane has been replaced by black. You can still tell active lanes because they are rendered on top and are bold.

The borders of lane arrows are curved. we need to make it sharp.
also another problem is that the arrows for forward connection goes under the backward connection. we need both arrows on top and the lane color to be average of both connections.

@kianzarrin kianzarrin added enhancement Improve existing feature UI User interface updates LANE ROUTING Feature: Lane arrows / connectors labels Mar 28, 2022
@kianzarrin
Copy link
Collaborator Author

kianzarrin commented Mar 28, 2022

I didn't manage to change alphaBlend for texture overlay. so the only way I can think of to fix this is:

foreach connection in connections:
    render all black wire/arrow-haed borders 
foreach connection in connections:
    render all wire/arrow-head fill colors.
    if bidirectional connection (need to cache such information).
        mix colors for fill wire colors. 
        render arrow heads on top.

@kianzarrin
Copy link
Collaborator Author

@kvakvs do you want to try to see if you can change the alphaBlend of the texture overlay. You have more experience so maybe you can find a way without complicating the code.

@kvakvs
Copy link
Collaborator

kvakvs commented Mar 28, 2022

I suggest we do not flirt with alpha blending, its high risk low reward.

To highlight some curves i suggest one of the following:

  • Vibrate/shake ends of the curve
  • Vibrate/shake center of the curve
  • Blink curve on and off, or "long on short off"
  • Change curve pattern to dash/dot or change curve thickness
  • Change inner color, maybe animate alternating white/colored curve

@kianzarrin
Copy link
Collaborator Author

@kvakvs I am talking about the border of the arrow heads.

@kianzarrin
Copy link
Collaborator Author

Are you saying all lane connection wires should do this and drop the idea of black border?

@kvakvs
Copy link
Collaborator

kvakvs commented Mar 28, 2022

Black outline is great in my opinion. But if its not all black it looks worse. And if you use alpha anywhere, it looks even worse.

@kianzarrin
Copy link
Collaborator Author

kianzarrin commented Mar 29, 2022

@kvakvs But if its not all black it looks worse.

as you can see in the image in the description its all black. as I explained int the description:

gray borders for active lane has been replaced by black.

if you use alpha anywhere.

we still do use alphaBlending on the black outline. but we don't touch alpha channel of the color as I said in description:

lane curves are never transparent regardless of user settings

@originalfoo
Copy link
Member

Is it possible to make black connector outline a little thinner - same sort of width as the black outline round the lane circles?

@originalfoo
Copy link
Member

Another option (might look rubbish, no idea without testing) - what about removing the black borders completely, and draw a shape over the junction filled with semi-transparent black? Sort of a darkened foundation to ensure contrast of the lines, rather than individual line borders? The effect would be to darken the road a bit. Given that most roads are sunken (although that can be modified with Curb Height Adjuster mod) the shape could possibly be slightly lower than pavement level so it only darkens the road surface?

@kvakvs
Copy link
Collaborator

kvakvs commented Mar 29, 2022

a 30-50 or 70% black circle of junction radius (or based on biggest segment width for this junction? some can be bigger than usual with the node controller)? that's not a bad idea at all

@kianzarrin
Copy link
Collaborator Author

@kvakvs are you planning to take a look at this at some point? I am not really good at UI design ... if I take over this I will bombard you with questions like last time!

@kvakvs
Copy link
Collaborator

kvakvs commented Apr 17, 2022

I did not start this branch. Want me to take over the work?
Or you want review & approval?

@originalfoo
Copy link
Member

originalfoo commented Apr 17, 2022

Regarding the lanes, could we also change color saturation?

For example, if we used a color chart such as Flat Design or Material we could set num colors available = num suitable columns (depends on chart used), and then define which rows are used for active vs. other, with the active row being more vibrant (eg. saturated, during daytime) than the other row, and ideally at least 1 row between the two to ensure contrast. Additionally, we chould shift / invert the rows based on sun intensity - eg. at night a lighter colour will stand out more than a vibrant colur, and day will be the opposite.

Chart could be stored in 2D array (or whatever) and at start of overlay session pluck the values from desired rows and put them in to two fastlist (ie. existing m_buffer arrays) for rapid heap access. Could even lerp the colors as sun intensity changes from frame to frame?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve existing feature LANE ROUTING Feature: Lane arrows / connectors UI User interface updates
Projects
None yet
Development

No branches or pull requests

3 participants