Skip to main content
gamedev.net
🔒 Locked

Modeling roads

Started by Captain Tex Mar 13, 2005 at 8:58 AM 0 replies 650+ views
Original Post
Captain Tex
Captain Tex
Hi, I'm starting work on a driving simulator. The main goal is to test different scenarios (e.g. how does a driver react to a jay-walker, gap acceptance for making left turns, merging onto a highway, etc). I also want this to be very visually attractive, probably through the use of shaders further up the road. The first area I could use some advice with is modeling terrain and roads. I want to implement uneven terrain and a variety of roads (any number of lanes, raised lane dividers, dashed lane dividers, shoulder areas, merging lanes, highways, city grid-like streets, etc). I've been thinking about NURBS for the terrain and B-Splines for the roads. My only concern with using B-Splines is that I'm not sure how effective they would be for modeling an urban environment (with all the intersections). I'm also afraid that it might be a little tricky setting up the merging lanes and other complicated lanes using a B-Spline system since that is only keeping track of the curvature of the road. A tiling system might be interesting, but I'm afraid it might be too limiting. I don't have much experience with AutoCAD, but I've toyed with the idea of modeling my world in there. If anyone has experience with AutoCAD, I'd love to hear your thoughts on that as well. Basically, I'm just looking for any tips on how I should set up this system. I really appreciate all the great help I'm able to find on the forums here! Thanks, AC
jollyjeffers
jollyjeffers
Hi there [smile]

"I also want this to be very visually attractive, probably through the use of shaders further up the road."[grin]

The terrain could probably be done quite easily using NURBs or similar, unless you're looking to create realistic environments modelling local geography then any "good looking" algorithm should suit you fine. Just remember that from the perspective of a driver/car, you can get incredible draw distances - so a level of detail algorithm might well be on the cards; even more so if you have a lot of urban geometry and vehicles.

Quote:
I'm also afraid that it might be a little tricky setting up the merging lanes and other complicated lanes using a B-Spline system since that is only keeping track of the curvature of the road.

I personally wouldn't use B-Spline's for roads. I would use a complex system of waypoints and a interpolation techniques. I've used "Catmull-Rom" and "Hermite" splines for path finding algorithms before - I like them a lot more than b-spline's because they fit the control points much better, give you a lot more control.

With a grid of waypoints and a selectable interpolation method you could easily get a combination of curved roads and dead-straigh roads/junctions. Also, with a suitable level of detail you could probably model all of the main types of road junctions.

Another bonus of a tightly controlled waypoint system is that you can quite easily model AI and/or general movement - having a set of waypoints for each lane in a road makes it trivial for vehicles to follow the road network. Lots of possibilities for pathfinding and the like.

Quote:
I don't have much experience with AutoCAD, but I've toyed with the idea of modeling my world in there. If anyone has experience with AutoCAD, I'd love to hear your thoughts on that as well.

Using an existing tool is always a definite plus-point; but I'd be a little cautious of jumping into this.

I say this with reference to my previous point of building a graph of roads. If you can export this information, brilliant [grin]. However, loading a "3rd party" model and trying to then add the road network information could well become as complex as writing your own world editor (of sorts)...

hth
Jack
<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ |

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.