I have been working on adding the sidewalk, and road furniture and fixing some bugs during week 3.
The first thing I did was fix the code that is solving the intersections. I was using one of the intersection points to find other points that are in the same intersection. However, it created a problem that points from other intersections will be mistaken as in the same group if the intersections are too close to each other. My solution to this is I search points from the center points which is separate geometry input for the wrangle node. In this case, the nearpoints function will be much more accurate, and I don't need to create a list for all the points anymore.
After solving this issue, I started to work on adding the sidewalks. I ran into some problems in the beginning because I was trying to use the PolyExpand2D node which is very funky. I also tried to use the sweep node with ribbon, but there is an issue with this method. The ribbon created by the sweep node will intersect and overlap each other at the corner if the width is too high. Consequently, I returned to the same solution I did for the previous road-building part which is by moving points out based on the cross-product of its normal. I used the very low poly version of the edge lines to avoid corner overlapping, and also used the Fuse, Resample, and Refine to fix and refine any corner that is overlapping.
Another major thing I added this time was road signs and street furniture. There wasn't any major issue I encountered during the process since everything is based on the output from the road-building part.
Since the zebra line and the yellow and white lines are all based on the same road connection line, I had to avoid the zebra line overlapping with the yellow and white lines. To solve this, I created a percentage attribute to calculate how many percent of the line to carve to avoid the zebra line.
Additionally, I also used the intersection attribute I created while solving the intersection and the nearpoint function to find where the road ends. Therefore, it will avoid adding a zebra line and extend the lines out to the end of the road.
In order to generate the correct number of lines for the lanes and traffic lights, I added a new lane_count attribute that will be created in the very beginning along with the width attribute. This integer attribute allows it to determine how many lanes there are, and how many divisions of column ribbon sweep to create. I used the ribbon sweep node since it is just lines and symmetry.
So far, the user is able to change the following things:
Width of the lane
Intersection distance and resolution
Height and width of the sidewalk
Density of the street lights
Street furniture position of the sidewalk
I will add more parameter and organize them as I build the tool to allow more customisations.
Comments