Difference between revisions of "Terrain Extension"
From Horde3D Wiki
(moving Category: Extensions to the extension) |
|||
Line 1: | Line 1: | ||
− | { | + | [[category: Extensions]] |
− | | | + | {| border="0" |
− | | | + | | {{ContentBlock|width=800|color=white |content= |
− | | | + | The Terrain Extension extends Horde3D with the capability to render large landscapes. A special level of detail algorithm adapts the resolution of the terrain mesh so that near regions get more details than remote ones. The algorithm also considers the geometric complexity of the terrain to increase the resolution solely where this is really required. This makes the rendering fast and provides a high quality with a minimum of popping artifacts. |
− | | | + | |
− | + | A height map is used to define the altitude of the terrain. The height map is a usual texture map that encodes 16 bit height information in two channels. The red channel of the texture contains the coarse height, while the green channel encodes finer graduations. The encoding of the information is usually done with an appropriate tool. If you just want to use 8 bit height information, you can simply copy the greyscale image to the red channel of the height map and leave the green channel black. | |
− | |||
− | | | ||
− | |||
− | The Terrain Extension extends Horde3D with the capability to render large landscapes. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | A special level of detail algorithm adapts the resolution of the terrain mesh so that near regions get more details than remote ones. The algorithm considers the geometric complexity of the terrain to increase the resolution solely where this is required. This makes the rendering fast and provides a high quality with a minimum of popping artifacts. | ||
− | |||
− | |||
− | |||
− | A height map is used to define the altitude of the terrain. | ||
− | |||
− | The height map is a usual texture map that encodes 16 bit height information in two channels. The red channel of the texture contains the coarse height, while the green channel encodes finer graduations. The encoding of the information is usually done with an appropriate tool. If you just want to use 8 bit height information, you can simply copy the greyscale image to the red channel of the height map and leave the green channel black. | ||
− | |||
− | |||
+ | = Installation Windows = | ||
To install the extension, simply copy the contents of the extension root directory to the Horde3D SDK folder and merge the directories. In Visual Studio, add the extension and sample projects to the solution. Then add the extension project to the project dependencies of the Horde3D Engine and the Horde3D Engine to the dependencies of the Terrain Sample. After that, include 'Terrain/extension.h' in 'egExtensions.cpp' of the engine and add '#pragma comment( lib, "Extension_Terrain.lib" )' to link against the terrain extension (under Windows). Finally, add the following line to ExtensionManager::installExtensions to register the extension: | To install the extension, simply copy the contents of the extension root directory to the Horde3D SDK folder and merge the directories. In Visual Studio, add the extension and sample projects to the solution. Then add the extension project to the project dependencies of the Horde3D Engine and the Horde3D Engine to the dependencies of the Terrain Sample. After that, include 'Terrain/extension.h' in 'egExtensions.cpp' of the engine and add '#pragma comment( lib, "Extension_Terrain.lib" )' to link against the terrain extension (under Windows). Finally, add the following line to ExtensionManager::installExtensions to register the extension: | ||
Line 33: | Line 16: | ||
The extension is then part of the Horde3D DLL and can be used with the Horde3DTerrain.h header file. | The extension is then part of the Horde3D DLL and can be used with the Horde3DTerrain.h header file. | ||
− | + | = Installation Linux = | |
Go to your target directory where you want to install Horde3D. Then extract the files, replace versions as needed. | Go to your target directory where you want to install Horde3D. Then extract the files, replace versions as needed. | ||
<pre> | <pre> | ||
Line 114: | Line 97: | ||
Now everything should be working. Go to Horde3D/Binaries/Linux_x86 to try the samples. | Now everything should be working. Go to Horde3D/Binaries/Linux_x86 to try the samples. | ||
− | + | = Using the extension = | |
The extension defines the uniform *terBlockParams* and the attribute *terHeight* that can be used in a shader to render the terrain. To see how this is working in detail, have a look at the included sample shader. | The extension defines the uniform *terBlockParams* and the attribute *terHeight* that can be used in a shader to render the terrain. To see how this is working in detail, have a look at the included sample shader. | ||
Line 120: | Line 103: | ||
In the Terrain Sample distributed with the extension, there's also a normal map encoded in the heightmap texture. The data for the | In the Terrain Sample distributed with the extension, there's also a normal map encoded in the heightmap texture. The data for the | ||
normal map is encoded in the blue and alpha channel. A simple tool to create such a combined normal height map is integrated in the Horde3D Scene Editor. It can use 8-bit or 16-bit images as heightmap input. In case of 8-bit images you can also specify a smoothing operator to convert the 8-bit heightmap into a more smooth 16-bit one. | normal map is encoded in the blue and alpha channel. A simple tool to create such a combined normal height map is integrated in the Horde3D Scene Editor. It can use 8-bit or 16-bit images as heightmap input. In case of 8-bit images you can also specify a smoothing operator to convert the 8-bit heightmap into a more smooth 16-bit one. | ||
+ | }} <!-- Right panel --> | ||
+ | | valign="top" |{{Extension_Summary| | ||
+ | name = Terrain Extension| | ||
+ | screenshot = H3Dterrain.jpg| | ||
+ | description = The Terrain Extension extends Horde3D with the capability to render large landscapes.| | ||
+ | version = 0.1.0| | ||
+ | horde3dversion = 0.15| | ||
+ | released = 2008-03-30| | ||
+ | author = Nicolas Schulz and Volker Wiendl| | ||
+ | }} | ||
+ | |} |