Documentation/Entity Types/Base/HeightmapTerrain.type

From NeoAxis Engine Wiki

Jump to: navigation, search
Go to higher level
HeightmapTerrain 007.jpg

Contents

Description

Heightmap Terrain is an essential tool designed for creation of height-based terrains. It contains convenient tools for terrain creation, coloring and editing.

Before proceeding to this article we recommend that you learn how to create a simple map.

Terrain Editing

In order to add a terrain to the map you have to chose the HeightmapTerrain option in the Entity Types window and then, click the display field.

HeightmapTerrain 002.jpg

By default, the terrain is plain and painted with grass. In order to change it you have to select the terrain in the Map Entities window and press the Edit button under the the list properties.

HeightmapTerrain 010.jpg

After that the edit terrain window will appear.

HeightmapTerrain 005.jpg

Below all the tools for terrain editing will be considered in detail.

Tools for terrain editing

Terrain editing tools are used for creating mountains, fields, hills, hollows as well as for painting the terrain.

Terrain editing is quite similar to painting: Terrain is like a canvas and the tool is like a brush. The tool is applied as the left mouse button is pressed. The longer a tool is applied to a certain spot of the terrain, the stronger are the changes.

There are three toolkits used for terrain editing.

Geometry

left‎

There are three toolkits used for terrain geometry editing.

Name Description
Geometry Raise Creation of raises. This tool is used for creating hills and mountains. If you hold the Shift button, the landscape will recede. Thus, you can create pits and hollows with this tool.
Geometry Lower Holow creation. You can create pits and hollows with this tool. If you hold the Shift button, the landscape will rise.
Geometry Smooth Surface smothing. This tools is used for smoothing adjacent areas.
Geometry Flattern Surface leveling. This tool can be used for creating plains.
HeightmapTerrain 006.jpg

Paint

left‎

Toolset for terrain painting.

Name Description
Paint Terrain painting with a brush. The texture is selected in the Layers list of the terrain editing window. Hold the Shift key in order to remove texture from terrain.
Clear Terrain cleaning. Removes the changes made with a brush. Hold the Shift key in order to paint the terrain.
Paint Smooth Smoothens the painting of the adjacent areas.
Paint Flattern Paint leveling. Use this tool in order to extend an already painted area.
HeightmapTerrain 007.jpg

Hole

left‎

Toolset for hole creation in terrain

Name Description
Add Hole Creates a hole in terrain.
Remove Hole Removes a hole in terrain.
HeightmapTerrain 008.jpg

Tool adjustment

Brush adjustment

You can adjust the brush used for terrain editing. For this purpose four parameters in the editing window are used.

HeightmapTerrain 016.jpg
Name Description
Shape Brush shape. You can choose between: Circle and Square.
Outer Radius Brush outer radius. The effect on terrain weakens in the area between inner and outer radius.
Inner Radius Brush inner radius. Within inner radius the tool takes full effect on the terrain.
Strength Strength of tool impact on terrain. The larger is this value, the faster changes the terrain. The lesser is this value, the longer you will have to use the tool on terrain.

Layer adjustment

In order to paint the terrain, various layers can be used. You can chose the layers you need in the Layers list of the terrain editing window.

HeightmapTerrain 017.jpg

You can add and remove layers changing the Layers property of the selected terrain. To do this, select a terrain in the Map Entities window. Now, select the Layersfield in the Properties window and press the "..." button.

HeightmapTerrain 018.jpg

A window will pop up, where you will be able to edit the layer list as well as layers themselves.

HeightmapTerrain 012.jpg

Press the Add button to add a new layer. To remove a layer from the list, select a layer and press the Remove button.

Layer properties:

Name Description
BaseMap Base diffuse texture.
BaseScale Stretch ratio of the base texture on the terrain.
DetailMap Detail texture.
DetailScale Stretch ratio of the detail texture on the terrain.
Name Layer Name.
NormalMap Normal map.
NormalMapType Type of the normal map. You can chose between the Base type (normal map will be applied to the base texture) and the Detail type (normal map will be applied to the detail texture).
ProjectionAxis This parameter specifies the axes to stretch the texture along. The selected axis specifies the alignment of the plane to stretch the texture along. Thus, if ZAxis is selected, the texture will be stretched along the X and Y axes. For Y axis it will be stretched along X and Z, forX - along Y and Z.

Please note that a rock texture can be applied to vertical as well as to horizontal surfaces. In order this not to happen you have to create two various texture types with different ProjectionAxis values.

Properties

General Properties

Title Description
CastDynamicShadow Toggles the shadow of the terrain.
CollisionMaterialName This enables you to select one of 4 values: Metal, Wood, Rubber or Ice. This parameter affects interaction properties of physical objects. For example, if you add a box with the parameter value set to Ice, it will roll and glide as if it was on ice as you approach and push it.
DetailMapDistance By default this value is set to 50. This indicates the visibility radius of detailed textures in the layer.
HeightmapSize This value specifies the detail of the grid geometry, more precisely, the number of cells on the map. The higher this value is, the more detailed the landscape will be.
HorizontalSize Defines the length/width of your terrain in meters (units).
Layers Configures layers. Here you can configure textures that are available for painting.
MasksSize Specifies the size of a pixel to fill. The greater this parameter is, the more detailed/smoother the blending between layers will be. The shading will be finer as well.
Position Specifies the position of the terrain on the map.
VerticalSize Spesifies the maximum height in meters (units). An important option if you are planning to make a mountain. If you are not, this value is of no specific importance though. HeightmapTerrain can not be raised higher than specified in this parameter. It is important to configure this value at beginning before editing the HeightmapTerrain, otherwise if you change this parameter the terrain will be modified according to the height of all hills and lowlands.

Advanced Properties

Title Description
BottomClipHeight By default this value is set to 10000. This option excludes from rendering those parts of the terrain, which lie entirely below this value. For example, river bottoms.
RenderQueueGroup Defines the rendering of the object relative to other objects.
TileSize This value specifies tile size. Tile is the number of terrain cells, rendered as a whole. For example, with this parameter set to 16x16, 256 cells will be rendered together. If at least one cell of the tile is visible, the renderer will draw them all. Please note: One tile cannot be painted (at least in different parts of the tile) with more than 5 layers. We recommend that you select this option when optimizing the performance of the map.