How road creation works?

Started by
5 comments, last by KulSeran 13 years, 7 months ago
Just curious. I'm a 3D developer but I've never worked in a game. Other day I was playing Burnout and I asked myself, how are roads generated? In generar porpouse, are they static mesh or dynamic mesh? Thanks in advance
Advertisement
In my experience a designer draws a top down view of the track, maybe marks a few important structures and specific track features then hands it to the artists. They then build it like any other mesh in max/maya, however they build two versions. A visual mesh which has crap loads of polygon's and looks pretty, and a collision mesh which has far fewer polygon's, all the invisible walls stopping you from going off the track and the polygons are flagged for things like dirt/wet/concrete that the engine uses to spawn particles or alter handling.

Objects like tables and fences that can be interacted with are then placed as instanced objects with a flag to let the exporter know not to export the polygon, just the position, which the engine then reads and places the object itself during loading.

Mostly though, its just a mesh like any other, with a few fancy flag checks on export to split out visual mesh, collision mesh and objects, and some kind of PVS data.

Like everything however there are a millions way to do it and this is just one.
^What he said ;)

There's plugins/scripts for Max/Maya/etc to make this job easier on the modelers, but generally they'd be build just like any other environment model (static mesh).

Also, there are some stand-alone tools that are designed for this purpose, such as City Engine.
Great answers, thank you.

So, if the track is a static mesh, does it mean graphic engine has loaded the whole track before race starts? Then, has the track the same behaviour like a common character (in "load/free model" senses) or should be managed in other way?
Hi there,

It depends.
If it's to complicated or large it's usually devided into regions by the game engine. You could also load several display meshes of varying detail and do region based LOD (level of detail) on the track.
This doesn't mean you have to divide it before loading it into the game engine - usually the game engine splits meshes as appropriate.
"Game Maker For Life, probably never professional thou." =)
It is true what pto and Hodgman said. This technique is commonly used in game development.

I just wanted to point out that there are other techniques that are more procedural. You can model a terrain and add roads by placing way points. By using some heuristic the terrain is altered to match the road and make it look natural. For example on a slope the terrain is caved to match the road. Then buildings and other Objects are placed on the terrain. This works for any game, including racing games.

Examples for this are CityScape as seen on GameDev or the CryEngine2 Sandbox.
Rioki - http://www.rioki.org
Quote:
This doesn't mean you have to divide it before loading it into the game engine - usually the game engine splits meshes as appropriate.

I'm going to counter-point this. I've never worked with an engine the "splits meshes as appropriate" as all that is done in the tools. Even the higher level subdivisions are taken care of by a lot of tools that build BSP trees or split the world based on artist placed portals.

There is a LOT to be said for pre-processing your data. Consider that many console titles have to pre-process their data into the single format their console understands. It would be expensive to do all the conversions at runtime, so everything is processed offline. This also gives most games a chance to do other stuff with their data, like package up items based on usage patterns and the like.

This topic is closed to new replies.

Advertisement