Adding inputs and outputs to a component

You can create new component inputs and outputs using a terrain, mask, value, file name, color, color ramp, color map, and vector map as the input or the output, respectively.

Right-click in an open component graph (see Viewing a component graph) and select Edit > Create node > Components > Inputs or Outputs and choose one of the options available.



Optional input masks

When you create an input mask for a component, you can specify whether this mask is mandatory or optional.

  • When the mask is mandatory (default setting), the component node is invalid if no mask is connected.
  • When the mask is optional, the component node is valid even if no mask is connected:

Inside a component, when no mask is present, a constant mask is used. You can choose its value between 0 and 1 in the component's parameters.

The Input mask node has two outputs:

  • The first output corresponds to the mask itself, either the input mask if there is one, or the constant replacement mask.
  • The second output is a value that equals 1 if the mask is present and 0 if the mask is absent. It is possible to use this value in a formula whether mask is present or not.

Example

In the example below, we add a mask input, and a vector map output.

Each input and output corresponds to a connector on the component. In the example below, we have a brown mask input connector, a green terrain output connector, and a purple vector map output connector.

To change the order of the input or output connectors, move the component input and component output nodes vertically.


Copyright © 2022 · All Rights Reserved · Wysilab