Unity Road System

We are working on some assets for a future game and would love some feedback on our “work in progress” road system. Mainly, the road system must be able to support very complex road networking in a very simple manner. The idea is to remain unassisted from third party software and be able to diagram in the unity editor. The road system must be able to provide several configuration parameters and various functions to aid a future AI that can use the network to simulate traffic.

All the mesh is generated procedurally and basically the approach is to have an orientative set of bezier curves which “diagram” the road network to be rendered. The process of rendering must be very performant, and the resulting mesh must be very efficient in polygon count.

Here you can see some of our first tests showing some intense calculation in various intersections, all solved procedurally, and quite performant. Please excuse the poor and simple textures and presentation, all textures can be replaced via the editor.


Here you can see a complex 3 road intersection being generated on the fly.

This is another test with a more complex network. This is probably unrealistic, but the idea is to strain the process and see results.


Most curves are in very few steps for the test, but we have already included a process for smoothing and increasing resolution in this type of sections.

Our brief feature roadmap goes as follows:
Simple design with curves very complex road networks [Done]
Road mesh procedurally generated [Done]
Auto calculated intersections [Done]
Customizable widths for road and sidewalk sections [Done]
Customizable textures [Done]
Bezier design of road/sidewalk sections [Done]
Conform to terrain and other unity 3D objects [In progress]
Roundabouts generated on the fly [In progress]
Adapt the unity terrain to road [Aug 2016]
Decals & sculpturing tools to add detail [Sept 2016]
Possibly publish beta 0.7 [Sept 2016]
Noise for bumpiness in road [Nov 2016]
Grid node system for AI implementation [Nov 2016]

Version 1.

Finally, if there is some interest for this asset please express it as we may consider publishing.

Chris

3 Likes

This is precisely what I would like to have!

I’m sure you’ve done your competition research already, but you might be up against some stiff competition from things like “easy roads” (on the front page of WIP at the moment also). What does your asset do that they don’t?

Dear friends, thanks for your interest.

Also, thanks to @LeftyRighty , as yours is a very good question. Before answering your question please also let me remark our development is now in pre-alpha stage, and we still have some weeks to go to have a tested beta to consider including in the asset store.

You are right, we’ve seen various products in the asset store and tested them individually, probably being “Easy Roads” one of the most complete ones. But despite this, we decided to develop our own asset due to the lack of certain characteristics we considered vital to our development process, which in no way pretends to diminish other products achievements.

The main reasons for our course of action were:

We couldn’t have access to the source code in some of this products (eg. easy roads).

Additionally we wanted the road network mesh to be fully procedural, and none of the other solutions we’ve tested solved properly intersections. For example Easy Roads V3 (I’m not considering V2 as it is mainly a looped circuit designer and roads simply overlap) intersections are predesigned and the author has included a tool to create “templates” for further create particular ones.

Intersections are quite a challenge to be solved procedurally and I guess this is why this hasn’t been done by other developers. In our development crossing roads is simply solved algorithmically, no need to create the intersections.

Also, as we were thinking in very complex road networks upon our design, our product is aimed for performance. We are very serious in our process on poly counts and handling lods. Poly count increases to smoothen curves and decreases in straight sections, and as this is dynamic, if you define a camera, the roads level of detail varies with distance.

On other notes, solutions as Easy Roads needs a terrain to be placed on while ours no, any mesh will do.
We’ve also have set basis for an AI interaction with the road system, and various other features.

The idea is to have a road network fast and felxible tool. We will post some video on our workflow to illustrate this process in the near future.

If you request further info I’d be glad to extend myself.

Chris

2 Likes

Thanks for the detailed explanation, I’d personally love to see how this tool looks when there are elevation differences (ie. not a flat road), making roads for uneven areas is such a pain and it would be amazing to be able to just lay down some curves and have it just ‘work’

Excited to see this progress! And I’d love to be able to try this out if you need testers :slight_smile:

Hi there !

We’ve added height to our sidewalks with independent widths in the road system. Backface culling has been implemented so only relevant sides are drawn. We will be posting further info about this feature, as now we are working the intersections so to consider this extrusion.

5 Likes

Hi atilah, very nice. Can you briefly explain how you create the intersection mesh?

Very nice, but not enough roundabouts :slight_smile:

1 Like

Would be great if the extrusion profile of the road could be defined by a Unity Animation Curve, that would make things real simple and powerful

1 Like

Thanks for this great suggestion! I’ve made a simple roadtool with splines and I was thinking how I could make a profile editor without writing an extensive UI for it. Currently I’m using game objects that define lines but the simplicity and elegance of your idea just amazes me. I’ve used Animation Curves for many things but this just didn’t occur to me at all! It makes perfect sense to me.

Don’t mind me btw… Just lurking here and there and I just love procedural stuff.

@willemsenzo Animation curves are one of my favorite features in Unity, especially when it comes to procedural things!

They sure are the real deal. The best thing since sliced bread hehe.:stuck_out_tongue:

Of course, we work with shapes and clip of the differences. It’s long to explain as it comprehends various steps in the process but the main idea is that we make a boolean operation with the mesh object and remove extras.

Looks interesting but conforming to mesh terrain (not unity terrain) or other mesh topologies is an important aspect of any road system. In addition to this, perhaps consider the kerb (sidewalk) and road to be controlled by an AnimationCurve type value so we can say ok it’s bumpy here but smooths out over there or has a funky shape. Finally the road itself needs to be rather deformable: it might not be a road but a dirt path feathering alpha to 0, just thoughts!

1 Like

So are mine !!! We had thought of implementing this, but we will have to consider various issues. As intersections need to be performant and neat in design, the intersection of different shaped meshes is a complex thing to solve. We will have to look into this with detail before giving a positive answer, but we will surely try to give this a solution or a neat workaround.

Thanks for your comment, we totally agree. As bumps, holes and various other details need to be included we will probably include a sculpting/decals tool to achieve this. We don’t want to compromise the simplicity and performance in the diagramming of the road network.

Cool, and thanks for commenting !

You’re welcome! I love to see what becomes of this. May I ask you what sources you use for inspiration? In particular when it comes to workflow. For example I get inspired by Simcity. I really like the way you create roads and how you can add new roads and remove them. Of course it has way less options, but the general workflow is something I enjoy while creating a map. I’m curious to know what inspires you if that’s alright, and perhaps how that reflects in the product. To me it looks a bit like how CityEngine works, which is a neat tool but the workflow is a whole different story.

Thanks for the support and… you are so correct !!! Simcity, City Skylines, and probably Esri CityEngine, all of them are under the hood !!! This idea (which we started for a project of a driving sim) was a fast way of prototyping and setting the base for a small city that is realistic enough to provide the experience of driving through it. Let me also mention road networking is the first phase. The idea is to provide various tools for infrastructure development (railway, buildings, etc.) with a more procedural + unityeditor approach. We will see, its going to be a lot of work, but we are a small team with the idea of moving our development labour into unity.

Nice, those are some good sources for inspiration. I never tried City Skylines but if I’m correct it’s similar to Simcity, and best thing of it that it’s made with Unity. Did you by any chance also try Pixelactive Cityscape? I liked that workflow a lot more than CityEngine, too bad AutoDesk got its hands on it and development has been stopped. If you haven’t heard of it before you might want to check some videos on youtube, just to get another different perspective. :slight_smile: