Game Development Community

Road Work

by Todd Pickens · 02/08/2007 (10:13 pm) · 26 comments

Ando recently posted some great shots Here of some stuff he was working on.

The work was all stock TGE, (done very well!), but the thing that jumped out was the road he created. It turns out that he made it with a transparent model that is placed a fraction above the map terrain. As he pointed out, doing this on terrain that had hills (or any height variation) would be a real challenge.

This got me surfing the forums a bit, and I noticed that a LOT of people have had difficulty with making roads in TGE.

Depending on what you want to do, creating the road with a set of tiling DIFFs is one solution, and Ando's transparent model approach is another. But a thirds option seemed obvious to me so, so I mocked up a couple of quick test to help illustrate it. All three methods have some obvious limitations and weaknesses. The trick is just to pick the method that provides the best solution for your particular project.

The images below are stock TGE with a tileable road texture that is applied to the terrain just like any other terrain texture. I have the terrain square size set to 8, but this could be done with any acceptable terrain square size. Smaller square sizes will buy you a more detailed terrain mesh and resulting sharper looking textures.

www.shapesandlines.com/wp-content/uploads/2008/06/roadtest01.jpg
Doing a full set of roads with left and right turns, stop signs painted on the ground, etc, would require a good bit more than the stock TGE editor limit of six 256x256 textures. But there are community resources available for expanding that limit. Look Here for more info on that.

Here are a couple more shots. For my test I created a north/south facing road texture, an east/west facing road texture, one rounded 90 turn road texture, and one intersection road texture.

www.shapesandlines.com/wp-content/uploads/2008/06/roadtest02.jpg
www.shapesandlines.com/wp-content/uploads/2008/06/roadtest03.jpg
www.shapesandlines.com/wp-content/uploads/2008/06/roadtest04.jpg
Page«First 1 2 Next»
#21
03/24/2007 (4:14 am)
Thanks much Matt.

I am going to have to revisit this and finish it up at some point.
#22
03/25/2007 (10:25 am)
I can't figure out how you get the road mesh to conform to the terrain??? Any clues?
#23
03/25/2007 (3:13 pm)
Andy, are you talking about my road or the way Ando did it?

The way Ando did it, you just need to get sort of close, to the same shape and good luck matching it to bumpy terrain. His looks better in my opinion and can have a higher resolution appearance.

My approach is simple, its just a terrain texture like any other texture, its just designed to tile. To use it, you would probably want to implement the resource that expands the terrain texture limit so that you could have a greater variety of road options.
#24
03/25/2007 (10:07 pm)
I think I get the idea - I'll have to try it. I wonder if it's possible to paste one large texture over the entire terrain like a satellite pic and then blend smaller maps onto that for grass and dirt, then add a bump map?
#25
03/25/2007 (10:53 pm)
@ Andy, Thats a whole different ball game with regards to texturing methods.
#26
01/06/2008 (2:20 pm)
Thanks for the useful info. :-)
Page«First 1 2 Next»