Default Shader - Displacement Tab

From Terragen Documentation from Planetside Software
Jump to: navigation, search
Default Shader - Displacement Tab

Description:
Displacement is what gives three dimensional shape to the shader. The Displacement tab contains settings which let you control displacement for the shader. Please see the Surface Layer - Displacement Tab page for a detailed description of displacement. The information that page has about using the displacement parameters apply equally well to the settings in this shader.

The Default shader only applies displacement if there is a image specified in the Displacement image parameter or there is a function attached to the Displacement function parameter.


Settings:

  • Displacement direction: This popup list allows you to choose the direction that displacement is applied in. Any options in the popup list that have "(requires computed normal)" require that there be a Compute Terrain or Compute Normal connected somewhere above the node in the network to work properly. The popup has the following options:
    • Along vertical: Displacement will happen along the normal of the underlying object (i.e. the planet or a model) without any displacement being applied.
    • Along normal: Displacement will happen along the current surface normal.

    • Vertical only (requires computed normal): Displacement only happens along the normal of the underlying object (i.e. the planet or a model). 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, or in other words 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 (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 image: This lets you specify an image file to use for displacement. The luminance of the image pixels is used to generate displacement.

  • Displacement function: This parameter is where you connect the node(s) used to generate displacement for the layer.

  • Displacement offset: This value is added to incoming displacement values after they are multiplied by the Displacement multiplier parameter. 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.


Back to: Default Shader

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 parameter is an individual setting in a node parameter view which controls some aspect of the node.

This is essentially the brightness of the colour. Terragen converts RGB colours to greyscale by taking the luminance of the colour.

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.