Game Development Reference
In-Depth Information
has a texture coordinate for its instance corresponding to the terrain and a texture
coordinate for its instance corresponding to the road. For each vertex of a shared
edge, a third texture coordinate is needed to represent the wraparound. The com-
plication in the bookkeeping was not the generation of vertex data; rather, a tool
already existed for loading vertex buffers corresponding to the terrain and roads.
The output of this tool was then decomposed to create vertex buffers that were of
an optimal size for the graphics hardware. The terrain tool had to generate its data
in a manner that allowed saving it to disk so that the vertex buffer loader could
process the additional texture coordinates.
10.4.3 Y-Junction Roads
Another variation that was natural to the game involved support for roads that have
a Y-junction (or T-junction, depending on how you want to label the junctions).
Because we were on a tight schedule, modifying the terrain tool to support this
would have been time consuming. Instead, we asked the level artists to use only
linear or looped roads. A Y-junction was built so that an upper arm of the “Y”
did not quite meet the branch point. Some high-quality texturing hid the fact that
the Y-junction was not technically a “Y”.
10.4.4 Placement of World Objects
Manual stitching of the roads into the terrain is very tedious and time consuming,
but so is stitching of world objects such as buildings or track-side objects. The
terrain tool input-file format was modified to allow the artists to specify whether
an object was a road to be stenciled into the terrain, with inheritance of terrain
vertices and interpolation of texture coordinates, or a world object to be stitched
into the terrain by cutting out that portion of the terrain covered by the object. In
the cutout option, terrain vertices were simply discarded, and the terrain vertices
on the boundary of the cutout were adjusted to match the base of the world object.
10.4.5 Support for Tweaking the Results
Sometimes the triangles that bordered the boundary between roads and terrains
were not quite what the artists wanted. I had discussed options to add support to
the terrain tool to allow the artists to tweak the results to their satisfaction and in
a manner that matched how artists think (not how programmers think), but the
schedule would not support it.
This meant that the level artists needed to avoid tweaking the results during
development because the terrain tool could not preserve the intermediate (manual)
tweaks for incorporation into the next pass of the tool. Tweaking occurred near
shipping time. It is certainly possible to support such a feature, but it requires
careful management of the content pipeline to ensure all stages are applied correctly
to the content.
Search WWH ::




Custom Search