|
Creating Terrains - In Pursuit of the Great Outdoors |
Download |
|
|
|
 |
| |
|
|
Terrains are simply a collection of triangles arranged in such a way to look like organic shapes.
The methods and technologies needed to create this illusion can be time consuming to learn, but once
mastered will give a map a much needed visual boost. Often maps can feel like a collection of claustrophobic
rooms and corridors but with the addition of terrains the pattern can be broken.
This article is not for the faint hearted and will be difficult to understand for people new to mapping.
There is a lot of different terminology used in this article and due to time limits cannot be discussed
in fine detail here. It is highly recommended that you are really familiar with the
Q3 shader manual
first, as this will help reduce the frustration factor of creating terrains.
Before diving straight into the creation of terrains the first part of the article will discuss the history
of the technology and show how it has changed over the years.
The second part of the article will be dedicated to the creation of a terrain using the latest methods
and compiler from Shaderlab. This article is designed to work
with most Q3 engine type games and does not use any specific engine features.
Some of the methods used in this article have been covered in more detail in other tutorials and it is
highly recommended that you read them if you become stuck. As and when the previous methods are used in this
article, hyper links will be available for you to follow.
The following Sample File
contains a collection of maps that were used to create the screenshots for this article. If you want to
experiment with terrain blending and alpha fade brushwork while reading this article then I recommend
having a look at the sample maps and using them as a guide.
A good example of what can be achieved with the latest terrain blending and alpha fade brushwork can be
found in the map Pyramid of the Magician. Most of the ideas and
suggestions mentioned in this article were initially developed in this map. The source files are also
available if you want to study the process in greater detail.
Finally I would like to thank certain individuals who have helped create this article.
Randy "ydnar" Reddig for constantly answering my questions and offering technical support with the finer
details of the DotProduct2 system. Ken "kat" Beyer and Tom "shallow" Waters for proof reading this article and
providing excellent feedback on the content and layout.
|
|
|
|
|
 |
|
|
 |
| |
|
|
 |
|
The initial terrain was a collection of fixed sized triangles arranged in a mesh or grid. The
texturing was done via a metashader (a collection of special shaders) and the
blends on the terrain were done via an external alpha map. (PCX file format)
In order for the compiler to know where everything was, the terrain triangles were grouped
together and given special keys. These keys specified the total textures / layers used,
the metashader name and the external alpha map name / location.
The metashader file could be very long and time consuming to change and with all the extra
keys required on various entities things often went wrong. The terrain was vertex lit
and generally glowed because of the flat lighting model.
|
|
|
|
 |
|
|
 |
| |
|
|
 |
|
The next change was a subtle one with regards to technology but visually was a giant leap forward.
The metashader was changed to use lightmaps instead of flat vertex light. This allowed for
the rest of the map to cast shadows onto the terrain.
The terrain mesh and blending was still done as before but there were several third party
tools available which could help with the creation process. This also allowed for the terrain to be
painted with textures instead of guessing with an external image.
As the terrain textures were often stretch over large distances a detail texture was added to
give the illusion of greater texture resolution. This did come at a price to the video card
and the terrain shader would often have up to 4 layers to display.
|
|
|
|
 |
|
|
 |
| |
|
|
 |
|
Finally a new system was developed and the long and confusing metashader was replaced
with a single shader using 2 textures. The steepness of the terrain triangles was used
for blending purposes and the triangle grid could now be any shape, size or form!
It was now easier to make realistic terrain shapes and not be burdened with complex
technology to create terrain. But this system had one flaw, each terrain shader could initially
only support two textures. (More could be added but at a greater performance hit)
The best solution at the time was to hide the material seams with decal textures like paths
or roads but even these textures could only be stretch so far. There was also no way to control
the blends manually which meant that blending occurred at the mercy of the triangles.
|
|
|
|
 |
|
|
DotProduct2 + Alpha Fade Terrain |
|
|
 |
| |
|
|
 |
|
With the introduction of the Alpha Fade brushwork system, terrains can now be blended
with the minimum amount of fuss. Starting with the DotProduct2 shader as the initial pass
on the terrain and then followed by fine tuning with Alpha Fade brushes afterwards.
With this new exact control over the alpha blends the previous DotProduct2 texture limitation
can now be broken. Using the Alpha Fade brushes on the borders between different terrains,
multiple DotProduct2 shaders can now be seamlessly linked together.
The Alpha Fade brush system is not just limited to blending terrains and can also be used for
other applications too. Any texture with an alpha channel and the relevant shader setup can
also be blended with the same precision as terrains.
|
|
|
|
 |
|
|
| Articles |
 |
 |
|
| Links |
 |
 |
|
| Archive |
 |
 |
|
|