Skip to content

A Conundrum

February 8, 2013

Hello folks! I’ve been back from that short hiatus for about two weeks (was out of town) and have gotten right back to work but I had run into a problem.

Before I left, I had some scenery set up that was almost ready for the update. The only thing left to do was to lay down some roads which I had begun to build in a modular fashion. Fast forward a couple of weeks and I am back and resuming my modular road building. I then proceeded to take these road sections into the UDK. Turns out I didn’t anticipate what a pain that would be.

For a small suburban scene with relatively even roads, it poses no problem as all you have to do is lay the meshes down and continue duplicating them to expand your network. The problem for me, was that the current map that I am working on is set in more natural surroundings with a lot of rolling hills and valleys. A flat modular set of road meshes would not work as they need to conform organically to the environment.

So I went back and made more modular pieces that included more variations and tried laying them down. It turned out that it was a lot of work getting these sections to connect where they should in the Editor but the real pain came when I had to adjust the landscape in UDK to match the height and slope of the road network. This is all well and good for small scenes but not when you have a large environment (I did a test a few months ago and I think it took somewhere between 15-20 minutes of real time to run in a straight line from one end of the map to the other, so it is a very big environment)

So, I spent the last week and a half looking for other solutions and have tried out several methods to align my roads to the terrain with very little success. I’ve tried heightmap methods, road generators, several plugins, modeling techniques to conform meshes/splines and have even tried to use decals to lay road in the UDK Editor (UDK does not have any type of spline-based road laying tool, which is unfortunate as it would have alleviated these problems) but none of these methods produced the results that I needed and in some cases, created new problems.

I finally came up with a method to do this, oddly enough, while I was doing some vacuuming! I haven’t really seen this method used (maybe I haven’t looked hard enough) but it’s an interesting technique to model your terrain, have a road that conforms to the terrain and is set up in a way that makes UVing your road pretty easy. Now, it’s not the most elegant method nor is it really flexible when it comes to winding roads but at the moment, it does what I need and I can continue on with my mapping. Oh, and by the way this method saves me about 20+ frames in-game, so that’s always a plus!

I was thinking about making a tutorial on this soon (and perhaps create a tutorial section on this site) as it might save someone else some time if they’re struggling with a solution for a road network on large terrain.

From → Out Of Hell

3 Comments
  1. YoYoBatty permalink

    You always seem to come up with an innovative solution to things on your own, good job. I’m glad to see that you’re making great progress on the game, also when will we be seeing those environment pictures you mentioned a while back?

    • I wrote a reply but it was actually quite long, so I wrote a post instead. See the front page my friend 🙂

  2. – Great games – great problems… Good luck!

Comments are closed.

%d bloggers like this: