-
Notifications
You must be signed in to change notification settings - Fork 85
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
Lane connection overlay and performance improvements #985
Conversation
…sing render box height to minimum value. Variable line visibility through objects, depends on position (above/underground)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
Maybe some indented options in mod options > overlays > lane connectors?
|
I need more feedback what to do with underground overlays. Please try it in the game and you will see where is the problem now. |
Do not use projection textures when rendering underground, draw in 3d space where the junction should be. |
Yup, that's the plan. |
…s-Traffic-Manager-President-Edition into lane-connections-accuracy � Conflicts: � TLM/TLM/UI/SubTools/LaneConnectorTool.cs
- changed overlay position for underground, - added color and cursor for nodes if editing is disabled, - reduced overdraw of nodes, lane connections and lane helpers, - improved raycast detection for underground operations - overground connections are not visible in underground mode and other way around
Interesting cases, I'll check why it does not work 🤔 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comments above
fix visibility of highlighted node, fix visibility of connected lanes while editing connection
@kianzarrin Minor thing but acceptable: rendered underground lane overlay does not match segment shape (although ray casting is accurate), it always render bezier on the same height (lowest Y of bezier) - that's shader limitation for underground rendering 🙁 With regards to hovered node detection it should work slightly better now but I'll create new issue because to completely fix that we need to build custom ray caster with features like ignoring segments or nodes based on selected mode. |
the bulldoze tool does not seem to suffer from this problem. |
OK I will look more into this. |
why are you using ray-caster from default tool? didn't we wrote our own ray-caster? |
I didn't change anything with regards to detecting which node overlay should be shown (only removed those from dead-ends). I'll check what rules are set there.
We didn't write own ray-caster, you've just added few hacks to correctly detect clicks on the terrain if node/segment is underneath. I don't need that code anymore since I'm rendering overlays where they should be and I don't need default ray-caster for that. The only problem with ray-caster is detection of which node is hovered when ray intersects with other segments or nodes which we want to ignore. It's not game breaking problem because you can move camera. Probability that users will be changing lane connections underground is pretty low. Most of the times you click on the node and then use "stay-in-lane" feature. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ingamte tests:
150 mods
12k assets
All standard stuff seems to work as it should :) Faster... hmmm i can't say... maybe my system is just too powerful ;)
Closes #282
Fixes #654
Accurate arcs:
No overdraw below road:
Overdraw when underground connection (to be changed):
Issue 1 - circles at ground level, but lane connections on road level
Issue 2 - underground connections visible in non-underground mode
Issue 3 (another PR?) issue with intersection circles - I need to click on road level, not on circle to enable edit mode
Questions:
What should we do with overlay of underground lane connections?
Hide by default and assign new button (which one) to show underground connections on demand?
Turn visibility on, automatically when camera is in Underground mode?
Maybe hide non-underground by default and invert Show on demand button action from previous question?
What to do with markers and lane previews? Should I also decrease render box height to minimum value?
To do list:
InfoView.None/InfoView.Traffic
Low priority (nice to have):
Latest build of this PR is available here
No need to build it manually if you want to try it live