- For detailed instructions on the various options available, see Terrain Panel
Heightmap nodes are fundamental assets used in Area creation, which can be created either via the Create menu, or, more commonly, via the Terrain panel, which can also be used to provide terrain, such as mountains and valleys. Heightmaps provide a basic "floor" for an area, upon which other models (buildings, trees, bridges, etc.) are placed.
Creating a Heightmap
- Open the HeroBlade Terrain Panel
- If you do not see the Terrain panel, then check your Panels Menu to ensure it is selected.
- In the Terrain Panel, click on the Create Heightmap button
- A heightmap will appear in the viewpoint, with the default texture for new heightmaps (probably either a checkerboard, or perhaps a grassy texture, but perhaps something different depending on how your world is configured).
To create multiple height maps, click on the Grid button next to the "Create Heightmap" button, and select the size of territory to be created.
Heightmap nodes can be duplicated just like any other node.
Modifying a Heightmap
- See also: Terrain brushes
- Heightmaps are modified via the many terrain brushes available in the Terrain Panel. See the Terrain panel for details on the many options available.
For just one example:
- Select the heightmap
- Go into camera mode, and backup your viewpoint so that you can see the entire heightmap at once
- Click on the Edit Height Tool
- Click to cycle through the options in the Brush pattern box, and select the mottled "Perlin" pattern.
- Choose a Round brush with a soft falloff.
- Hover your mouse over the heightmap, and using your mouse wheel, modify the size of the brush strength to about 25% of the heightmap.
- Move the brush over the upper right quarter of the heightmap, and click and drag UP to raise terrain into mountains.
- Move the brush over the lower left quarter of the heightmap, and click and drag DOWN to lower the terrain into valleys.
For further examples of what can be done with the Terrain panel, see:
Each heightmap layer uses two possible textures at a time, one for how it looks, as in which image is displayed, and one for the "bumpiness".
- The displayed color or image, is called the Diffuse Texture. These textures must have a _d suffix, such as grass_long_green01_d.dds
- The "bumpiness" texture is called the Bump+Spec or Normal Texture. These textures must have a _n suffix, such as grass_long_green01_n.dds
Any .dds file can be used as a Diffuse or Normal texture, by simply adding the _d.dds or _n.dds suffix; however it is usually best to use textures that have been specifically designed for the proper purpose. By default, the "Select Texture" dialog will display only textures with the proper suffix.
Terrain textures must be placed in the correct Location: the 'select texture' dialog looks in \World\LiveContent\TerrainMaps\ and its sub-directories for terrain textures. Make sure to add your textures there, or they will not be found by the select texture dialog.
Changing the default texture
When first created in Clean Engine, Heightmap nodes have no textures, and may appear as a checkerboard. To set a default texture:
- In the Terrain panel, click on the Texture button
- In the Texture subpanel, under "Layer 1", the leftmost box should be highlighted. If it is not, click on it.
- Click on the texture in the box labeled "Diffuse".
- Underneath the Diffuse box is a "Change" button. Click on it.
- Choose a texture from the texture library, such as: /Engine/CleanGame/TerrainMaps/grass_long_green01_d.dds
- Click "OK"
- All default heightmaps in the area should switch to the new default texture.
There is nothing special you have to do in order for Heightmaps to act as occluders. A Heightmap is automatically broken into chunks of a particular size (say 8 by 8 grid cells, but this might change) which each act as an individual object that both has a write and test model. In other words, each chunk can be individually culled and can block things behind it. Note that it cannot block things that are inside of the chunk in question (that is, standing on it).
Ideally you want to sculpt your land to give as many opportunities for heightmap terrain to occlude as possible. Make tall hills/mountains that players cannot get on top of so that it will occlude things on the other side.
Paths and Heightmap nodes
Heightmap nodes are used as part of the Path Planning System, which uses the vertices of a heightmap mode to help generate a path from Point A to Point B. This data is gathered on the client and then sent to the server via buttons and switches on HeroBlade's Path Planning panel.