Surface Layer
Contents
Overview[edit]
The Surface Layer is most often used to create surface textures for the terrain. As one of the more complex nodes in Terragen, its parameters have been grouped together based on a particular aspect of the surface that they affect.
Settings:
- Name: This setting allows you to apply a descriptive name to the node, which can be helpful when using multiple Surface layer nodes in a project.
- Enable: When checked, the node is active and the settings below will affect the surface. When unchecked, the node is ignored.
Colour Tab[edit]
The settings below allow you to apply colour to the surface layer. The Apply colour and Colour function settings work together to define the final colour. The Enable test colour setting allows for quick visualizations of where the surface layer has been applied.
- Apply colour: When checked, the colour defined by the colour swatch to the right of the setting is multiplied with the Colour function setting and their combined output determines the final colour for the surface layer.
- Colour function: When a shader or function node is assigned to this setting its colour component values are multiplied with the Apply colour’s component values to determine the final colour for the surface layer.
- Enable test colour: When checked, the colour defined by the colour swatch to the right of the setting overrides the colour information from the Apply colour and Colour function settings. This allows you to quickly visualize where the surface layer has been applied.
Luminosity Tab[edit]
The settings below allow you to treat the surface layer as luminous, in other words it can glow and emit light. The three settings work together to determine the final luminosity value.
- Luminous: When unchecked, the Luminosity settings are disabled and the surface will not glow or emit light. When checked, the surface layer will glow and affect other surfaces as if it were a light source. The value field and slider directly to the right of the setting provide control for increasing or decreasing the intensity of the luminosity effect.
- Luminosity tint: This setting establishes the colour of the luminosity which can be different from the colour settings chosen for the Surface layer in the Colour tab.
- Luminosity function: The values from the shader or function nodes assigned to this setting are multiplied with those of the Luminous and Luminosity tint settings to provide even more control over the luminous effect and where it appears in the project. For example, with grey scale functions you could use Painted shader or Image Map shader as a mask for the glow effect. Areas that are black will not glow and areas that are white will glow using the colour defined in the Luminosity tint setting. With colour functions you can create complex multi-colour glow effects.
Displacement Tab[edit]
The Displacement tab allows you to control the three dimensional shape of the surface by means of displacement. This process moves the micropolygons that make up a rendered scene in 3D space to create their final shape. You provide the Surface Layer with the information it needs to perform displacement by assigning a shader or function nodes to the Displacement function setting.
The Displacement function expects scalar inputs, and will automatically convert colour values to scalar values. Assigned nodes which create displacement themselves may not give you the results you expect. For example, if a Simple Shape shader with its displacement enabled is assigned to the Surface Layer’s Displacement function no displacement will take place. In this case you need to enable the Simple Shape shader’s colour checkbox in order for displacement to be applied. Alternatively, you can use a Displacement Shader to Vector node to convert a node’s displacement output to a vector which can then be read by the Displacement function input, as the vector will be converted to scalar values.
We don’t recommend using Surface Layer displacement to create large features in a landscape. For the best results large features such as mountains should be created as part of the Terrain group and be connected above the Compute Terrain node. This ensures that one texture coordinate solution will exist in the project which all nodes have access to, and that textures and displacements will align properly.
- Displacement direction: This popup has 5 options which allow you to choose the direction in which the displacement is applied in. Options that "(requires computed normal)" must have a Compute Terrain or Compute Normal node connected somewhere above the Surface Layer in the network to work properly. The popup has the following options
-
Along vertical: Displacement happens along the normal of the underlying planet or 3D object’s geometry.
Along normal: Displacement happens along the current surface normal.
Vertical only (requires computed normal): Displacement only happens along the normal of the underlying planet or 3d object’s geometry. The displacement is scaled by the difference between the object normal and the surface normal. Displacement is reduced as the angle between the normals approaches 90°.
Lateral only (requires computed normal): Displacement only occurs in the lateral plane, that is perpendicular to the normal of the underlying object.
Lateral normalized (requires computed normal): This is the same as Lateral only but the normal is normalised, that is scaled so it has a length of 1.
- Displacement multiplier: This multiplies the displacement values coming from the "Displacement function" input. A value of 1 leaves the incoming values unchanged. A value of 2 would make the incoming values twice as large. A value of 0.5 would make them half as large. Negative values will invert the displacement.
- Displacement function: This setting allows you to assign shader or function nodes to use as displacement for the surface.
- Displacement offset This value is added to incoming displacement values after they are multiplied by the “Displacement multiplier” setting. This creates the effect of offsetting the displacement by a set amount along the “Displacement direction”. Positive values push the displacement out so it looks almost as if it was sitting on a plinth. Negative values will sink the displacement back into the surface. It doesn't reverse the displacement, it's more like creating a hole in the surface and then applying the displacement to the bottom of the hole.
Smoothing Tab[edit]
The settings on this tab allow you to control how Terragen blends this Surface layer’s displacements and the displacements from its child layers, with an averaged, i.e. smoothed, version of the Terrain as computed by the last Compute terrain node in its node network branch..
- Smoothing effect: When checked and the smoothing amount is 1, the Surface layer ignores any displacements coming before it in its node network branch, and using the averaged terrain from the last Compute Terrain node as a starting point, adds its own displacement and any displacements from its child layers. For example, a very common workflow is to create large terrain displacements in the Terrain group which ends in a Compute terrain node. Small scale displacements, such as a Strata and Outcrops shader, or the Fake stones shader might be added after the Compute terrain node in the Shaders group. When a Surface layer followed these small scale displacement nodes and its Smoothing effect is set to 1, then the small scale displacement nodes are ignored and the averaged smoothed version of the terrain from the Compute terrain node is used as the base on which to apply the Surface layer’s own displacements and those of its child layers.
For Smoothing effect values less than 1, that fraction of the Surface layer’s displacement and those of its child layers is added to all the displacements upstream from it. Negative Smoothing effect values amplify the previous displacements, while a value of 0 is the same as disabling the Smoothing effect.
Coverage/Breakup Tab[edit]
- Coverage This setting controls how much of the surface layer is applied, almost like a transparency control for the overall surface layer. A value of 1 means the surface layer is fully applied and will cover all surfaces upstream of it in the node network, while smaller values allow only a portion of the surface layer to be applied so the upstream surfaces will show through. This applies to both the Surface layer’s colour and displacement values.
- Fractal breakup When checked and the Coverage amount is less than 1.0, the coverage of the surface layer is broken up using the shader or function nodes assigned to the field at the right. This can introduce a greater sense of randomness and texture to the surface. The amount of breakup is controlled by the value and slider directly below. Higher values visually increase the contrast between the areas covered by the surface layer and those not covered.
- Invert breakup When checked, the fractal breakup pattern is inverted. If the Apply high colour and Apply low colour values under the Colour tab of the fractal breakup node are set to white and black respectively, then the light parts become dark and vice versa. If these settings contain colour values then the RGB colour components are inverted.
- Only breakup colour When checked, the fractal breakup pattern only affects the colour of the surface layer and not the other characteristics of the surface layer.
- Mask by shader: When checked, the surface layer is restricted to the area defined by the shader or function nodes assigned to this setting. White values in the mask allow the surface layer to be visible, while black values block the surface layer from showing. Grayscale values allow a portion of the surface layer to be visible.
- Invert mask: When checked, the inverse of the shader or function nodes assigned as the mask is used as the mask.
- Mask as coverage: When checked, the surface layer’s coverage value is clamped at 1.
Altitude Constraints Tab[edit]
The Altitude Constraints tab has settings which let you control where the surface layer appears by altitude or height. For example, if your surface layer represents snow you might not want it to appear below a certain height. You can use the 3D Preview to quickly and accurately select altitudes by right clicking in the pane at the altitude you want and selecting “Copy Altitude” from the context menu, then pasting the copied value into the text field for Minimum Altitude by highlighting its current value and pressing “Ctrl + V” on your keyboard. With the Limit minimum altitude checkbox enabled, the snow layer will only cover the terrain to the point at which you clicked in the 3D Preview.
- Limit maximum altitude: When checked, the Maximum altitude constraint becomes active and the surface layer is limited to altitudes below the Maximum altitude value.
- Maximum altitude: This setting controls the maximum height at which the surface layer will appear at.
- Max alt fuzzy zone: This controls the width of the fuzzy zone for the Maximum altitude constraint. The fuzzy zone is an area below the Maximum altitude which blends the surface layer with underlying layers. Fuzzy zones are explained in detail here.
- Limit minimum altitude: When checked, the Minimum altitude constraint becomes active and the surface layer will not appear below the Minimum altitude value.
- Minimum altitude: This setting controls the minimum height at which the surface layer will appear at.
- Min alt fuzzy zone: This controls the width of the fuzzy zone for the minimum altitude constraint. The fuzzy zone is an area above the minimum altitude which blends the surface layer with underlying layers. Fuzzy zones are explained in detail here.
- Altitude key: This popup menu has two options which are used to select how the altitude or height is based.
-
Final position - When selected the altitudes are based on world space and not texture space.
Position in terrain/texture - when selected the altitudes are based on texture space.
Use Y -
-- old links below
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.
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 scalar is a single number. 1, 200.45, -45, -0.2 are all examples of scalar values.
A vector is a set of three scalars, normally representing X, Y and Z coordinates. It also commonly represents rotation, where the values are pitch, heading and bank.