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 «Previous 1 2
#1
02/08/2007 (10:38 pm)
What would REALLY rock, would be a per terrain texture detail texture resource.

This would mean that for each terrain texture, grass, road and sand, for example. You would be able to assign a detail texture that would be appropriate.

So for the road you could assign a cracked asphalt detail texture, and for the grass a grass detail texture, etc.

As it is, you have to use a sort of ambiguous one style fit all detail texture.
#2
02/08/2007 (10:54 pm)
Todd,

Quit farting around and get to work on your next content pack! My new game needs some more of your awesome goo, lol.

j/k, interesting stuff.
#3
02/08/2007 (10:59 pm)
Ha ha ha! Thanks Jeppie.

What sort of art are you looking for? I can tell you what in the works and what order its most likely coming out in.
#4
02/08/2007 (11:14 pm)
Quote:What would REALLY rock, would be a per terrain texture detail texture resource.

This would mean that for each terrain texture, grass, road and sand, for example. You would be able to assign a detail texture that would be appropriate.

So for the road you could assign a cracked asphalt detail texture, and for the grass a grass detail texture, etc.

This is on my to do list...
#5
02/08/2007 (11:21 pm)
@ Stephan,

SWEET! That would make you my hero!
#6
02/08/2007 (11:44 pm)
Todd;

As always, a touch of class ;) Simply awesome work. Looks like it works rather nice, except for a couple minor blend issues from corner to straight.... Mind you when your driving going 100+ M.P.H, I do not think anyone will notice. . . . or care. hahahaha.

- Steve Adamson
President
Gear Worx Productions
- - - - - - - - - - - - - - - - - - - - - - -
#7
02/09/2007 (12:13 am)
Really it's a shame no one has just not made a custom road object for Torque. It's not rocket science people.
#8
02/09/2007 (12:31 am)
@ Steve,

Thanks much. Yup I spotted that little blend error as well. It was some pretty sloppy and fast Photoshop work, but I may get around to fixing it and finishing the tile set.

@Tom,

I assume you mean a model, or tiling model set?
#9
02/09/2007 (12:36 am)
@Todd - I mean code... the problem with roads is that you need code to do them right. You define two splines for each side of the road and the code builds a surface between them and places your texture on it.

If i ever get time i'll do this i'll write a full car code pack, and make a bundle of money. ;)

Someone should really beat me to this... please.
#10
02/09/2007 (12:45 am)
Oh' right, thats different :P

Yup, I imagine that would be the best all around solution, and definitely the way to got for any sort of interesting race track.
#11
02/09/2007 (1:37 am)
Nice one Todd, great stuff, I hope some voodoo magic man (programmer) will actualy have a go at this stuff and save us Arty types from overheating :P
#12
02/09/2007 (2:04 am)
Thanks Ando!

I agree, there is certainly a demand for a good road solution in Torque.
#13
02/09/2007 (2:51 am)
That looks pretty nice. I thought about doing something in code but not knowing c++ would make it quite a challenge. I'll end up getting into it sometime.
#14
02/09/2007 (3:12 am)
Thanks Tom,

The terrain texture path is a pretty simple solution.

It would be even more powerful if you could flip and or rotate textures in the terrain editor. I worked with a similar map builder once that had those features, and it really allowed the artist to maximize the use of textures, with the minimum impact on the final memory footprint.

Thats another idea for a resource if any one is feeling so inclined ;O)
#15
02/09/2007 (7:14 am)
nice. looks good. but i think there is a way in code to get that working. i believe AFX has some code embeded that allows you to paint a image with transparency onto the terrain. I'll have to look more into it.
#16
02/09/2007 (1:54 pm)
@ T Squared,

I would be interested in hearing more about that if you find anything out.
#17
02/09/2007 (2:43 pm)
Is there any resource that increases the texture res (above 256x256) for the terrain? I tried searching but didn't find anything useful for this. :(
#18
02/09/2007 (6:44 pm)
Dig'n it Todd
#19
02/09/2007 (10:49 pm)
@ Nikhil,

Not to my knowledge.

@ Eric,

Thanks Eric. For such a quick hack job, it actually came out much better than I expected.
#20
03/24/2007 (12:52 am)
Amazing work as always man!
Page «Previous 1 2