The Heightfield Generate node can be used to generate unique heightfield terrains. Heightfields are of finite resolution and cover a specific area, unlike procedural terrains which have theoretically infinite detail and can cover an entire planet. Heightfields can be based on fractal patterns built into the node itself, or you can use other shaders to generate the height information. This node is especially useful in cases where you wish to apply heightfield specific operations such as Erosion. Procedural displacement may also be used to enhance the detail of a heightfield via the Fractal Detail tab settings which are enabled by default.
- Name: This setting allows you to apply a descriptive name to the node, which can be helpful when using multiple Heightfield generate nodes in a project.
- New heightfield: When checked, a heightfield’s resolution and size is generated using the “Number of points” and “Size in metres” settings. When unchecked, or disabled, a heightfield’s dimensions are taken from the nodes connected to the Input node.
- Number of points: This sets the number of points, or resolution, of the heightfield. The higher the value, the greater the resolution and more detail. This setting does not control the area the heightfield covers.
- Size in Metres: This sets the X and Y size of the heightfield in metres, which determines the area covered by the heightfield.
- Generate at load time: When checked, the heightfield will regenerate when a project is loaded. This setting is enabled by default.
- Generate Now: Clicking this button will generate the heightfield.
The Fractal tab contains settings to let you define the main fractal pattern features used to generate the heightfield.
- Feature scale: This setting controls the average size, in metres, of the features generated in the heightfield.
- Feature steepness: This setting defines the steepness of the generated features. Higher values increase the steepness and height of the features.
- Roughness: This controls the roughness detail of the generated terrain. Lower values result in a smoother terrain, while larger values result in more varied terrain details.
- Seed: This setting controls the fractal pattern used by the node to generate the heightfield. This allows you to easily create variations of the terrain based on the node’s other settings. For example, you can define the “Feature scale” for the terrain and then explore variations on this theme by clicking on the “Random Seed” button which will change the Seed value. Using the same Seed value in multiple Heightfield Generate nodes will generate the same pattern and heightfield.
- Random Seed: Clicking this button will randomly choose a new value for the “Seed” setting.
Tweak Fractal Tab
The Tweak Fractal tab contains settings that allow you to change additional aspects of the fractal pattern used to generate the heightfield.
- Variation: This setting controls the amount of unevenness in amplitude of the noise pattern. The higher the value the smoother a surface becomes.
- Variation method: This popup menu provides three options for applying the "Variation" to the fractal noise pattern.
- Buoyancy from variation: When the "Variation method" is set to Multi-scale modulator, this setting allows the rough peaks of the terrain to rise in height and the valley areas to lower and become smoother. Note, this setting has no effect on Clamped and Unclamped multifractal variation methods.
Use Shader Tab
This tab contains settings which allow you to use a displacement shader to generate height information for the heightfield. Clicking on the "Generate Now" button after assigning a shader will generate the heightfield. If changes are made to the assigned shaders you will need to regenerate the heightfield.
Using displacement shaders to generate heightfield data is useful in several ways. A heightfield may render quicker than a complex shader network. You can use it to "capture" the shader displacement in order to export a heightfield for use in another application. The heightfield won't have the same detail as the shader but it can be sufficient in many cases, for example as a low resolution stand-in terrain upon which to animate objects in another application. The exported heightfield could also be loaded into a heightfield editing application for further processing.
- Shader: This lets you assign a shader to be used to generate height information.
- Position center: When checked, the origin of the assigned shader is placed in the centre of the heightfield.
- Position lower left: When checked, the origin of the assigned shader is placed at the lower left of the heightfield.
- Position: This setting is used to offset the assigned shader along the "X" and "Y" axis. For example, entering a value of 500 into the "X" input will translate the heightfield 500 metres to the right.
A heightmap or heightfield is an array of height values, usually in a grid which describe the height at specific points in a defined area. Heightfields are used to represent real-world and virtual terrain in a specific, easily converted format. Most heightfields can be represented as simple image data in grayscale, with black being minimum height and white being maximum height.
Literally, to change the position of something. In graphics terminology to displace a surface is to modify its geometric (3D) structure using reference data of some kind. For example, a grayscale image might be taken as input, with black areas indicating no displacement of the surface, and white indicating maximum displacement. In Terragen 2 displacement is used to create all terrain by taking heightfield or procedural data as input and using it to displace the normally flat sphere of the planet.
A single object or device in the node network which generates or modifies data and may accept input data or create output data or both, depending on its function. Nodes usually have their own settings which control the data they create or how they modify data passing through them. Nodes are connected together in a network to perform work in a network-based user interface. In Terragen 2 nodes are connected together to describe a scene.
A shader is a program or set of instructions used in 3D computer graphics to determine the final surface properties of an object or image. This can include arbitrarily complex descriptions of light absorption and diffusion, texture mapping, reflection and refraction, shadowing, surface displacement and post-processing effects. In Terragen 2 shaders are used to construct and modify almost every element of a scene.