Nice work!
But I have a question, is it possible to recreate the intersection similar to the screenshots above with the plugin?
Yep, I did that with the plugin!
The way I did it was to connect the roads using the New Lane tool in all the ways that would make since in real life, then turn off the lines for all the intersecting lanes, leaving just the asphalt in the middle.
In the future, there will be a road marking portion of the plugin to assist with intersections.
Iāll make a quick tutorial for the process after I release the new line editor (tonight!)
As for some more complicated uses of this plugin, hereās a work-in-progress Diverging Diamond interchange!
Update 0.2
Update 0.2 of the plugin has been released!
This update includes two main new features:
- Visual Line Editor - This improved line editor allows you to create custom lines or pick from several common presets, as well as save your own presets
- Use the preview window to see how the line will look before you click Render
- The old āEdit Lanesā button has been renamed to āDelete Lanesā, as it is still used for this purpose.
- Render Configuration - Gives you control over how your roads render, including the segment length and max number of segments per lane
- Saves by the Place ID - if you publish your place the first time, you may have to re-enter these values.
Tomorrow I will be making a video tutorial on the full functionality of the line editor, with an explanation on how to create your own custom lines.
Youāre a lifesaver! Will we have the ability to adjust the sizes of the parts generated (width/height, not just length)?
Also, the UI doesnāt seem to flow. The check box looks like Material UI, but the other parts donāt. Do you plan to standardize the UI for a more cosmetic update?
As of right now, you can adjust the width of the road by resizing the node parts. I will add a setting in the future to adjust line width and road height.
As for UI, this is my first time making a plugin this in-depth, and the UI honestly wasnāt my main concern going into it, but a cosmetic update will definitely have to come before the 1.0 release. I would love to get more detailed feedback on the UI on Discord, as I honestly donāt know where to start on fixing the flow.
I found a slight error in the āRemoveNodesā script, which makes it not able to delete the nodes, cause of this error:
It was just a simple typo error luckily: You had a extra () inside of the ipairs
for _, c in ipairs(workspace:GetDescendants()()) do
pcall(function()
if c.Name == "Next" and c:IsA("ObjectValue") then
c.Parent:Destroy()
end
end)
end
for _, c in ipairs(workspace:GetDescendants()) do
pcall(function()
if c.Name == "Next" and c:IsA("ObjectValue") then
c.Parent:Destroy()
end
end)
end
Oops! Thank you! I fixed it on my test place but forgot to put it back in the plugin
Can you make it so it renders even though It has not been changed, because I am still having problems. It wont render.
Itās getting real annoying having to re enter the place all the time
Ok. I havenāt had any issues with the change detection when testing so Iām not really sure what the issue is, but Iāll add an option to just render ever road.
When I put the nodes down and click the āRender Allā button, nothing happens.
This is the same with the āRender Changesā button.
Did you follow the tutorial? Click the Delete Lanes button and make sure the lanes are actually present.
I did everything on the tutorial but it didnāt work, Iāve tried it on 3 baseplate worlds and nothing happens when I try to render.
This is what happens when I try to render a rode between two nodes.
It says that there were 0 lanes found even though Iāve put down the nodes.
I didnāt realize you needed to press the + icons on the node, before I was clicking ācreate nodeā twice but when I tried again with the UI it worked. Thanks for the help and keep making great plugins!
Progress Update
Just a little progress update for what I'm working on currently! Many of the main concerns with my plugin were performance, and rightly so. Rendering roads using triangles can create a lot of parts if not done mindfully, so I'm working on optimizing the render process right now.As of the most recent update, lanes are rendered separately, even when detected as part of the same ālane groupā (lanes with neighboring starts and finish). Lanes are rendered by calculating two curves on either side of the lane, filling each side with its line pattern, then filling the remaining space in between with asphalt.
So far, by changing this render process slightly, Iāve been able to reduce part counts by as much as 60% for two lane roads without sacrificing appearance, and will hopefully be able to reduce it by as much as 70% for four lane roads!
I just finished rewriting the road render module so that lanes are now rendered as entire groups rather than individually. For anyone concerned about part counts, this reduced the diverging diamond game I posted early from a little over 70,000 parts to 15,000 parts with a 5 stud segment length.
Iāll push this update out tomorrow after I do a little more testing!
It will work occasionally but it most of the time will not render. I have no idea what is wrong. This might have to do with the render changes you are making.
Maybe you could explain how to make an intersection.
Did you accidentally delete the render folder from Workspace? It should be named āRoadsā.
Sorry, I meant to add a check for this before every render in the last update!!
Probably lol!