Difference between revisions of "Hard Step Scalar"

From Terragen Documentation from Planetside Software
Jump to: navigation, search
(jrfconvert import)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:IMPORT]]
+
[[Image:drex_module_130_image_0.png|485pxpx|Hard Step Scalar]]
='''Hard Step Scalar'''=
+
 
 +
'''Node Description & Purpose: '''<br /> 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 :<br /><br />'''Input''' >= '''Step value'''<br /><br /> 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.<br /><br /> 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|Smooth step scalar node]], which creates smooth transitions, if that can be worked into the network instead.<br /><br />'''Node Type: '''Function<br /><br />'''Settings: '''<br />
 +
 
 +
* '''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'''.
 +
 
 +
<br />'''Error conditions:'''<br />
 +
 
 +
* 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.
  
[[Image:drex_module_130_image_0.png|485pxpx|Hard Step Scalar]]
 
__NOTOC__
 
 
<!-- imported from file: module_130.html-->
 
<!-- imported from file: module_130.html-->
 +
 +
[[Category:Step]]

Revision as of 18:41, 1 June 2011

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.