Twist and Shear Shader

From Terragen Documentation from Planetside Software
Jump to: navigation, search
Twist and Shear Shader


Overview[edit]

The shear effect displaces terrain horizontally, so that the vertical features of a heightfield or procedural terrain can be made to lean in any direction, which is good for creating overhangs or large scale displacements across an entire terrain. Twist and shear shader used to create overhanging terrain at top of mountains.


The effect can also be applied to clouds...

The shear effect can be applied to clouds as well as terrain.
The shear effect can be applied to clouds as well as terrain.


...and even to water.

The shear effect can be applied to water shaders too.


Settings:

  • Name: This setting allows you to apply a descriptive name to the node, which can be helpful when using multiple Twist and shear shader 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.


  • Lean factor: This setting is a multiplier that determines how much a terrain feature will lean. When a terrain feature is 100% upright, a lean factor of 1 will result in the feature leaning at 45 degrees. Values less than 1 result in the terrain features having less of a lean.
    Lean factor values ranging from -2.0 to 2.0


  • Lean direction: This setting controls whether the lean occurs in the positive or negative direction along each axis. Positive values will cause the terrain to lean in the positive direction, and negative values the negative direction.
    Comparison of Lean factor values and Lean directions on the XYZ axis.


  • Base altitude: This is the altitude at which there is no displacement. Above this altitude displacement is in the positive direction while below it the displacement is negative. The amount of displacement varies with altitude based on the Lean factor.
    In this example the Base altitude value is increased in 10 metre increments on a terrain feature 50 metres tall.


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.

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.