Previous Blog Next Blog
Prev/Next Blog
by date

Road Work

Road Work
Name:Todd Pickens
Date Posted:Feb 08, 2007
Rating:4.8 out of 5
Public:YES
Comments:YES
RSS Feed:GarageGames Blog feedor Subscribe with .
Profile Page:View profile page for Todd Pickens

Blog post
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.



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.






Recent Blog Posts
List:07/03/08 - Someone once said...
06/24/07 - I think I saw Bigfoot...
03/31/07 - There's a Surprise Inside!
03/24/07 - Flower Power
02/08/07 - Road Work
01/31/07 - Marathon Man...
11/01/06 - How is a Mini Pack like Bag of Holding?
09/12/06 - Is it dead? ...Get an axe!

Submit ResourceSubmit your own resources!

Todd Pickens   (Feb 08, 2007 at 22:38 GMT)   Resource Rating: 5
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.

Jeppie   (Feb 08, 2007 at 22:54 GMT)   Resource Rating: 5
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.

Todd Pickens   (Feb 08, 2007 at 22:59 GMT)   Resource Rating: 5
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.

Stephan (viKKing) Bondier   (Feb 08, 2007 at 23:14 GMT)
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...

Todd Pickens   (Feb 08, 2007 at 23:21 GMT)   Resource Rating: 5
@ Stephan,

SWEET! That would make you my hero!

Steve Adamson   (Feb 08, 2007 at 23:44 GMT)
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
- - - - - - - - - - - - - - - - - - - - - - -


Tom Spilman   (Feb 09, 2007 at 00:13 GMT)   Resource Rating: 4
Really it's a shame no one has just not made a custom road object for Torque. It's not rocket science people.

Todd Pickens   (Feb 09, 2007 at 00:31 GMT)   Resource Rating: 5
@ 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?

Tom Spilman   (Feb 09, 2007 at 00:36 GMT)   Resource Rating: 4
@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.

Todd Pickens   (Feb 09, 2007 at 00:45 GMT)   Resource Rating: 5
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.

ando   (Feb 09, 2007 at 01:37 GMT)
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

Todd Pickens   (Feb 09, 2007 at 02:04 GMT)   Resource Rating: 5
Thanks Ando!

I agree, there is certainly a demand for a good road solution in Torque.

Tom Bentz   (Feb 09, 2007 at 02:51 GMT)
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.

Todd Pickens   (Feb 09, 2007 at 03:12 GMT)   Resource Rating: 5
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)

T Squared (Thanhda Tie)   (Feb 09, 2007 at 07:14 GMT)
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.

Todd Pickens   (Feb 09, 2007 at 13:54 GMT)   Resource Rating: 5
@ T Squared,

I would be interested in hearing more about that if you find anything out.

Nikhil Sharma   (Feb 09, 2007 at 14:43 GMT)
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. :(

Eric Elwell   (Feb 09, 2007 at 18:44 GMT)
Dig'n it Todd

Todd Pickens   (Feb 09, 2007 at 22:49 GMT)   Resource Rating: 5
@ Nikhil,

Not to my knowledge.

@ Eric,

Thanks Eric. For such a quick hack job, it actually came out much better than I expected.

Matt Damon   (Mar 24, 2007 at 00:52 GMT)   Resource Rating: 5
Amazing work as always man!

Todd Pickens   (Mar 24, 2007 at 04:14 GMT)   Resource Rating: 5
Thanks much Matt.

I am going to have to revisit this and finish it up at some point.

Andy Hawkins   (Mar 25, 2007 at 10:25 GMT)
I can't figure out how you get the road mesh to conform to the terrain??? Any clues?

Todd Pickens   (Mar 25, 2007 at 15:13 GMT)   Resource Rating: 5
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.

Andy Hawkins   (Mar 25, 2007 at 22:07 GMT)
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?

Todd Pickens   (Mar 25, 2007 at 22:53 GMT)   Resource Rating: 5
@ Andy, Thats a whole different ball game with regards to texturing methods.

H.W. Kim   (Jan 06, 2008 at 14:20 GMT)   Resource Rating: 5
Thanks for the useful info. :-)

You must be a member and be logged in to either append comments or rate this resource.