See also:

- VGuide: 3D guidelines in AC3D
- Using an alignment plane in AC3D
- Circumscribed circles in AC3D

Creating "light" terrain in AC3D

The most commonly used method for creating terrain in 3D modeling is heightmaps. Basically, heightmaps are greyscale image bitmaps of the desired terrain, with black corresponding to the lowest altitude and white corresponding to the highest. Here is such an image, where you can "feel" clearly a peaked mountain (bottom right) with a lake at its foot (top left):

Heightmaps being so common, a number of 3D modeling sofwares have plugins or even native tools that convert them at a stroke into 3D meshes. There is no such tool at present in AC3D (version 6.1) but I suppose that it will be added sooner or later. What does exist is a Terragen terrain importer (Terragen is a freeware/shareware terrain creation software).

Heightmaps have a fault: they are prone to translate into very heavy and cumbersome meshes, genuine framerate killers. Usually one vertex is created for every heightmap pixel, which means that for a single 256x256 heightmap you could end up with 65,536 vertices. There is an alternative, though, which may look clumsy at first, but which will yield adequate results in many cases, the resulting meshes being much "lighter" than those produced with heightmaps. It is based on contour lines and uses only native AC3D tools. This technique has nothing very new or very original, but I thought it worthwhile to describe it in some detail.

Contour lines connect the terrain's points that are at the same altitude. They appear in Ordnance Survey or equivalent maps, and once you have got the knack, creating them for imaginary terrain is very easy. Here I decided to create an imaginary terrain, and I drew the corresponding map:

I know: this is a very crude map, and yet you will see what I got out of it. Also, the colours are not nice, but then I am not an artist; they have been chosen to assist in drawing the contour lines, and they are vaguely conventional, so that the map could serve as a basis for the future terrain texture.

I used the map to texture a square surface, which I placed at the origin, with a slightly negative Y coordinate. I could have used the map as a background image, but this trick makes it unnecessary to save and reload later the background image configuration (which is currently not saved by AC3D).

I then drew the contour lines one by one, including a square one that gives the terrain's limits. When I clicked on the right mouse button to terminate the contour line, it was automatically selected by AC3D, and all I had to do was to move it to the required altitude. This is the only tricky part of the process, and here you should work slowly and deliberately, starting with the lowest altitudes and finishing with the highest. Also, you can see that I used "ridges" to finish off the mountains, not isolated vertices. Also a few vertices were "randomized" to add visual interest.

Vertices were added on terrain's sides, to help triangulation (this was easily and quickly done with my VGuide script:

And that was it! The hard work was done.I switched to vertex select mode, select a single vertex at random, then clicked on "Vertex/Create 2D Mesh/xz (Plan)". This is what I got (a bit rough, but I knew I could fix that):

It was now necessary to get rid of the contour lines. I switched to object select mode, selected the new mesh (which at that point had 573 vertices), and clicked "Hide/selected". Then I got back to vertex select mode and clicked "Edit/Select all", then "Edit/DElete". Contour lines gone! Once more in object select mode, I clicked "Hide/none" and got my mesh back. To make it look more natural, I applied surface subdivision to the object (once seemed to be enough) and got this after having clicked "Object/Commit Subdivision":

Using the TCE, I textured the mesh with the map. The link between the map's colours and the altitudes is obvious:

I then reworked the map as a very crude texture and got this. Okay, okay, I am not an artist and you can certainly create much better textures but that's not important. What is important is that this terrain object has 3,257 vertices and 3,168 polys. The very same terrain created with a heightmap would have way more vertices and polys. Besides, this is a perfectly standard mesh which you can edit, scale and resize as you wish.

As you can well imagine, this technique can be particularly useful for games, where the terrain is often imaginary and it is essential to keep the polygon count to a strict minimum.

Download the mesh