Beautiful Roads Plugin (deprecated)

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

Wow! That’s amazing!
Can you add the ability to use your own road?