Heightfield Merge

From Terragen Documentation from Planetside Software
Jump to: navigation, search
Heightfield Merge


Overview[edit]

Heightfield Merge allows you to merge two heightfields together based on simple settings that control the amount of heightfield mixing and the type of mixing method used.

These images were used as heightfields in the examples below.

Two gradient images merged together for heightfield merge examples below.
Gradient image and terrain image merged together for heightfield merge examples below


Settings:

  • Name: This setting allows you to apply a descriptive name to the node, which can be helpful when using multiple Heightfield merge nodes in a project.


  • Heightfield A: The heightfield file assigned to this setting will be merged with the heightfield connected to the Input node.


  • Mix amount: This setting controls how much of “Heightfield A” is merged with the heightfield connected to the input node. A value of 0 means no merge will take place and the heightfield connected to the input node will be passed through without any modifications. A value of 1 means that “Heightfield A” will be merged completely with the other heightfield by whichever method is chosen below.
    Mix amounts 0 to 1


  • Merge mode: This setting provides eight options for merging the two heightfields together.
    Merge mode options
    • Mix: This mode progressively blends between the two heightfields. A value of 0.5 results in the two heightfields being equally blended together. A value of 0 returns the heightfield assigned to the input node, while a value of 1 results in the heightfield assigned to Heightfield A.
      Merge mode = Mix.

      Merge mode = Mix, Mix amount from 0 to 1.

    • Add: This mode adds the values from Heightfield A to the values from the Input node.
      Merge mode = Add.

      Merge mode = Add, Mix amount from 0 to 1.

    • Subtract: This mode subtracts the values from Heightfield A from the values of the Input node.
      Merge mode = Subtract.

      Merge mode = Subtract, Mix amount from 0 to 1.

    • Difference: This mode compares the two heightfields and subtracts the brighter of the two values at any given point. When the Heightfield A values are white the input node values are inverted. Merging with black produces no change.
      Merge mode = Difference.

      Merge mode = Difference, Mix amount from 0 to 1.

    • Highest (raise): This mode compares the two heightfields and returns the highest value at any given point.
      Merge mode = Highest (raise).

      Merge mode = Highest (raise), Mix amount range from 0 to 1.

    • Lowest (cut away): This mode compares the two heightfields and returns the lowest value any given point.
      Merge mode = Lowest (cut away).

      Merge mode = Lowest (cut away), Mix amount from 0 to 1.

    • Multiply: Multiples the values of the Input node heightfield by Heightfield A’s values. Multiplying any value by black will result in black, while multiplying by white leaves the value unchanged.
      Merge mode = Multiply.

      Merge mode = Multiply, Mix amount from 0 to 1.

    • Screen: This mode multiplies the inverse of the two heightfields together resulting in a heightfield of brighter values. Where the values of Heightfield A are black the Input node heightfield values are unchanged and where the values of Heightfield A are white the Input node heightfield values become white.
      Merge mode = Screen.

      Merge mode = Screen, Mix amount from 0 to 1.

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.