-
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
More Accurate Lane Connection Arcs #282
Conversation
testing :) |
Looking good! I noticed that, in edit mode, when mouse is over a road segment, the node-selection circles hide the lines as shown below: This makes it hard to see the existing connections. When mouse is not over a road segment, the lines show normally through the circle. Also, the brown line colour is difficult to see close to twilight hours when not using Daylight Classic mod. |
Yeah some colors has to be changed. I will check what can be done with that circle on hover. BTW. There is an array with colours at the bottom of that class. You can play with those colors if you find some time 😉 |
I think part of the problem with the colours at the moment is that it tries to give each lane entering the junction its own colour, which can be a huge number of colours on complex junctions. If there is viability to get some of the other lane connector UI improvements in we might be able to simplify some aspects of that. |
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.
Honestly, it looks amazing. I kind of like the behavior of the lines being unable to be seen on hover (when selecting the node). It helps identify the node that you're trying to focus and makes it clear and concise what's going to be edited. Viewing the lines should be done within the actual edit, not before.
I also didn't notice many issues with colors, however I do agree that in the image posted the brown kind of contrasts, but that's a minor detail that can be easily fixed.
I'm unsure of what this "game hang" you're talking about is, as on my laptop (I run the game at 720p lowest settings for reference, get 20 fps) I did not get ANY lag whatsoever using the tool after building this branch.
Overall, looks amazing, and imho, is pretty ready for merging. What can I say? It's really, really good.
The lines get hidden when the mouse is over any road segment, not just the node. I don't use the overlays to keep fps high (a habit I got in to when I was back on the old potato computer), so when I want to check my lane connections I activate the lane tool and look around the map. Having lines disappear if the mouse hovers a road breaks that use case, a use case that's important for people with potato computers. If we wanted to show feedback when mouse is over a node, the circle could just change colour.
I also did not notice any lag, however my current computer is pretty good spec and while testing I was just in small city with few roads and fewer lane connectors active. I assume the issue becomes prevalent in larger cities, slower computers, or just with more lane connections? |
There is an issue when you set lane connections at complex intersection Lane connections preview is not refreshed after removing segments. Currently lane connection arcs are rebuild only after switching from preview to edit... I'll have to add some listeners for that. |
Can this line be altered: So that if Just noticed there is this: |
Honestly I think we don't. |
So the penalty we pay for better lane routing arcs is a performance increase. 😀
Currently color choice is based on |
Would it be better to just update the |
I will try to hardcode target markers to be white. Some thoughts about performance 😃 The funny thing is that there is still room for improvements with regards to rendering performance 😄 Current lane connections and markers are rendered using the same shader that is used to render blue placeholder when placing road segments, selecting buildings, cars etc... I was digging through code and I think that removing unnecessary calculations (rounded ends and transparent filling) should boost rendering speed. Additionally we can increase performance even more by writing simple custom shader which job would be only to draw arc with some width with lower resolution (it's not a rocket science 😄 ). After that I will try to create shader for square and triangle #41 lane connectors because it seems to be better tool for rendering those shapes with nice anti-aliased lines than using complex mesh or texture 🙃 Good catch with this Vector3 👍 I am sure there are more issues like this. |
Research on color alphabet for lane connector: #287 |
Lane connections test setup save |
Testing that save... Stable 10.18:
Labs PR 282:
So, new version is 8 to 14 fps faster than current release :D One thing that became very apparent while in edit mode is that it's difficult to see which node is being edited. Would it be possible to "thin" the lines of other nodes, or maybe make them slightly transparent? That way the node being edited will have visual difference to the non-editing nodes. EDIT: I can confirm the problem with node selection circle (hiding lines) is resolved.
I wasn't able to reproduce either of those, but not sure I fully understand what the issue is so might not have actually tested properly lol. |
Heading to bed, but some things I realised need testing....
|
To test issue with refreshing preview, just build big intersection using wide segment e.g. 6-lane 2-way (node will be bigger) then connect outer lanes of near segments and after that change segments type to smaller e.g. rural road or basic 2-way one-lane. Lane connections will stay the same in preview mode. Refresh is performed only when you switch to edit mode (bezier arcs cache is rebuild there) Yeah... I think I will add one more color but half transparent. Original for preview all or belonging to currently edited node and half transparent to preview other from not selected nodes |
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.
I'm not entirely sure what's going on, but I cloned and attempted to use this on my laptop, and now the lines are not showing up at all. The nodes are there and I am able to connect lanes, but the lines themselves do not appear.
On a somewhat unrelated note, would it be possible to look into and fix #293 while we're messing with the lane connectors?
There is another issue in the GIF above, that the outgoing connector for u-turn is not appearing on monorail roads (see: #293). @FireController1847 Does the issue in your GIF only happen on monorail roads, or does it happen on normal roads as well? |
Oh, yeah, that's another thing.... Some networks are nodeless.... Like several of the CSUR roads, and several of the Railway rail networks. So that might throw a huge spanner in the works. I'll ask on the asset creator discourse to see if anyone is aware of any networks that create non-flat junctions. BTW, remember that the lane connector tool also has to work on 'non-junction nodes' between segments etc. |
I am asking about that because I don't want to create situation where part of that rectangular plane would be overlapped by segment/node texture. |
If you can get a filled rectangle rendering then should be possible to splat those over all types of node where lane connector can be used, to see if any are at weird angles or if they are all flat. |
@aubergine10 Specs are the following:
The launch flag does not make a difference (other than making it run much worse). EDIT: Oddly enough, I've only had this happen on the "Grand River." I did not build a complex road network, just a simple quick drag right off the freeway. Using other maps makes it work just fine. EDIT2: Did more testing. Have now had it happen with "Grand River" and "Foggy Hills." It's not due to altitude, I used Move It! to try and move the node and it worked fine on "Cliffside Bay." Is it a shader issue? |
@aubergine10
You can press "Page Down" to switch to underground view. |
So the milestone should be 11.0 then? |
Is that hard-coded to PageDown key or is it based on whatever key is assigned to one of the standard game shortcuts (eg. lower road, or whatever)? |
When measuring performance please refer to micro/milliseconds per frame, not the FPS or FPS drop |
c923e5d
to
969d3b8
Compare
Key changes:
I think this could be the first new enhancement pushed to LABS first before moving to STABLE but we will see 😉
PR set as draft for now until I'll fix those problems 😃
Fixes #3