Houdini 21.0 Copernicus

Cables

Describes what cables are and how to use them in your network.

On this page

Overview

A cable is a wire that’s made up of multiple, individual wires (inputs). Cables let you connect multiple wires to an input port using only one wire. This is useful when you want to apply the same node to multiple outputs, since you don’t have to wire each output into an input. Cables also allow for variadic inputs and outputs on HDAs.

The wires in a cable are identified by their names (with the collation index used to disambiguate if there are multiple wires sharing the same name). By default, cables maintain their original wire order as they travel through the network. You can use the Cable Sort COP to instead sort the wires alphabetically based on their names.

Cables allow for and simplify several workflows:

Input Override and All Outputs cables

Some Copernicus nodes have green blocks on their upper-left or upper-right sides. These are known as the following:

  • Upper-left block: Input Override Port

  • Upper-left block’s wire: Input Override Cable

  • Upper-right block: All Outputs Port

  • Upper-right block’s wire: All Outputs Cable

The Input Override Port takes the Input Override Cable and overrides the node’s usual inputs. Add this port to any COP node by choosing Add Input Override Port from the parameter editor’s Gear menu. Overrides are applied by matching wire names in the Input Override Cable against the node’s input labels.

Note

Network wires take precedence over the Input Override Cable. For example, if the Input Override Cable has a wire named bright and the bright input port on the node has a wire connected to it, then that concrete wire is used instead of what comes in through the Input Override Cable.

The All Outputs Port generates the All Outputs Cable, which packs the node’s outputs into a cable. Wires of the All Outputs Cable are named based on output labels of the originating node. This port is especially useful for procedurally grabbing variadic outputs (for example, from the File COP). The All Outputs Port is present on any COP that has the possibility of generating more than one output.

How to use cable nodes

To...Do this

Create a cable

  1. Create a Cable Pack COP in your Copernicus network.

  2. Wire node outputs into their own input# on the Cable Pack COP. Wire in as many node outputs that you want in the cable. For example, wire in three SDF Shape COPs to pack a circle, star, and diamond together.

  3. Click Set Fields from Inputs to automatically populate the Cable Pack COP with the names of all the connected inputs (wires).

    Tip

    You can edit the Name fields.

    You can now wire the cable output into any COP node. These downstream nodes apply to each of the original inputs.

Turn a cable back into multiple wires

  1. Create a Cable Unpack COP in your Copernicus network.

  2. Wire a cable into the cable input.

  3. Click Set Fields from Input to automatically populate the Cable Unpack COP with the information of all the original inputs (wires) that make up the cable.

    You can now individually wire the outputs into any COP node.

Combine two cables

  1. Create a Cable Merge COP in your Copernicus network.

  2. Wire a cable into the input_cable input and another cable into the reference input.

  3. Set Operation to determine how the node merges the cables. For example, set it to Difference so that the merge output includes every wire in the first cable that’s not in the second cable.

    You can now wire the merge output into any COP node.

Switch between two cables

  1. Create a Cable Switch COP in your Copernicus network.

  2. Wire a cable into the first input and another cable into the second input.

  3. Set Select Input to determine which cable the node outputs. 0 outputs the first input cable and 1 outputs the second input cable.

    You can now switch between which cable is output.

Separate a cable based on filters

  1. Create a Cable Split COP in your Copernicus network.

  2. Wire a cable into the cable input.

  3. Configure the parameters to output two cables: one with the wires that match the filters and one with the wires that don’t match the filters.

    You now have two separate cables that you can wire into any COP node.

Edit a cable

You can use other nodes to edit a cable in the following ways:

  • Wire a cable into the Cable Filter COP to remove empty wires.

    or

  • Wire a cable into the Cable Rename COP to rename that cable’s wires.

    or

  • Wire a cable into the Cable Sort COP to sort that cable’s wires alphabetically by name.

Effect of cable inputs

Connect cables to ordinary ports to force the node to process each wire of the cable. This is similar to unpacking the cable, connecting each individual wire to a new copy of the target node, and then packing all of those results back into a cable. Likewise, cables of the same size can connect to different inputs of the node. In this case, each cook of the node uses a different set of wires from these cables. If a simple wire is connected to one of the other ports in this scenario, its data is used for cooking every output wire.

For example, you have a Cable1 that consists of C (RGBA), depth (Mono), and diffuse (RGB) wires and a Cable2 that consists of color (RGBA), depth (Mono), and Cd (RGB) wires. If you connect Cable1 and Cable2 to the Blend COP’s bg and fg inputs, respectively, the blend output is a cable with the same structure as Cable1. If you also connect a Mono layer to the node’s mask input, that mask affects the result of blending for all three output wires.

Note

Since you can’t currently nest cables, the above example doesn’t work for operators with prescribed cable outputs.

Many nodes with variadic inputs (for example, Contact Sheet COP and Stamp Points COP) also accept a cable in the variadic port. When a cable is connected to such an input, its wires distribute to subsequent subports. For example, if a cable with four Mono wires connects to a Contact Sheet COP, it acts as if the four wires were individually connected to the node.

How to utilize cables

To...Do this

Export all AOVs of a file through an HDA

  1. Create a Subnetwork COP in the COP context and dive into the node.

  2. Add a File COP and connect its All Outputs Cable (from the All Outputs Port upper-right block) to the Output COP that pre-exists in this network.

    Note

    The following steps refer to the File COP’s default name, which is file1.

  3. Go back up to the Copernicus network.

  4. the Subnetwork COP and choose Create Digital Asset to turn it into an HDA. The Edit Operator Type Properties window opens after you create the HDA.

  5. In the Edit Operator Type Properties window, click the Input/Output tab and do the following:

    1. Delete the input1 entry in the Inputs spreadsheet.

    2. In the Outputs spreadsheet, click the default signature’s cell in the output1 row and change the type to Cable.

  6. Click the Parameters tab and do the following to promote parameters from the contained node:

    1. Click the From Nodes tab in the Create Parameters section.

    2. Find and expand file1 in the tree view.

    3. Drag its File Name (filename) and Add AOVs from File (addaovs) parameters to the Existing Parameters section.

  7. Click the Node tab and enter file1 in the Editable Nodes parameter. This lets that node’s parameters be changed by the callback when the Add AOVs from File button is clicked on the HDA.

  8. Click Accept in the Edit Operator Type Properties window.

You can now put down an instance of this HDA, select a file, and click Add AOVs from File. Its output cable contains every AOV in the selected file.

Accept a variable number of layers on an HDA

  1. Create a Subnetwork COP in the COP context and dive into the node.

  2. Add a Contact Sheet COP and connect its All Outputs Cable (from the All Outputs Port upper-right block) to the Output COP that pre-exists in this network.

  3. Connect the All Outputs Cable of the Input COP that pre-exists in this network to the Contact Sheet COP.

  4. Go back up to the Copernicus network.

  5. the Subnetwork COP and choose Create Digital Asset to turn it into an HDA. The Edit Operator Type Properties window opens after you create the HDA.

  6. In the Edit Operator Type Properties window, click the Input/Output tab.

  7. In the Inputs spreadsheet, click the default signature’s cell in the input1 row and change the type to Cable.

  8. In the Outputs spreadsheet, click the default signature’s cell in the output1 row and change the type to RGBA.

  9. Click Accept in the Edit Operator Type Properties window.

You can now put down an instance of this HDA and connect a cable with several layers to it. The wires of this incoming cable are assembled into a mosaic for the output.

Author a material cable

  1. Create a Preview Material COP in your Copernicus network.

  2. Adjust its parameters and inputs to create a custom material. The node’s material cable output contains all the texture maps that go into reconstructing the material.

  3. Wire the material cable into the Input Override Port of another Preview Material COP to apply the material to another geometry.

    Note

    In the Preview Material’s parameter editor, choose Add Input Override Port from the Gear menu to add an override port.

    Tip

    Wire this cable into other Cable COPs (such as Cable Split) to separate out, modify, and re-pack specific layers of the material.

Blend two materials

  1. Follow the Author a material cable steps to create two different materials using two Preview Material COPs.

  2. Add a Blend COP.

  3. Connect the material cables of the two Preview Material COPs to the bg and fg inputs of the Blend COP.

  4. Add another Preview Material COP.

  5. Connect the blend cable output of the Blend COP to the Input Override Port of the newest Preview Material COP. This node shows the effect of applying the blended material.

    Note

    In the Preview Material’s parameter editor, choose Add Input Override Port from the Gear menu to add an override port.

  6. (Optional) Adjust the Blend COP’s Mask parameter to control the blending ratio between the two materials. Wire a layer into the Blend COP’s mask input to spatially vary the blending amount.

Two bark materials (left and middle) and their blended version (right). Image courtesy of Andriy Bilichenko.
See also

Copernicus

Basics

Next steps

  • Slap comp

    Slap composite (slap comp) is a fast image manipulation you can use to view approximate and live results of a final composite.

  • OpenFX

    Describes what OpenFX is and how to use it in your network.

  • Hatching

    Describes how to use hatching in your Copernicus network.

  • VDBs

  • How to use ONNX Inference

    Describes how to apply inference using a model in the ONNX Inference node.

  • Filter List

    The Filter List window lets you quickly apply effects in your scene.

  • Copernicus tips

    Useful tips and information while using COPs.

Dynamics

Advanced concepts

  • Normals

    Defines the normals that the Copernicus network uses.

  • Spaces

    Defines the spaces that the Copernicus network uses.