Hi Jojimbo, I'm sorry that I can't answer you very detaild as I have no time at all (I will be gone till sunday night) in 5 minutes. Anyways I gave my best to write a quick terrain importing tutorial. The last step might be most interesting for you. I hope it helps, if not please ask Carsten for help or wiat until I return sunday night. Sorry again but I didn't have the time for more...
Here it is...
------------------------------------------------------
Tutorial: Importing terrains
Step 1: Create Terrain
The first step is to create your terrain with a heightmap editor. You need a
heightmap (black&white picture) sized 257x257, 513x513, 1025x1025 or 2049x2049 pixels (supported formats are .ter / .bmp / .tga / .png / .jpg) . Furthermore, you need a
texture map for your terrain. This texture has to have 256x256, 512x512, 1024x1024 or 2048x2048 pixels (supported formats: .bmp / .tga / .png / .jpg). In this example I tell my terrain "
my_terrain.ter" .
Step 2: Move the terrain into the right directories
The heightmap has to be placed in:
Code: Select all
Ca3D-Engine\Games\DeathMatch\Terrains
The texture for the terrain has to be put into:
Code: Select all
Ca3D-Engine\Games\DeathMatch\Textures\Terrains
Step 3: Create a material/shader file for the terrain texture:
Open the
texteditor to write a material file for your terrain texture,copy into it:
Terrains/my_terraintexture //this is the name of your texture
{
AmbientShader A_Terrain // Override the automatic shader selection.
LightShader none1234 // Override the automatic shader selection - make sure no light shader is selected.
// noDynLight // Same effect as the previous line.
diffusemap Textures/Terrains/Terrains/
my_terraintexture.png, wrapS clampToEdge, wrapT clampToEdge
lightmap $lightmap // Ambient shader "A_Terrain" requires a lightmap.
lumamap Textures/Terrains/
CommonDetail1.png // "A_Terrain" takes the Luma-map as Detail-map (optional).
shaderParamExpr fParam4 // The first eight shader parameters are taken from fParam4 to fParam11
shaderParamExpr fParam5 // and specify the coefficients of two planes for automatic tex-coord generation.
shaderParamExpr fParam6
shaderParamExpr fParam7
shaderParamExpr fParam8
shaderParamExpr fParam9
shaderParamExpr fParam10
shaderParamExpr fParam11
shaderParamExpr 21.3 // Scale / Repetitions of the Detail-map.
twoSided // "twosided" is required for the SOAR terrain algorithm.
}
Note: Change
my_terraintexture.png accoding to your texture name and filetype.
CommonDetail1.png is the default detail texture and can be found at
Code: Select all
Ca3D-Engine\Games\DeathMatch\Textures\Terrains
Save it as your_terrain.cmat and place the file into
Code: Select all
Ca3D-Engine\Games\DeathMatch\Materials
Step 4: Placing the terrain in the editor
Open up CaWE, the maping editor. Select the terrain tool in the menu on the left side, drag a „face/surface area“ and press
Enter. A properties pop-up will occur. Terrain heightmap file name should be selected. In the small box next to it („value“) write
Terrains/my_terrain.ter
Of course you have to replace the filenyme and filetype with that of yours.
Press „
Set all“ and close the window, the terrain will be loaded.
Now press
Alt+Enter and select „Terrain material name“ and use as value
Terrains/my_terraintexture
Again press „
Set all“ and the terrian texture will be loaded.
Done, now you can scale the terrain as you want by moving it's corners.