Beautiful Roads Plugin (deprecated)

Nice work! :smiley:
But I have a question, is it possible to recreate the intersection similar to the screenshots above with the plugin?

2 Likes

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!)

2 Likes

As for some more complicated uses of this plugin, hereā€™s a work-in-progress Diverging Diamond interchange!

8 Likes

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.


image image

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.

10 Likes

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?

1 Like

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.

3 Likes

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
2 Likes

Oops! Thank you! I fixed it on my test place but forgot to put it back in the plugin :flushed:

2 Likes

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

2 Likes

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.

1 Like

When I put the nodes down and click the ā€œRender Allā€ button, nothing happens.
This is the same with the ā€œRender Changesā€ button.

1 Like

Did you follow the tutorial? Click the Delete Lanes button and make sure the lanes are actually present.

1 Like

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.

1 Like

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!

2 Likes

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!

2 Likes

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!

1 Like

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!!

1 Like

Probably lol! :laughing:

2 Likes