Hard Step Scalar

From Planetside Software Wiki
Jump to: navigation, search

Hard Step Scalar

Node Description & Purpose:
The Hard step scalar node is a function node which outputs either 1 or 0 depending on the input values. It can be used like a switch. The calculation the node performs is very simple, and looks like this :

Input >= Step value

If Input has a value greater than or equal to Step value, then the node outputs 1. If Input is not greater than or equal to Step value then the node outputs 0.

The Hard step scalar node can be very useful, but you need to be aware that it creates a hard transition between the two values. This can lead to visual artifacts in procedural textures. Often it is a better idea to use the Smooth step scalar node, which creates smooth transitions, if that can be worked into the network instead.

Node Type: Function

Settings:

  • Step value: The value corresponding to Step value in the description above. In version 2.4.5.0 and later, if there is no Step value then a value of 0 is used for Step value.


Error conditions:

  • It is an error for there to be no input value. In that case 0 is output from the node.
  • In versions older than 2.4.5.0, it is an error for there to be no Step value value. In this case the input value is output from the node.

A scalar is a single number. 1, 200.45, -45, -0.2 are all examples of scalar values.

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.