Node Description and Purpose:
The Heightfield Shader is the basis for any heightfield terrain. It takes data from a heightfield operator node (such as a Heightfield Generate) node and turns it into displacement. It's also used to position the heightfield and control various aspects of its appearance. One very useful thing it can do is add additional fractal detail which can greatly improve the appearance of the heightfield, especially if it's relatively low resolution.
Node Type: Displacement Shader
- Heightfield: This parameter links to the heightfield operator used to generate the heightfield data.
View heightfield button : Click this button to view the heightfield preview. This is different from the shader preview normally shown.
- Flip x: If this is checked the heightfield is flipped (left becomes right etc.) along the X axis.
Flip y: Check this to flip the heightfield along the Y axis (top becomes bottom etc.)
Position centre: Click this to position the heightfield around its centre.
Position lower left: Click this to position the heightfield using its lower left corner.
Position upper left: Click this to position the heightfield using its upper left corner.
Position: This parameter sets the X and Z position of the heightfield.
Border blending: This setting controls how much of the heightfield is blended around its edges to smooth it into the surrounding terrain. The value ranges from 0 to 1. The value relates to the size of terrain. If you use 0 there is no blending performed and the heightfield will potentially have a hard edge all the way around it, like a vertical cliff. A value of 1 means that the heightfield will blend all the way across its width and height.
Stitchable border: Check this to extend the blended border (whose width is controlled by Border blending) outside of the bounds of the heightfield. If you also uncheck Flatten surface first (on the Displacement tab), Stitchable border will allow multiple heightfields to be aligned adjacent to one another without any harsh seams between them.
- Blend by heightfield: Check this and choose another heightfield to blend (mask) this heightfield shader by the height values in the other heightfield; essentially the other heightfield becomes a mask for the main heightfield. Values in the other heightfield produce weight values between 0 (no weight) and 1 (full weight) that determine how much this shader's colour and displacement are applied to the input. The position and size of the other heightfield do not matter because the other heightfield is moved and scaled to fit the main heightfield. Height values in the other heightfield are mapped such that the highest point produces a blend weight of 1 and the lowest point produces a blend weight of 0.
Blend by shader: Check this to blend (mask) this heightfield shader using the specified shader or function node; essentially the other shader or function becomes a mask for this shader. The diffuse colours produced by the blend shader or the values produced by the blend function are interpreted as a blend weight, where 1 is full blend weight and 0 is no blend weight. These weights determine how much this shader's colour and displacement are applied to the input. Values below 0 or above 1 are allowed.
Fit blendshader to this: If this is checked the blend shader (specified in Blend by shader parameter) is given different texture coordinates in order to remap the unit square to the whole heightfield. The bottom left corner of the heightfield uses the blend shader at coordinates (0,0,0) and the top right corner of the heightfield uses the blend shader at coordinates (1,0,1). Note that not all shaders use texture coordinates so this may have no effect.
Invert blendshader: Check this to invert the values produced by the blend shader specified in the Blend by shader parameter.
Additional tabs for Heightfield Shader
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.
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.
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 parameter is an individual setting in a node parameter view which controls some aspect of the node.
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.