Category Archives: Level Geometry

Description

Procedural Modeling of Buildings

A very nice procedural method to generate buildings for cities that undoubtly could be used in games. The abstract for the paper:

“CGA shape, a novel shape grammar for the procedural modeling of CG architecture, produces building shells with high visual quality and geometric detail. It produces extensive architectural models for computer games and movies, at low cost. Context sensitive shape rules allow the user to specify interactions between the entities of the hierarchical shape descriptions. Selected examples demonstrate solutions to previously unsolved modeling problems, especially to consistent mass modeling with volumetric shapes of arbitrary orientation. CGA shape is shown to efficiently generate massive urban models with unprecedented level of detail, with the virtual rebuilding of the archaeological site of Pompeii as a case in point. “

 Procedural City Generation

Link to the paper, videos and a presentation of the technique:
http://www.vision.ee.ethz.ch/~pmueller/wiki/CityEngine/PaperBuildings

Terrain Texturing with Texture Splatting

The old way to do splatting was to assign a texture for each triangle/quad in the terrain and then let GPU create the fading between the different textures. The following link is to one of the most famous descriptions of such an technique:

http://cbloom.com/3d/techdocs/splatting.txt

The drawback with the method is that is uses fillrate a lot as each triangle is drawn multiple times to archive the fade. Therefore new methods with shaders or multitexturing is to prefer.

Many games uses nowadays alpha maps together with terrain textures to do splatting. The alpha map decides where the texture should be splatted to the terrain. For each texture that should be used on the terrain, one texture channel is needed for the alpha map. The size of this texture determines the quality/resolution of the transitions between different types of textures on the terrain. Below is and example of a such alpha map and how it looks like in a game.

To the left is the textures used, notice how low resolution they are allowed to have. To the right is one of the alpha maps (for the dark grass).  

Alpha Map Texture Splatting

Render of the terrain with splatting in jMonkeyEngine:

Splatting in jMonkeyEngine

In the following link is a comparision of using a single large texture to cover the whole terrain versus using splatting of a few small textures.

http://mikescodeblog.blogspot.com/2007/11/3d-landscape-rendering-with-texture.html 

The game Sid Meier’s Railroads uses a kind of splatting that is either vertex or quad based. Their maps consist of a single texture where each pixel in the texture has a colour that is connected to a specific terrain texture. This allows for a large amount of different textures for the terrain in the same map, but limits the type of fading between different textures.

Example of how a map could look like in RailRoads

Here’s a screenshot of how the maps in the game Supreme Commander are created. The game uses splatting and can only handle five different textures. One is the base texture and fills up where no other texture are. The rest of the four texturelayers requires alpha maps and they are saved in a single RGBA texture. The shot below shows how beautiful splatting can be when implemented correctly. The water is only height dependent and is therefore not splatted.

Alpha Map creation for Supreme Commander

The source of the image is the following tutorial of how to make maps for Supreme Commander:
http://supcom.wikia.com/wiki/Height-_/_Texturemaps_with_image_editing_tools

Mega Textures

Instead of the normal way of texturing with tiled images and trying to blend different types of textures together this approch uses one big texture that covers the whole terrain. Because of the size needed for the texture, some smart mipmapping and also compression of the data is needed. The big advantage above the other methods seems to be that this enables the artist to draw the terrain however she likes. There are simply no limits of the number of textures that can be used in the final mega texture.  

Mega Textures Rendering

Link to more in detail description of the method:
http://www.beyond3d.com/content/articles/95/1

A similar method called Sparse Virtual Texturing:
http://silverspaceship.com/src/svt/