Post news RSS Integrating Vector Data - Roads

Integrating spline-based vector data overlays into the engine, allowing for roads and runways embedded seamlessly into the terrain.

Posted by on

You may remember an earlier blog about roads where the approach and algorithms for creating spline based roads were outlined. At that time it was just a concept of how it may work, with many unresolved issues.

In the past weeks I occupied myself with integrating the road system into the engine, making it more robust and powerful on the way. The road way points now contain additional information such as road type, width, marking style and more that will allow to make a variety of road types, also including forest roads with ruts, for example.

As you can see on the following screenshots, the roads are completely integrated into the terrain - no terrain poking through the road surface ever. The integration also modifies the surrounding terrain to make the embedment natural. Side of the road is initially smooth up to a specified border width (can be specified per road spline node), and after that the fractal roughness gradually takes on.

Screens


Depressions are filled and an embankment is created.

Screens


Routing the road through a rock or hill makes rocky slopes with defined steepness on the side(s).

Screens


More screenshots showing the creation process and the results, with varying level of detail.

Screens Screens Screens Screens Screens Screens Screens

The trees are automatically removed from the road surface and its border area, although sometimes you can see branches hanging over the road.

Screens


Splines allow for some mad road shapes but it still fits into the terrain :)

Screens Screens

Terrain under the road is initially roughly prepared - gaps are filled and excess volume is cut out. This is being done at tile with resolution ~10m, so that fractal algorithm can refine it down naturally. Previously, when the road cut into a hill, the cut was unnaturally smooth. Now only the road border is smooth, gradually transitioning into a rougher fractal structure.

In the following screenshots you can see the process documented:

I. Placing the waypoints - this is currently being done as you move over the terrain pressing a build-road key, later a built-in editor will allow for better editing modes and options.

Screens


II. Rough terrain treatment - note this is actually hidden within the process, I've visualized it here just to show what effect it has on the terrain.

Screens


III. Finalizing the road

Screens


The engine has no problems with terrain resolution (as is apparently the case with many planetary engines), to the extent that asphalt can have actual thickness - I think it's 3cm now (~1.2inch).

Screens


Other notable features are:

  • vector data are automatically partitioned and indexed in quad-tree managing the terrain
  • overlay dirt textures per road type
  • roads can connect, additional helper code will be needed to adjust the spline points and their attributes so that the connection is smoother
  • the same system is also used for terrain leveling, with or without pavement placing or with gravel surface etc.

Finally the process can be seen on the YouTube video. Original uploaded video was 500MB with good quality, but the recompression step on YouTube reduced it considerably.


The same system is used also for runways, here's a teaser screenshot for upcoming video where Angrypig tries to properly land at .. you can guess where this is from :-)

Screens


The corresponding discussion topic on Outerra Forums can be found here

Comments
noveltyboard
noveltyboard

damm, this is mofo good engine, love the features

Reply Good karma Bad karma+6 votes
Tottel
Tottel

A very good job on those roads, they look very good.
However, roads are not made to fit the terrain. It's completely the opposite: You lower/raise the terrain to get a road that is as flat as possible, or with smooth and as few slopes as possible. I wouldn't want to drive a car through the mountains on of your roads. :p

Reply Good karma Bad karma+1 vote
Elementalist
Elementalist

Aw, c'mon, who wants to drive on flat roads? That's why the Top Gear guys go to the Alps!

Haha, but really, amazing engine. Gorgeous and while I don't know what hardware you're using, it looks smooth.

Reply Good karma Bad karma+1 vote
CMDKeen
CMDKeen

Sure that in reality the roads are smoothed, but they can't completly flat. That would be VERY costly and after a few decades, the road would need a total rebuild due to erosion undermining it. It also depends on the road. Almost all roads near my town are of low priority, and so they nearly exactly copy their surrounding terrain.

Reply Good karma Bad karma+1 vote
کєьтα
کєьтα

It depends on when the path the road takes was made. I live in Scotland and many of the roads (outside the cites at least) were made using old cart paths that were well travelled 100s of years ago, so take many twists and turns and lots of steep dips and climbs.

Reply Good karma Bad karma+1 vote
SinKing
SinKing

I like your engine. It reminds me a lot of the Real Virtuality engine, but your smooth roads and early development make me think that Outerra is going to be a whole lot more thought through.

Are there already any games in development, which will use the engine when you're done? Would be interesting to hear what they plan to do.

Reply Good karma Bad karma+1 vote
CMDKeen
CMDKeen

Operation Flashpoint was released in 2001. Real Virtuality is an old engine, and earlier or sooner Bohemia will have to use a different engine (hopefuly this one :D ).

Reply Good karma Bad karma+1 vote
Kamikazi[Uk]
Kamikazi[Uk]

Awesome engine. This looks very beutiful and very useful it's like the crysis road tool.

Reply Good karma Bad karma+1 vote
Nebcake
Nebcake

You guys are doing an excellent job.

Reply Good karma Bad karma+1 vote
Croco15
Croco15

That's really cool.

Reply Good karma Bad karma+1 vote
Rigelblast
Rigelblast

The road system seems to be really good and easy to use. The roads created with it look very natural and fit well into the terrain.

Reply Good karma Bad karma+1 vote
nokanomi
nokanomi

so as far as i read, nobody asked about making a road/tunnel INTO the mountains? is that possible? also, i just realized this but, will this engine have automatic servers built-in for mods, or will modders have to set it all up themselves?

Reply Good karma Bad karma+1 vote
cameni Author
cameni

Tunnels and bridges will be handled differently, this is only for the roads lying on terrain.
But I don't understand the question about servers ..

Reply Good karma+1 vote
nokanomi
nokanomi

as in, the source engine has an automatic server hosting system, i guess thats kind of what i meant to do with servers, will modders have to hook up servers on their own or what is the deal with that?

Reply Good karma Bad karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.