Difference between revisions of "Terrain Extension"
From Horde3D Wiki
(Needs further editing. The <pre> should be avoided because it turns off the fixed-width layout. If it is cude use the CppSource template. in this case it was logs so i did not remove the tags.) |
|||
Line 1: | Line 1: | ||
[[category: Extensions]] | [[category: Extensions]] | ||
− | + | {| border="0" | |
− | { | + | | {{ContentBlock|width=800|color=white |content= |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
The Terrain Extension extends Horde3D with the capability to render large landscapes. A special | 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 | level of detail algorithm adapts the resolution of the terrain mesh so that near regions get | ||
Line 33: | Line 24: | ||
to register the extension: | to register the extension: | ||
− | + | <pre> | |
+ | installExtension( Horde3DTerrain::getExtensionName, | ||
+ | Horde3DTerrain::initExtension, Horde3DTerrain::releaseExtension ); | ||
+ | </pre> | ||
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. | ||
Line 39: | Line 33: | ||
= Installation Linux = | = 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> | |
− | unzip Horde3D_ExtTerrain_0.1.1.zip</pre> | + | unzip Horde3D_SDK_1.0.0_Beta1.zip |
+ | unzip Horde3D_ExtTerrain_0.1.1.zip | ||
+ | </pre> | ||
+ | |||
Now change Horde3D/Source/Horde3D Engine/egExtensions.cpp. Basically just uncomment all lines with code regarding the terrain extension: | Now change Horde3D/Source/Horde3D Engine/egExtensions.cpp. Basically just uncomment all lines with code regarding the terrain extension: | ||
− | + | <pre> | |
+ | --- Horde3D/Source/Horde3D Engine/egExtensions.cpp.old 2008-04-14 23:19:44.000000000 +0200 | ||
+++ Horde3D/Source/Horde3D Engine/egExtensions.cpp 2008-04-14 22:56:19.000000000 +0200 | +++ Horde3D/Source/Horde3D Engine/egExtensions.cpp 2008-04-14 22:56:19.000000000 +0200 | ||
@@ -25,16 +25,16 @@ | @@ -25,16 +25,16 @@ | ||
Line 59: | Line 57: | ||
{ | { | ||
// Install desired extensions here | // Install desired extensions here | ||
− | - //installExtension( Horde3DTerrain::getExtensionName, Horde3DTerrain::initExtension, Horde3DTerrain::releaseExtension ); | + | - //installExtension( Horde3DTerrain::getExtensionName, |
− | + installExtension( Horde3DTerrain::getExtensionName, Horde3DTerrain::initExtension, Horde3DTerrain::releaseExtension ); | + | Horde3DTerrain::initExtension, Horde3DTerrain::releaseExtension ); |
+ | + installExtension( Horde3DTerrain::getExtensionName, | ||
+ | Horde3DTerrain::initExtension, Horde3DTerrain::releaseExtension ); | ||
return true; | return true; | ||
} | } | ||
− | </pre | + | </pre> |
Now fix Horde3D/Source/Horde3D Engine/makefile: | Now fix Horde3D/Source/Horde3D Engine/makefile: | ||
− | + | <pre>--- Horde3D/Source/Horde3D Engine/makefile.old 2008-04-01 20:42:58.000000000 +0200 | |
+++ Horde3D/Source/Horde3D Engine/makefile 2008-04-14 23:09:49.000000000 +0200 | +++ Horde3D/Source/Horde3D Engine/makefile 2008-04-14 23:09:49.000000000 +0200 | ||
@@ -6,13 +6,15 @@ | @@ -6,13 +6,15 @@ | ||
Line 73: | Line 73: | ||
utImage.o utOpenGL.o ../Shared/utXMLParser.o | utImage.o utOpenGL.o ../Shared/utXMLParser.o | ||
− | +TERRAIN_OBJECTS = ../../../Extensions/Terrain/Source/extension.o ../../../Extensions/Terrain/Source/terrain.o | + | +TERRAIN_OBJECTS = ../../../Extensions/Terrain/Source/extension.o |
+ | ../../../Extensions/Terrain/Source/terrain.o | ||
+ | + | ||
Line 87: | Line 88: | ||
clean: | clean: | ||
− | </pre | + | </pre> |
If you are using the 1.0.0 Beta1 on a 64 bit system you have to fix Horde3D/Source/Horde3D Engine/utImage.cpp: | If you are using the 1.0.0 Beta1 on a 64 bit system you have to fix Horde3D/Source/Horde3D Engine/utImage.cpp: | ||
− | + | <pre>--- Horde3D/Source/Horde3D Engine/utImage.cpp.old 2008-04-01 23:28:22.000000000 +0200 | |
+++ Horde3D/Source/Horde3D Engine/utImage.cpp 2008-04-14 23:03:28.000000000 +0200 | +++ Horde3D/Source/Horde3D Engine/utImage.cpp 2008-04-14 23:03:28.000000000 +0200 | ||
@@ -1257,7 +1257,7 @@ | @@ -1257,7 +1257,7 @@ | ||
Line 100: | Line 101: | ||
img_comp[i].linebuf = NULL; | img_comp[i].linebuf = NULL; | ||
} | } | ||
− | + | </pre> | |
− | </pre | ||
Now we can compile the project: Call make in the following directories in the specified order: | Now we can compile the project: Call make in the following directories in the specified order: | ||
− | + | <pre> | |
+ | Extensions/Terrain/Source | ||
Horde3D | Horde3D | ||
Extensions/Terrain/Sample | Extensions/Terrain/Sample | ||
− | </pre | + | </pre> |
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. | ||
Line 119: | Line 120: | ||
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 | 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 | + | 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. |
− | 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| | ||
+ | }} | ||
+ | |} |