portfolio
GMTS Landscape
GMTS logo
Early in 2007 I developed all the landscapes for the US Navy training game GeoCommander Master Training Station (GMTS), developed at Whatif Productions. The game curriculum required a large area of terrain in order to teach its concepts, so the landscape in the game had to cover hundreds of square miles.

download (8MB WMV file)

I developed a system for generating and arranging the landscape tiles so a limited number of pieces could be replicated to create the huge space. The tile approach also allowed the rendering code to drop meshes outside the far clipping plane, increasing performance.

GMTS landscape city
In the landscape shader I combined together multiple tiling bitmaps, using a grayscale bitmap masking feature of the engine called "veils". These allowed the mixing to be controlled on a per-pixel basis instead of the more common method of blending per-vertex. The veils had a significant performance cost because they incurred multiple lighting passes to shade the various tiling normal maps, but they did create a lot of fine detail and allowed me to hide tiling artifacts.

GMTS landscape overcast
We ended up removing lighting altogether from the game because we didn't have the programming resources to solve a shadow-mapping problem. So instead I did all the lighting in the game with diffusely-convolved cube maps. I created these with a custom light-baking rig in 3ds Max that let me adjust lights in real time to see how they would look when projected as a cube map. The cube map solution avoided the shadow artifacts we were seeing and improved the framerate dramatically, allowing us to add a bunch of other rendering effects to the game.

GMTS landscape sunset
Another lighting problem developed when we attempted to rotate the tiles 90° in the game. When rotated pieces were placed next to one another, their normal map tangent spaces didn't match, so we got noticeable lighting seams. The solution was for me to rotate the meshes, but reverse-rotate their normal maps so all the tiles would have consistent tangency.

Below is a list of icons for all the landscape tiles used in the game. Each tile is approximately 1 mile square. The four top rows are verdant terrains, the middle four are transition tiles that go from verdant to arid, and the bottom four are arid terrains. Some of the tiles used the same base mesh but had elements added to them like clusters of buildings or waves breaking on the shore.

GMTS landscape tiles
I devised a scheme to align the vertices, normals, and UVs along the edges of each terrain mesh so they could be placed next to one another without seams. For example, all the half-water/half-land tiles could be snapped to each another seamlessly, because their shorelines were in the same position along their edges.

Below is the code format the programmers needed to actually generate the terrain layout in-game.

GMTS terrainmap code
We had no level editor for the game. I hobbled something together using an HTML editor and the terrain icons from above, just so I could see the layout as I worked. This helped immensely since I could see right away if I chose a tile that wouldn't match its neighbor properly. When I was finished editing I simply did a find/replace on the HTML code to generate the proper format for the programmers to use.

Below is a screengrab of the preview window for the HTML editor HTML-Kit. It has an auto-refresh feature that allowed me to edit the HTML code and see the results update immediately.

GMTS level editor